From e18f3d60f6afdb0b9e30b8819215da39b24f5440 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Wed, 27 May 2020 15:19:19 +0000 Subject: [PATCH] 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 --- programs/cmm/TWB/TWB.c | 2 +- programs/cmm/clipview/clipview.c | 2 +- programs/cmm/eolite/include/left_panel.h | 2 +- programs/cmm/eolite/include/translations.h | 4 +- programs/cmm/lib/mouse.h | 68 ++++++++++----------- programs/cmm/mousecfg/mouse_image.png | Bin 1262 -> 1283 bytes programs/cmm/mousecfg/mouse_image.raw | Bin 5959 -> 5900 bytes programs/cmm/mousecfg/mousecfg.c | 46 +++++++------- 8 files changed, 63 insertions(+), 61 deletions(-) diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index 04fd27e3b7..69e04c50d2 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -175,7 +175,7 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){ is_html = true; if (!strstri(bufpointer, "6000) y-=65535; EAX = 37; EBX = 2; - $int 0x40 + $int 64 $mov ebx, eax $mov ecx, eax key = EAX; @@ -180,7 +180,7 @@ //scroll EAX = 37; EBX = 7; - $int 0x40 + $int 64 $mov ebx, eax $shr eax, 16 $and ebx,0x0000FFFF @@ -213,45 +213,45 @@ inline fastcall int GetMouseSpeed() { - $mov eax,18 - $mov ebx,19 - $mov ecx,0 - $int 0x40 + EAX = 18; + EBX = 19; + ECX = 0; + $int 64 } inline fastcall void SetMouseSpeed(EDX) { - $mov eax,18 - $mov ebx,19 - $mov ecx,1 - $int 0x40 + EAX = 18; + EBX = 19; + ECX = 1; + $int 64 } inline fastcall int GetMouseAcceleration() { - $mov eax,18 - $mov ebx,19 - $mov ecx,2 - $int 0x40 + EAX = 18; + EBX = 19; + ECX = 2; + $int 64 } inline fastcall void SetMouseAcceleration(EDX) { - $mov eax,18 - $mov ebx,19 - $mov ecx,3 - $int 0x40 + EAX = 18; + EBX = 19; + ECX = 3; + $int 64 } inline fastcall int GetMouseDoubleClickDelay() { - $mov eax,18 - $mov ebx,19 - $mov ecx,6 - $int 0x40 + EAX = 18; + EBX = 19; + ECX = 6; + $int 64 } inline fastcall void SetMouseDoubleClickDelay(DL) { - $mov eax,18 - $mov ebx,19 - $mov ecx,7 - $int 0x40 + EAX = 18; + EBX = 19; + ECX = 7; + $int 64 } #endif \ No newline at end of file diff --git a/programs/cmm/mousecfg/mouse_image.png b/programs/cmm/mousecfg/mouse_image.png index 93f872cc8bd7dafef7abf479d1bf923fa48e11b2..e838b457f4260abdab3670ad628861eea764992c 100644 GIT binary patch delta 480 zcmV<60U!SE34;od7Ybwu0{{R34@;W4qEJ`7OPcO?%6eX&MLHTF=e%t-)4>TsBhKt*JG9I z#@BxBr&eXCEhc*e%t;bisQY`Z*Rx4b3W z(WMXj#0O4y|JjZ$4Q9uJXDl5yJv;r8e@)L{ryW^(#?oQ;=gq;`()xpE?EX|+SohL} zr9lh9dY7gbSSqb=X^7SrOohd3tY>LlU_DFI6}G=Lm|cb}skXoLgoR;yOIx-V%yNoz z-w_Pc+QIC|;u`A+M#oygJmmZ@a|GA1sgrTxD&pvZ9Jo5@=%5_9KBVZr$kt8SO36C6 zW^j)1BJcV}hIM^oxat@O@L7!VPIZX3U9MX;9kQ*f61nZJ#UDj1uZ7+_zeAyv*8CSq W31lAWd0r*}0000mX&^Zsuv zv|M^g(uB%7>zKdrdE)MXaKdzcf^-0&H~<_L8_S3LgxV%{Ux#knM6X$7tg@?zU{S%w zMh?!Rk&G>LkVAPpYm}A?y~jVBf`dXI%P2TmnQAylRJAwSEW5F8BMwq*&mvkrwquvz ze;~zPYB5`3<({2`$E-m67DHBA`D0eOj`~)-el1qGZ~W}feydgRms$G1R=L||1$~#TgqPhm)0e)9rM^E_u^xy-V-*#1~Fa|Eu*ajl%kZM=b3& zy*vGpP48ca^(;MNX}8<^rZYCT_TUk_f4$Xa*1U9P$!Wn@>(cZFOS!cz4c6L%DYJNw zwJePbtYvAs!uFR&VJDX*(e{@fuuyDoY0dV6i=6D*Hv~hqdT?=Oc8@g#qhqz;GUWIz zGX&SMsgp6`Dq`<~47fUJ@1P90J|*kENY_o-S#)mA;27p$+4Xs*==yxP>KGmPH7G{Q zPSr)*F4ruZ4q4Y#iQIPA>_3GqucgjB`v9>ue*tfNWkp7?vW)-$002ovPDHLkV1hoG B<;DO2 diff --git a/programs/cmm/mousecfg/mouse_image.raw b/programs/cmm/mousecfg/mouse_image.raw index 23d9992dc161e3de29220657cd9f92298b06cfa1..3dc2ff1ea36c4c4ccf4fc68e6cffeb54d0975cfc 100644 GIT binary patch delta 11 ScmX@E*P}P_f#k-J&td=|Fa<~e delta 20 acmeCtJFYkRfSAVQ3t|#LEWAb{;|MVT diff --git a/programs/cmm/mousecfg/mousecfg.c b/programs/cmm/mousecfg/mousecfg.c index 9f71b95a09..2c9479df93 100644 --- a/programs/cmm/mousecfg/mousecfg.c +++ b/programs/cmm/mousecfg/mousecfg.c @@ -51,7 +51,9 @@ :checkbox madmouse = { MADMOUSE, 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() { proc_info Form; @@ -63,7 +65,7 @@ void main() { SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); - loop() switch(WaitEvent()) + loop() switch(@WaitEvent()) { case evMouse: mouse.get(); @@ -72,7 +74,7 @@ void main() { break; CASE evButton: - id = GetButtonID(); + id = @GetButtonID(); IF (1 == id) ExitApp(); else IF (pointer_speed.click(id)) ApplyCfg(); else IF (acceleration.click(id)) ApplyCfg(); @@ -93,9 +95,9 @@ void main() { break; case evKey: - GetKeys(); - IF (key_scancode == SCAN_CODE_ESC) ExitApp(); - IF (key_scancode == SCAN_CODE_F10) EventClickComMouse(); + @GetKeyScancode(); + IF (AL == SCAN_CODE_ESC) ExitApp(); + IF (AL == SCAN_CODE_F10) EventClickComMouse(); break; case evReDraw: @@ -125,14 +127,14 @@ void main() { void DrawMouseImage(dword l,r,m,v) { #define IMG_W 59 - #define IMG_H 101 + #define IMG_H 100 IF (l) pal.left = red; IF (m) pal.middle = red; IF (r) pal.right = red; 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.middle = dgrey; IF (v) { @@ -153,23 +155,26 @@ void DrawControls() { } void LoadCfg() { - acceleration.value = GetMouseAcceleration(); - pointer_speed.value = GetMouseSpeed(); - double_click_delay.value = GetMouseDoubleClickDelay(); - com_mouse.checked = ini.GetInt("com_mouse", 0); + acceleration.value = @GetMouseAcceleration(); + pointer_speed.value = @GetMouseSpeed(); + double_click_delay.value = @GetMouseDoubleClickDelay(); + com_mouse.checked = ini_drivers.GetInt("com_mouse", 0); madmouse.checked = CheckProcessExists("MADMOUSE"); emulation.checked = CheckProcessExists("MOUSEMUL"); } void ExitApp() { - ini.SetInt("com_mouse", com_mouse.checked); - ExitProcess(); + ini_drivers.SetInt("com_mouse", com_mouse.checked); + 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() { - SetMouseSpeed(pointer_speed.value); - SetMouseAcceleration(acceleration.value); - SetMouseDoubleClickDelay(double_click_delay.value); + @SetMouseSpeed(pointer_speed.value); + @SetMouseAcceleration(acceleration.value); + @SetMouseDoubleClickDelay(double_click_delay.value); } void EventClickComMouse() @@ -179,13 +184,10 @@ void EventClickComMouse() if (RunProgram("/sys/loaddrv", "COMMOUSE")>=0) { notify(COMMOUSE_LOADED); com_mouse.click(com_mouse.id); - } - else { + } else { notify("'Error running LOADDRV' -E"); } - } - else - { + } else { notify(COMMOUSE_CAN_NOT_UNLOAD); } }