From 4315ff65202219e09da79ec6e83c5e7df7966237 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 6 Sep 2015 12:34:30 +0000 Subject: [PATCH] CMM: minor fixes git-svn-id: svn://kolibrios.org@5811 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/browser/WebView.c | 8 ++--- programs/cmm/browser/menu.h | 34 ++++++++++------------ programs/cmm/eolite/Eolite.c | 4 +-- programs/cmm/eolite/include/menu.h | 4 +-- programs/cmm/eolite/include/translations.h | 4 +-- programs/cmm/lib/obj/iconv.h | 4 +-- 6 files changed, 28 insertions(+), 30 deletions(-) diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 775fb3c030..44aa183f5b 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -25,14 +25,14 @@ char homepage[] = FROM "html\\homepage.htm"; #ifdef LANG_RUS - char version[]=" Текстовый браузер 1.39"; + char version[]=" Текстовый браузер 1.40"; ?define IMAGES_CACHE_CLEARED "Кэш картинок очищен" ?define T_LAST_SLIDE "Это последний слайд" char loading[] = "Загрузка страницы...
"; char page_not_found[] = FROM "html\page_not_found_ru.htm"; char accept_language[]= "Accept-Language: ru\n"; #else - char version[]=" Text-based Browser 1.39"; + char version[]=" Text-based Browser 1.40"; ?define IMAGES_CACHE_CLEARED "Images cache cleared" ?define T_LAST_SLIDE "This slide is the last" char loading[] = "Loading...
"; @@ -161,8 +161,8 @@ void main() DefineAndDrawWindow(GetScreenWidth()-800/2,GetScreenHeight()-600/2,800,600,0x73,col_bg,0,0); GetProcessInfo(#Form, SelfInfo); if (Form.status_window>2) { DrawTitle(#header); break; } - if (Form.height<120) MoveSize(OLD,OLD,OLD,120); - if (Form.width<280) MoveSize(OLD,OLD,280,OLD); + if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; } + if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; } Draw_Window(); break; diff --git a/programs/cmm/browser/menu.h b/programs/cmm/browser/menu.h index 421afa0394..a7a29c5b52 100644 --- a/programs/cmm/browser/menu.h +++ b/programs/cmm/browser/menu.h @@ -21,7 +21,6 @@ llist menu; void menu_rmb() { proc_info MenuForm; - int key; menu.ClearList(); while (ITEMS_LIST[menu.count]) menu.count++; @@ -32,25 +31,24 @@ void menu_rmb() switch(WaitEvent()) { case evMouse: - GetProcessInfo(#MenuForm, SelfInfo); - if (!CheckActiveProcess(MenuForm.ID)) ExitProcess(); - - mouse.get(); - if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList(); - if (mouse.lkm)&&(mouse.up) ItemClick(); - break; + GetProcessInfo(#MenuForm, SelfInfo); + if (!CheckActiveProcess(MenuForm.ID)) ExitProcess(); + mouse.get(); + if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList(); + if (mouse.lkm)&&(mouse.up) ItemClick(); + break; - case evKey: - key = GetKey(); - if (key==27) ExitProcess(); - if (key==13) ItemClick(); - if (menu.ProcessKey(key)) DrawMenuList(); - break; + case evKey: + GetKeys(); + if (key_scancode==SCAN_CODE_ESC) ExitProcess(); + if (key_scancode==SCAN_CODE_ENTER) ItemClick(); + if (menu.ProcessKey(key_scancode)) DrawMenuList(); + break; - case evReDraw: - DefineAndDrawWindow(Form.left+mouse.x-6,Form.top+mouse.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF); - DrawPopup(0,0,menu.w,menu.h+3,0, col_bg,border_color); - DrawMenuList(); + case evReDraw: + DefineAndDrawWindow(Form.left+mouse.x-6,Form.top+mouse.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF); + DrawPopup(0,0,menu.w,menu.h+3,0, col_bg,border_color); + DrawMenuList(); } goto _BEGIN_APPLICATION_MENU; } diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 32f1b5c74a..ab119d0eaa 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -531,8 +531,8 @@ void draw_window() DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,system.color.work,TITLE,0); GetProcessInfo(#Form, SelfInfo); if (Form.status_window>2) return; - if (Form.height < 350) MoveSize(OLD,OLD,OLD,350); - if (Form.width < 480) MoveSize(OLD,OLD,480,OLD); + if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; } + if (Form.width < 480) { MoveSize(OLD,OLD,480,OLD); return; } GetProcessInfo(#Form, SelfInfo); //if win_size changed PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal); DrawBar(127, 8, 1, 25, system.color.work_graph); diff --git a/programs/cmm/eolite/include/menu.h b/programs/cmm/eolite/include/menu.h index 183dbee1d7..e827a74355 100644 --- a/programs/cmm/eolite/include/menu.h +++ b/programs/cmm/eolite/include/menu.h @@ -79,8 +79,8 @@ void FileMenu() case evKey: GetKeys(); - if (key_scancode==SCAN_CODE_ESC){cmd_free=1;ExitProcess();} - else if (key_scancode == SCAN_CODE_ENTER) {action_buf = cur_action_buf; cmd_free=1; ExitProcess(); } + if (key_scancode == SCAN_CODE_ESC) {cmd_free=1;ExitProcess();} + if (key_scancode == SCAN_CODE_ENTER) {action_buf = cur_action_buf; cmd_free=1; ExitProcess(); } if (menu.ProcessKey(key_scancode)) MenuListRedraw(); break; diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 45305a031c..b9879c3cf2 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager v3.2" -#define ABOUT_TITLE "Eolite 3.2" +#define TITLE "Eolite File Manager v3.21" +#define ABOUT_TITLE "Eolite 3.21" #ifdef LANG_RUS ?define T_FILE "Файл" diff --git a/programs/cmm/lib/obj/iconv.h b/programs/cmm/lib/obj/iconv.h index b13c1184f5..48fb30f8d6 100644 --- a/programs/cmm/lib/obj/iconv.h +++ b/programs/cmm/lib/obj/iconv.h @@ -58,7 +58,7 @@ dword ChangeCharset(dword from_chs, to_chs, conv_buf) :int cur_charset; -:char *charsets[] = { " ", "UTF-8", "KOI8-RU", "CP1251", "CP1252", "ISO8859-5", "CP866" }; -enum { CH_NULL, CH_UTF8, CH_KOI8, CH_CP1251, CH_CP1252, CH_ISO8859_5, CH_CP866 }; +:char *charsets[] = { "UTF-8", "KOI8-RU", "CP1251", "CP1252", "ISO8859-5", "CP866", 0 }; +enum { CH_UTF8, CH_KOI8, CH_CP1251, CH_CP1252, CH_ISO8859_5, CH_CP866, CH_NULL }; #endif \ No newline at end of file