From 917b096afd88b4e85db2ef953f9ed3155bef1134 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Wed, 13 Mar 2019 00:02:58 +0000 Subject: [PATCH] Eolite: disalow textbox data editing in Properties window software_widget: improve usability at small screens games.ini: fix Ataka path git-svn-id: svn://kolibrios.org@7605 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/settings/games.ini | 2 +- data/rus/settings/games.ini | 2 +- programs/cmm/eolite/include/properties.h | 7 +++- programs/cmm/eolite/include/translations.h | 4 +- .../cmm/software_widget/software_widget.c | 40 ++++++++++++++----- 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/data/common/settings/games.ini b/data/common/settings/games.ini index 29731e52b2..af1e5a9058 100644 --- a/data/common/settings/games.ini +++ b/data/common/settings/games.ini @@ -33,7 +33,7 @@ Almaz=/k/games/almaz,81 Tanks=games/tanks,67 RocketForces=games/rforces,110 Pig=/k/games/pig/pigex -; Ataka=games/ataka ;rus only +; Ataka=games/ataka,35 ;rus only Donkey=/k/games/donkey Loderunner=/k/games/LRL/LRL,41 ; 21days=/k/games/21days,104 ;rus only diff --git a/data/rus/settings/games.ini b/data/rus/settings/games.ini index 1b212d6781..136200873e 100644 --- a/data/rus/settings/games.ini +++ b/data/rus/settings/games.ini @@ -33,7 +33,7 @@ Almaz=/k/games/almaz,81 Tanks=games/tanks,67 RocketForces=games/rforces,110 Pig=/k/games/pig/pigex -Ataka=games/ataka ;rus only +Ataka=games/ataka,35 ;rus only Donkey=/k/games/donkey Loderunner=/k/games/LRL/LRL,41 21days=/k/games/21days,104 ;rus only diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 931f96d071..ed42141553 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -250,8 +250,11 @@ void properties_dialog() break; default: - edit_box_key stdcall(#file_name_ed); - edit_box_key stdcall(#path_to_file_ed); + if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) { + EAX = key_editbox; + edit_box_key stdcall(#file_name_ed); + edit_box_key stdcall(#path_to_file_ed); + } } break; diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 8bfc89dd34..ac86b25da1 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager 4.06" -#define ABOUT_TITLE "EOLITE 4.06" +#define TITLE "Eolite File Manager 4.07" +#define ABOUT_TITLE "EOLITE 4.07" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/software_widget/software_widget.c b/programs/cmm/software_widget/software_widget.c index b77f9cad48..f9bcb351c7 100644 --- a/programs/cmm/software_widget/software_widget.c +++ b/programs/cmm/software_widget/software_widget.c @@ -1,5 +1,5 @@ /* -SOFTWARE CENTER v2.81 +SOFTWARE CENTER v2.85 */ #define MEMSIZE 4096 * 15 @@ -31,6 +31,8 @@ int list_pos, char window_title[128], settings_ini_path[256] = "/sys/settings/"; +bool small_screen = false; + #define LIST_BACKGROUND_COLOR 0xF3F3F3 block ipos[128]; @@ -77,6 +79,12 @@ void main() DrawList(); window_height = row+1*list.item_h + list_pos + skin_height + 15; + if (window_height>screen.height) { + window_width = screen.width; + list.item_h -= 5; + window_height = row+1*list.item_h + list_pos + skin_height + 15; + small_screen = true; + } loop() switch(WaitEvent()) { @@ -98,13 +106,20 @@ void main() system.color.get(); DefineAndDrawWindow(screen.width-window_width/2,screen.height-window_height/2,window_width,window_height,0x74,system.color.work,"",0); GetProcessInfo(#Form, SelfInfo); - if (Form.status_window>2) { DrawTitle(#window_title); break; } else DrawTitle(""); - draw_top_bar(); + if (Form.status_window>2) { + DrawTitle(#window_title); + break; + } + if (small_screen) { + DrawTitle(#window_title); + list.y = 0; + } else { + DrawTitle(NULL); + draw_top_bar(); + } DrawList(); DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, LIST_BACKGROUND_COLOR); - //if (list.cur_y == list.count) - DrawSelection(); - break; + DrawSelection(); } } @@ -170,11 +185,14 @@ byte process_sections(dword sec_name, f_name) } col = 0; old_row = row; - DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR); - text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, LIST_BACKGROUND_COLOR, 0, 15, sec_name); - DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC); - DrawBar(text_len+20, row * list.item_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC); - list_pos += 29; + + if (!small_screen) { + DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR); + text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, LIST_BACKGROUND_COLOR, 0, 15, sec_name); + DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC); + DrawBar(text_len+20, row * list.item_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC); + list_pos += 29; + } ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); return true; }