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:
Kirill Lipatov (Leency) 2020-05-27 15:19:19 +00:00
parent cb423ff821
commit e18f3d60f6
8 changed files with 63 additions and 61 deletions

View File

@ -175,7 +175,7 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
is_html = true;
if (!strstri(bufpointer, "<body")) {
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
is_html = false;
}

View File

@ -60,7 +60,7 @@ void main()
break;
case evButton:
@GetButtonID();
id = @GetButtonID();
if (id==1) ExitProcess();
if (id==BT_DELETE_LAST_SLOT) EventDeleteLastSlot();
if (id==BT_DELETE_ALL_SLOTS) EventDeleteAllSlots();

View File

@ -110,7 +110,7 @@ void _SystemDiscs::Get()
for (j1=0; j1<dev_disc_num; j1++;)
{
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"))
{

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager 4.35"
#define ABOUT_TITLE "EOLITE 4.35"
#define TITLE "Eolite File Manager 4.4"
#define ABOUT_TITLE "EOLITE 4.4"
#ifdef LANG_RUS
?define T_FILE "” ©«"

View File

@ -45,7 +45,7 @@
ECX = handle;
EAX = 37;
EBX = 5;
$int 0x40;
$int 64;
}
:dword MOUSE::hide()
{
@ -54,19 +54,19 @@
EAX = 68;
EBX = 12;
ECX = 32*32*4;
$int 0x40
$int 64
ECX = EAX;
_ = EAX;
} else ECX = _;
EAX = 37;
EBX = 4;
DX = 2;
$int 0x40;
$int 64;
handle = EAX;
ECX = EAX;
EAX = 37;
EBX = 5;
$int 0x40;
$int 64;
handle = EAX;
}
@ -79,7 +79,7 @@
EBX = 19;
ECX = 4;
EDX = (x<<16)+y;
$int 0x40
$int 64
//move = true;
}
if((key)||(lkm|mkm|pkm))&&(down|up|click|dblclick|move)
@ -89,7 +89,7 @@
EBX = 19;
ECX = key;
EDX = (x<<16)+y;
$int 0x40
$int 64
}
}
@ -97,7 +97,7 @@
{
EAX = 18;
EBX = 15;
$int 0x40
$int 64
}
//get new attributes MOUSE
@ -105,7 +105,7 @@
{
EAX = 37;
EBX = 1;
$int 0x40
$int 64
$mov ebx, eax
$shr eax, 16
$and ebx,0x0000FFFF
@ -115,7 +115,7 @@
if (y>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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -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);
}
}