forked from KolibriOS/kolibrios
eolite: do not show inaccessible disks (sata & usb devices on some PCs)
mousecfg: save values to system.ini fix regressions in webview and clipview git-svn-id: svn://kolibrios.org@7991 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
cb423ff821
commit
e18f3d60f6
@ -175,7 +175,7 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
|
|||||||
is_html = true;
|
is_html = true;
|
||||||
if (!strstri(bufpointer, "<body")) {
|
if (!strstri(bufpointer, "<body")) {
|
||||||
t_body = true;
|
t_body = true;
|
||||||
if (!strstri(bufpointer, "<html")) {
|
if (!strstri(bufpointer, "<html")) && (!strstr(bufpointer, "<?xml")) && (!strstr(bufpointer, "<xml")) {
|
||||||
style.pre = true; //show linebreaks for a plaint text
|
style.pre = true; //show linebreaks for a plaint text
|
||||||
is_html = false;
|
is_html = false;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ void main()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case evButton:
|
case evButton:
|
||||||
@GetButtonID();
|
id = @GetButtonID();
|
||||||
if (id==1) ExitProcess();
|
if (id==1) ExitProcess();
|
||||||
if (id==BT_DELETE_LAST_SLOT) EventDeleteLastSlot();
|
if (id==BT_DELETE_LAST_SLOT) EventDeleteLastSlot();
|
||||||
if (id==BT_DELETE_ALL_SLOTS) EventDeleteAllSlots();
|
if (id==BT_DELETE_ALL_SLOTS) EventDeleteAllSlots();
|
||||||
|
@ -110,7 +110,7 @@ void _SystemDiscs::Get()
|
|||||||
for (j1=0; j1<dev_disc_num; j1++;)
|
for (j1=0; j1<dev_disc_num; j1++;)
|
||||||
{
|
{
|
||||||
sprintf(#sys_discs,"%s/%s",#dev_name,j1*304+ buf+72);
|
sprintf(#sys_discs,"%s/%s",#dev_name,j1*304+ buf+72);
|
||||||
list.add(#sys_discs);
|
if (dir_exists(#sys_discs)) list.add(#sys_discs);
|
||||||
}
|
}
|
||||||
if (!strcmp(#sys_discs, "/rd/1"))
|
if (!strcmp(#sys_discs, "/rd/1"))
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define TITLE "Eolite File Manager 4.35"
|
#define TITLE "Eolite File Manager 4.4"
|
||||||
#define ABOUT_TITLE "EOLITE 4.35"
|
#define ABOUT_TITLE "EOLITE 4.4"
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
?define T_FILE "” ©«"
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
ECX = handle;
|
ECX = handle;
|
||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 5;
|
EBX = 5;
|
||||||
$int 0x40;
|
$int 64;
|
||||||
}
|
}
|
||||||
:dword MOUSE::hide()
|
:dword MOUSE::hide()
|
||||||
{
|
{
|
||||||
@ -54,19 +54,19 @@
|
|||||||
EAX = 68;
|
EAX = 68;
|
||||||
EBX = 12;
|
EBX = 12;
|
||||||
ECX = 32*32*4;
|
ECX = 32*32*4;
|
||||||
$int 0x40
|
$int 64
|
||||||
ECX = EAX;
|
ECX = EAX;
|
||||||
_ = EAX;
|
_ = EAX;
|
||||||
} else ECX = _;
|
} else ECX = _;
|
||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 4;
|
EBX = 4;
|
||||||
DX = 2;
|
DX = 2;
|
||||||
$int 0x40;
|
$int 64;
|
||||||
handle = EAX;
|
handle = EAX;
|
||||||
ECX = EAX;
|
ECX = EAX;
|
||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 5;
|
EBX = 5;
|
||||||
$int 0x40;
|
$int 64;
|
||||||
handle = EAX;
|
handle = EAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@
|
|||||||
EBX = 19;
|
EBX = 19;
|
||||||
ECX = 4;
|
ECX = 4;
|
||||||
EDX = (x<<16)+y;
|
EDX = (x<<16)+y;
|
||||||
$int 0x40
|
$int 64
|
||||||
//move = true;
|
//move = true;
|
||||||
}
|
}
|
||||||
if((key)||(lkm|mkm|pkm))&&(down|up|click|dblclick|move)
|
if((key)||(lkm|mkm|pkm))&&(down|up|click|dblclick|move)
|
||||||
@ -89,7 +89,7 @@
|
|||||||
EBX = 19;
|
EBX = 19;
|
||||||
ECX = key;
|
ECX = key;
|
||||||
EDX = (x<<16)+y;
|
EDX = (x<<16)+y;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@
|
|||||||
{
|
{
|
||||||
EAX = 18;
|
EAX = 18;
|
||||||
EBX = 15;
|
EBX = 15;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
//get new attributes MOUSE
|
//get new attributes MOUSE
|
||||||
@ -105,7 +105,7 @@
|
|||||||
{
|
{
|
||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 1;
|
EBX = 1;
|
||||||
$int 0x40
|
$int 64
|
||||||
$mov ebx, eax
|
$mov ebx, eax
|
||||||
$shr eax, 16
|
$shr eax, 16
|
||||||
$and ebx,0x0000FFFF
|
$and ebx,0x0000FFFF
|
||||||
@ -115,7 +115,7 @@
|
|||||||
if (y>6000) y-=65535;
|
if (y>6000) y-=65535;
|
||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 2;
|
EBX = 2;
|
||||||
$int 0x40
|
$int 64
|
||||||
$mov ebx, eax
|
$mov ebx, eax
|
||||||
$mov ecx, eax
|
$mov ecx, eax
|
||||||
key = EAX;
|
key = EAX;
|
||||||
@ -180,7 +180,7 @@
|
|||||||
//scroll
|
//scroll
|
||||||
EAX = 37;
|
EAX = 37;
|
||||||
EBX = 7;
|
EBX = 7;
|
||||||
$int 0x40
|
$int 64
|
||||||
$mov ebx, eax
|
$mov ebx, eax
|
||||||
$shr eax, 16
|
$shr eax, 16
|
||||||
$and ebx,0x0000FFFF
|
$and ebx,0x0000FFFF
|
||||||
@ -213,45 +213,45 @@
|
|||||||
|
|
||||||
|
|
||||||
inline fastcall int GetMouseSpeed() {
|
inline fastcall int GetMouseSpeed() {
|
||||||
$mov eax,18
|
EAX = 18;
|
||||||
$mov ebx,19
|
EBX = 19;
|
||||||
$mov ecx,0
|
ECX = 0;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fastcall void SetMouseSpeed(EDX) {
|
inline fastcall void SetMouseSpeed(EDX) {
|
||||||
$mov eax,18
|
EAX = 18;
|
||||||
$mov ebx,19
|
EBX = 19;
|
||||||
$mov ecx,1
|
ECX = 1;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fastcall int GetMouseAcceleration() {
|
inline fastcall int GetMouseAcceleration() {
|
||||||
$mov eax,18
|
EAX = 18;
|
||||||
$mov ebx,19
|
EBX = 19;
|
||||||
$mov ecx,2
|
ECX = 2;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fastcall void SetMouseAcceleration(EDX) {
|
inline fastcall void SetMouseAcceleration(EDX) {
|
||||||
$mov eax,18
|
EAX = 18;
|
||||||
$mov ebx,19
|
EBX = 19;
|
||||||
$mov ecx,3
|
ECX = 3;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fastcall int GetMouseDoubleClickDelay() {
|
inline fastcall int GetMouseDoubleClickDelay() {
|
||||||
$mov eax,18
|
EAX = 18;
|
||||||
$mov ebx,19
|
EBX = 19;
|
||||||
$mov ecx,6
|
ECX = 6;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fastcall void SetMouseDoubleClickDelay(DL) {
|
inline fastcall void SetMouseDoubleClickDelay(DL) {
|
||||||
$mov eax,18
|
EAX = 18;
|
||||||
$mov ebx,19
|
EBX = 19;
|
||||||
$mov ecx,7
|
ECX = 7;
|
||||||
$int 0x40
|
$int 64
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
@ -51,7 +51,9 @@
|
|||||||
:checkbox madmouse = { MADMOUSE, NULL };
|
:checkbox madmouse = { MADMOUSE, NULL };
|
||||||
:checkbox com_mouse = { COMMOUSE, NULL };
|
:checkbox com_mouse = { COMMOUSE, NULL };
|
||||||
|
|
||||||
_ini ini = { "/sys/settings/system.ini", "loaded drivers" };
|
char ini_path[] = "/sys/settings/system.ini";
|
||||||
|
_ini ini_drivers = { #ini_path, "loaded drivers" };
|
||||||
|
_ini ini_mouse = { #ini_path, "mouse" };
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
proc_info Form;
|
proc_info Form;
|
||||||
@ -63,7 +65,7 @@ void main() {
|
|||||||
|
|
||||||
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
|
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
|
||||||
|
|
||||||
loop() switch(WaitEvent())
|
loop() switch(@WaitEvent())
|
||||||
{
|
{
|
||||||
case evMouse:
|
case evMouse:
|
||||||
mouse.get();
|
mouse.get();
|
||||||
@ -72,7 +74,7 @@ void main() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
CASE evButton:
|
CASE evButton:
|
||||||
id = GetButtonID();
|
id = @GetButtonID();
|
||||||
IF (1 == id) ExitApp();
|
IF (1 == id) ExitApp();
|
||||||
else IF (pointer_speed.click(id)) ApplyCfg();
|
else IF (pointer_speed.click(id)) ApplyCfg();
|
||||||
else IF (acceleration.click(id)) ApplyCfg();
|
else IF (acceleration.click(id)) ApplyCfg();
|
||||||
@ -93,9 +95,9 @@ void main() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case evKey:
|
case evKey:
|
||||||
GetKeys();
|
@GetKeyScancode();
|
||||||
IF (key_scancode == SCAN_CODE_ESC) ExitApp();
|
IF (AL == SCAN_CODE_ESC) ExitApp();
|
||||||
IF (key_scancode == SCAN_CODE_F10) EventClickComMouse();
|
IF (AL == SCAN_CODE_F10) EventClickComMouse();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case evReDraw:
|
case evReDraw:
|
||||||
@ -125,14 +127,14 @@ void main() {
|
|||||||
|
|
||||||
void DrawMouseImage(dword l,r,m,v) {
|
void DrawMouseImage(dword l,r,m,v) {
|
||||||
#define IMG_W 59
|
#define IMG_W 59
|
||||||
#define IMG_H 101
|
#define IMG_H 100
|
||||||
|
|
||||||
IF (l) pal.left = red;
|
IF (l) pal.left = red;
|
||||||
IF (m) pal.middle = red;
|
IF (m) pal.middle = red;
|
||||||
IF (r) pal.right = red;
|
IF (r) pal.right = red;
|
||||||
IF (v) pal.middle = yellow;
|
IF (v) pal.middle = yellow;
|
||||||
|
|
||||||
PutPaletteImage(#panels_img_data,IMG_W,IMG_H,18+30,18+15,8,#pal);
|
PutPaletteImage(#panels_img_data,IMG_W,IMG_H,18+30,18+16,8,#pal);
|
||||||
pal.left = pal.right = white;
|
pal.left = pal.right = white;
|
||||||
pal.middle = dgrey;
|
pal.middle = dgrey;
|
||||||
IF (v) {
|
IF (v) {
|
||||||
@ -153,23 +155,26 @@ void DrawControls() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LoadCfg() {
|
void LoadCfg() {
|
||||||
acceleration.value = GetMouseAcceleration();
|
acceleration.value = @GetMouseAcceleration();
|
||||||
pointer_speed.value = GetMouseSpeed();
|
pointer_speed.value = @GetMouseSpeed();
|
||||||
double_click_delay.value = GetMouseDoubleClickDelay();
|
double_click_delay.value = @GetMouseDoubleClickDelay();
|
||||||
com_mouse.checked = ini.GetInt("com_mouse", 0);
|
com_mouse.checked = ini_drivers.GetInt("com_mouse", 0);
|
||||||
madmouse.checked = CheckProcessExists("MADMOUSE");
|
madmouse.checked = CheckProcessExists("MADMOUSE");
|
||||||
emulation.checked = CheckProcessExists("MOUSEMUL");
|
emulation.checked = CheckProcessExists("MOUSEMUL");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExitApp() {
|
void ExitApp() {
|
||||||
ini.SetInt("com_mouse", com_mouse.checked);
|
ini_drivers.SetInt("com_mouse", com_mouse.checked);
|
||||||
ExitProcess();
|
ini_mouse.SetInt("speed", pointer_speed.value);
|
||||||
|
ini_mouse.SetInt("acceleration", acceleration.value);
|
||||||
|
ini_mouse.SetInt("double_click_delay", double_click_delay.value);
|
||||||
|
@ExitProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplyCfg() {
|
void ApplyCfg() {
|
||||||
SetMouseSpeed(pointer_speed.value);
|
@SetMouseSpeed(pointer_speed.value);
|
||||||
SetMouseAcceleration(acceleration.value);
|
@SetMouseAcceleration(acceleration.value);
|
||||||
SetMouseDoubleClickDelay(double_click_delay.value);
|
@SetMouseDoubleClickDelay(double_click_delay.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventClickComMouse()
|
void EventClickComMouse()
|
||||||
@ -179,13 +184,10 @@ void EventClickComMouse()
|
|||||||
if (RunProgram("/sys/loaddrv", "COMMOUSE")>=0) {
|
if (RunProgram("/sys/loaddrv", "COMMOUSE")>=0) {
|
||||||
notify(COMMOUSE_LOADED);
|
notify(COMMOUSE_LOADED);
|
||||||
com_mouse.click(com_mouse.id);
|
com_mouse.click(com_mouse.id);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
notify("'Error running LOADDRV' -E");
|
notify("'Error running LOADDRV' -E");
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
notify(COMMOUSE_CAN_NOT_UNLOAD);
|
notify(COMMOUSE_CAN_NOT_UNLOAD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user