diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 62de1a3252..9d296d7a3f 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -235,13 +235,24 @@ void main() mouse.get(); ProceedMouseGestures(); + + GetKeyModifier(); + if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) + if (mouse.key&MOUSE_LEFT) && (mouse.up) { + files.ProcessMouse(mouse.x, mouse.y); + EventChooseFile(files.cur_y); + List_ReDraw(); + break; + } if (files.MouseOver(mouse.x, mouse.y)) { //select file if (mouse.key&MOUSE_LEFT) && (mouse.up) { - if (files.ProcessMouse(mouse.x, mouse.y)) List_ReDraw(); else { + if (files.ProcessMouse(mouse.x, mouse.y)) { + List_ReDraw(); + } else { if (mouse.y - files.y / files.item_h + files.first == files.cur_y) Open(0); } } @@ -405,6 +416,18 @@ void main() break; } + if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) { + if (key_scancode == SCAN_CODE_DOWN) { + EventChooseFile(files.cur_y); + files.KeyDown(); + } else if (key_scancode == SCAN_CODE_UP) { + EventChooseFile(files.cur_y); + files.KeyUp(); + } else break; + List_ReDraw(); + break; + } + if (files.ProcessKey(key_scancode)) { List_ReDraw(); @@ -489,11 +512,9 @@ void main() Del_Form(); break; case SCAN_CODE_INS: - if (getElementSelectedFlag(files.cur_y) == true) setElementSelectedFlag(files.cur_y, false); - else setElementSelectedFlag(files.cur_y, true); + EventChooseFile(files.cur_y); files.KeyDown(); List_ReDraw(); - DrawStatusBar(); break; case SCAN_CODE_F1...SCAN_CODE_F10: FnProcess(key_scancode-58); @@ -1314,4 +1335,14 @@ char line_param[4096+5]; } } +void EventChooseFile(int _id) +{ + if (getElementSelectedFlag(_id) == true) { + setElementSelectedFlag(_id, false); + } else { + setElementSelectedFlag(_id, true); + } + DrawStatusBar(); +} + stop: diff --git a/programs/cmm/eolite/imgs/dev.raw b/programs/cmm/eolite/imgs/dev.raw index bf5f75d732..c9d61c2f5e 100644 Binary files a/programs/cmm/eolite/imgs/dev.raw and b/programs/cmm/eolite/imgs/dev.raw differ diff --git a/programs/cmm/eolite/imgs/png/dev.png b/programs/cmm/eolite/imgs/png/dev.png index 81887115ed..638cac172f 100644 Binary files a/programs/cmm/eolite/imgs/png/dev.png and b/programs/cmm/eolite/imgs/png/dev.png differ diff --git a/programs/cmm/eolite/include/about.h b/programs/cmm/eolite/include/about.h index d4cff6fbc3..94200e3098 100644 --- a/programs/cmm/eolite/include/about.h +++ b/programs/cmm/eolite/include/about.h @@ -43,7 +43,7 @@ void about_dialog() WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE); WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE); DrawRectangle3D(0,154,about_form.cwidth,1,sc.work_dark,sc.work_light); - WriteTextLines(7,163,0x90,sc.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2019",20); + WriteTextLines(7,163,0x90,sc.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2020",20); #ifdef LANG_RUS DrawStandartCaptButton(60,about_form.cheight-38,11,"€бв®аЁп а §а Ў®вЄЁ"); #endif diff --git a/programs/cmm/eolite/include/left_panel.h b/programs/cmm/eolite/include/left_panel.h index c0b43345cb..0e8bd79fb8 100644 --- a/programs/cmm/eolite/include/left_panel.h +++ b/programs/cmm/eolite/include/left_panel.h @@ -46,47 +46,48 @@ struct _SystemDiscs void Click(); } SystemDiscs=0; +#define DEV_H 17 +#define DEV_H_HOR 21 void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name) { switch(disk_first_letter) { - case 'k': - ESBYTE[dev_icon]=0; - strcpy(disc_name, T_PROG); - break; case 'r': ESBYTE[dev_icon]=0; strcpy(disc_name, T_SYS); break; - case 'c': + case 'k': ESBYTE[dev_icon]=1; - strcpy(disc_name, T_CD); + strcpy(disc_name, T_PROG); break; case 'f': ESBYTE[dev_icon]=2; strcpy(disc_name, T_FD); break; + case 'c': + ESBYTE[dev_icon]=3; + strcpy(disc_name, T_CD); + break; case 'h': case 'b': - ESBYTE[dev_icon]=3; + ESBYTE[dev_icon]=4; strcpy(disc_name, T_HD); break; case 's': - ESBYTE[dev_icon]=3; + ESBYTE[dev_icon]=4; strcpy(disc_name, T_SATA); break; - case 'u': - ESBYTE[dev_icon]=5; - strcpy(disc_name, T_USB); - break; case 't': - ESBYTE[dev_icon]=4; + ESBYTE[dev_icon]=5; strcpy(disc_name, T_RAM); break; + case 'u': + ESBYTE[dev_icon]=6; + strcpy(disc_name, T_USB); + break; default: - ESBYTE[dev_icon]=3; - strcpy(disc_name, T_UNC); + ESBYTE[dev_icon]=5; } } @@ -126,12 +127,12 @@ void _SystemDiscs::Get() void _SystemDiscs::Draw() { char dev_name[15], disc_name[100], i, dev_icon, is_active, name_len; - int draw_y, draw_x, draw_h; + int draw_y, draw_x; for (i=0; i<30; i++) DeleteButton(100+i); - if ( two_panels.checked) { draw_y = 41; draw_x = 2; draw_h = 21; } - if (!two_panels.checked) { draw_y = 74; draw_x = 17; draw_h = 16; } + if ( two_panels.checked) { draw_y = 41; draw_x = 2; } + if (!two_panels.checked) { draw_y = 74; draw_x = 17; } for (i=0;i=Form.cwidth-100) && (Form.cwidth) { - DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF); + DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF); draw_x = 2; - draw_y += draw_h; + draw_y += DEV_H_HOR; } } else { - DrawBar(draw_x,draw_y,6,draw_h+1,0xFFFFFF); - DrawBar(draw_x+6+18,draw_y,160-6-18,draw_h+1,0xFFFFFF); + DrawBar(draw_x,draw_y,6,DEV_H+1,0xFFFFFF); + DrawBar(draw_x+6+18,draw_y,160-6-18,DEV_H+1,0xFFFFFF); DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF); if (show_dev_name.checked) { @@ -166,16 +167,18 @@ void _SystemDiscs::Draw() if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#dev_name); WriteText(draw_x+29,draw_y+5,0x80,0,#dev_name); } - _PutImage(draw_x+6,draw_y, 18,17, is_active*6+dev_icon*17*18*3+#devices); - draw_y += draw_h; + _PutImage(draw_x+6,draw_y, 18,17, is_active*7+dev_icon*17*18*3+#devices); + draw_y += DEV_H; } } if (two_panels.checked) { - DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF); + DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, DEV_H_HOR, 0xFFFFFF); DefineButton(Form.cwidth - 23, draw_y+2, 17,16, 60+BT_HIDE, 0xCCCccc); _PutImage(Form.cwidth - 21, draw_y+4, 14,13, 2*14*13*3+#factions); - files.y = draw_y + draw_h + 17; + files.y = draw_y + DEV_H_HOR + 17; + } else { + DrawBar(draw_x+6, draw_y, 18, 1, 0xFFFfff); } } @@ -225,12 +228,12 @@ void Tip(int y, dword caption, id, arrow) void ActionsDraw() { int i; - int actions_y= SystemDiscs.list.count*16+108, lineh=16; + int actions_y= SystemDiscs.list.count*DEV_H+108; Tip(actions_y-18, T_ACTIONS, 77, ""); //заголовок - for (i=0; actions[i*3]!=0; i++, actions_y+=lineh) + for (i=0; actions[i*3]!=0; i++, actions_y+=DEV_H) { - DrawBar(17,actions_y,160,lineh,0xFFFFFF); //белое - DefineButton(17,actions_y,159,lineh,actions[i*3]+BT_HIDE,0xE4DFE1); + DrawBar(17,actions_y,160,DEV_H,0xFFFFFF); //белое + DefineButton(17,actions_y,159,DEV_H,actions[i*3]+BT_HIDE,0xE4DFE1); WriteText(45,actions_y+4,0x80,0,actions[i*3+1]); WriteText(-strlen(actions[i*3+2])*6+170,actions_y+4,0x80,0x999999,actions[i*3+2]); _PutImage(23,actions_y+2, 14,13, i*14*13*3+#factions); @@ -239,8 +242,8 @@ void ActionsDraw() void DrawLeftPanelBg() { - int actions_y = SystemDiscs.list.count*16; - int start_y = actions_y+156; + int actions_y = SystemDiscs.list.count*DEV_H; + int start_y = actions_y+159; int area_h; DrawBar(2,41,190,15,col.lpanel); //синий прямоугольник - над девайсами DrawBar(17,actions_y+75,160,15,col.lpanel); //синий прямоугольник - под девайсами diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 7d2ffca9f2..cdb52b2e14 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.3" -#define ABOUT_TITLE "EOLITE 4.3" +#define TITLE "Eolite File Manager 4.35" +#define ABOUT_TITLE "EOLITE 4.35" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/kf_font_viewer/font_viewer.c b/programs/cmm/kf_font_viewer/font_viewer.c index 0367c462ea..7c6bdd9290 100644 --- a/programs/cmm/kf_font_viewer/font_viewer.c +++ b/programs/cmm/kf_font_viewer/font_viewer.c @@ -4,7 +4,7 @@ #include "../lib/gui.h" #define PANELH 28 -#define WIN_W 490 +#define WIN_W 520 #define WIN_H 315 #define BASE_TAB_BUTTON_ID 97