From 861d24c21aadbb0fead7637fe85ce22f4b79b61a Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 4 Jul 2021 17:27:35 +0000 Subject: [PATCH] various bugfixes git-svn-id: svn://kolibrios.org@8996 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/browser/history.h | 2 ++ programs/cmm/eolite/Eolite.c | 6 +++--- programs/cmm/eolite/include/left_panel.h | 2 +- programs/cmm/lib/gui/text_view_area.h | 12 ++++++------ programs/cmm/misc/osupdate.c | 8 +------- programs/system/colrdial/color_dialog.asm | 16 +++++++--------- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/programs/cmm/browser/history.h b/programs/cmm/browser/history.h index 21e2bfa1b7..ae78235674 100644 --- a/programs/cmm/browser/history.h +++ b/programs/cmm/browser/history.h @@ -20,6 +20,7 @@ ShowHistory() strcat(history_pointer, "
"); } + /* strcat(history_pointer, "
Cached images
"); for (i=1; i
"); } + */ LoadInternalPage(history_pointer, strlen(history_pointer)); free(history_pointer); diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 21ebcf5a93..d871e4c148 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -8,9 +8,9 @@ TODO: - 70.5 - get volume info and label */ -#define ABOUT_TITLE "EOLITE 5.01 Gold" -#define TITLE_EOLITE "Eolite File Manager 5.01 Gold" -#define TITLE_KFM "Kolibri File Manager 2.01 Gold"; +#define ABOUT_TITLE "EOLITE 5.02 Gold" +#define TITLE_EOLITE "Eolite File Manager 5.02 Gold" +#define TITLE_KFM "Kolibri File Manager 2.02 Gold"; #define MEMSIZE 1024 * 250 #include "../lib/clipboard.h" diff --git a/programs/cmm/eolite/include/left_panel.h b/programs/cmm/eolite/include/left_panel.h index 55b6e54f9f..e8beca49eb 100644 --- a/programs/cmm/eolite/include/left_panel.h +++ b/programs/cmm/eolite/include/left_panel.h @@ -136,7 +136,7 @@ void _SystemDiscs::DrawOptions(int draw_x) int optionsy = SELECTY+KFM2_DEVH+1; char dev_name[15], disc_name[100], i, dev_icon, is_active=0; - for (i=0; i<30; i++) DeleteButton(100+i); + SystemDiscs.Get(); DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.work_graph); diff --git a/programs/cmm/lib/gui/text_view_area.h b/programs/cmm/lib/gui/text_view_area.h index c1571bb80b..5954078b60 100644 --- a/programs/cmm/lib/gui/text_view_area.h +++ b/programs/cmm/lib/gui/text_view_area.h @@ -8,7 +8,7 @@ TODO: scroll { dword write_start; dword buf_end; - int line_h = 15; + #define LINE_H 17 int label_length_max; int write_length; bool end_found; @@ -19,9 +19,9 @@ TODO: scroll loop() { - if (bg_col!=-1) DrawBar(x, y, w+1, line_h, bg_col); + if (bg_col!=-1) DrawBar(x, y, w+1, LINE_H, bg_col); end_found = false; - write_length = strchr(write_start, '\n') - write_start; //search normal line break + write_length = strchr(write_start, '\n') - write_start +1; //search normal line break if (write_length > label_length_max) || (write_length<=0) //check its position: exceeds maximum line length or not found { if (buf_end - write_start < label_length_max) //check does current line the last @@ -46,9 +46,9 @@ TODO: scroll // WriteTextB(-write_start+buf_start+editpos * 8 + x - 5 +1, y, 0x90, 0xFF0000, "|"); // } write_start += write_length + 1; - y += line_h; + y += LINE_H; if (write_start >= buf_end) break; } - if (bg_col!=-1) DrawBar(x,y,w+1,h-y+line_h-4,bg_col); - return y+line_h; + if (bg_col!=-1) DrawBar(x,y,w+1,h-y+LINE_H-4,bg_col); + return y+LINE_H; } diff --git a/programs/cmm/misc/osupdate.c b/programs/cmm/misc/osupdate.c index af95ca97e5..70a37199aa 100644 --- a/programs/cmm/misc/osupdate.c +++ b/programs/cmm/misc/osupdate.c @@ -28,7 +28,6 @@ _http http; #define T_EXIT "室" #define IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img" #define KS "࠭ ன" -#define RA "१ ணࠬ" #else #define T_WINDOW_TITLE "KolibriOS Online Updater" #define T_TITLE_H1 "ONLINE UPDATE" @@ -40,20 +39,18 @@ Note that all changes on RAM-disk will be lost."; #define T_EXIT "Exit" #define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img" #define KS "Keep settings folder" -#define RA "Restart all apps" #endif char accept_language[]="en"; //not used, necessary for http.get() void Operation_Draw_Progress(dword f) {} //not used, necessary for copyf() checkbox keep_settings = { KS, true }; -checkbox restart_apps = { RA, true }; void main() { int btn; sensor progress; load_dll(libimg, #libimg_init,1); - load_dll(libHTTP, #http_lib_init,1); + load_dll(libHTTP, #http_lib_init,1); @SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_STACK); loop() switch(@WaitEventTimeout(300)) { @@ -62,7 +59,6 @@ void main() if (btn<=2) ExitProcess(); if (btn==9) goto _INSTALL; keep_settings.click(btn); - restart_apps.click(btn); break; case evKey: @@ -90,7 +86,6 @@ void main() if (http.transfer<=0) { DrawCaptButton(WINW-110/2, WINH-70, 110, 28, 9, 0x0092D8, 0xFFFfff, T_INSTALL); keep_settings.draw(30, WINH - 210); - restart_apps.draw(30, WINH - 185); } } else { DrawIcon32(WINW-32/2, 140, sc.work, 49); @@ -181,7 +176,6 @@ void EventDownloadComplete() copyf("/sys", #backup); copyf(#latest, "/sys"); if (keep_settings.checked) copyf(#backup_settings, "/sys/settings"); - if (restart_apps.checked) RestartAllProcess(); install_complete = true; } } diff --git a/programs/system/colrdial/color_dialog.asm b/programs/system/colrdial/color_dialog.asm index 559837d8c2..d8f853303e 100644 --- a/programs/system/colrdial/color_dialog.asm +++ b/programs/system/colrdial/color_dialog.asm @@ -156,8 +156,6 @@ load_libraries l_libs_start,end_l_libs align 4 red: call draw_window - ;mov ah,0 - ;jmp button.history_click ;--------------------------------------------------------------------- align 4 still: @@ -198,7 +196,7 @@ button: sub ah,30 -.history_click: + ;click on a colors History movzx eax,ah shl eax,2 add eax,[communication_area] @@ -656,7 +654,7 @@ popad endp ;--------------------------------------------------------------------- ;input: -; buf - pointer hexadecimal string +; buf - pointer to a hexadecimal string ;output: ; eax - number align 4 @@ -665,7 +663,7 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword xor ebx,ebx mov esi,[buf] - .cycle_16: ;считывание 16-ричных цифр + .cycle_16: mov bl,byte[esi] cmp bl,'0' jl @f @@ -674,13 +672,13 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword cmp bl,'9' jle .us1 cmp bl,'A' - jl @f ;отсеиваем символы >'9' и <'A' + jl @f ;skip the chars not in between '9' and 'A' .us1: ;составное условие cmp bl,'F' jle .us2 cmp bl,'a' - jl @f ;отсеиваем символы >'F' и <'a' - sub bl,32 ;переводим символы в верхний регистр, для упрощения их последущей обработки + jl @f ;skip the chars not in between 'F' and 'a' + sub bl,32 ;convert symbols to uppercase for convenience .us2: ;составное условие sub bl,'0' cmp bl,9 @@ -692,7 +690,7 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword inc esi jmp .cycle_16 @@: - cmp ecx,0 ;если число отрицательное + cmp ecx,0 ;if the number is negative jne @f sub ecx,eax mov eax,ecx