diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index cccb001d40..d7d4b35837 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -80,7 +80,7 @@ int rand_n; byte CMD_REFRESH; //struct t_settings { -byte sort_num=2, +int sort_num=2, show_dev_name=true, real_files_names_case=false, info_after_copy=false, @@ -127,7 +127,7 @@ void main() fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini"; LoadIniSettings(); - GetSystemDiscs(); + SystemDiscs.Get(); SetAppColors(); if (param) { @@ -352,7 +352,7 @@ void main() FnProcess(id-50); break; case 100...120: - ClickOnDisk(id-100); + SystemDiscs.Click(id-100); break; } break; @@ -387,14 +387,14 @@ void main() { case 059...068: key_scancode -= 59; - if (key_scancode=Form.width-35) && (Form.width) { + DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 0xFFFFFF); + draw_x = 2; + draw_y += draw_h; } - else - { - if (is_active) WriteText(46+1,pos_y+5,0x80,0x555555,#dev_name); - WriteText(46,pos_y+5,0x80,0,#dev_name); - } - _PutImage(23,pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices); } else { - pos_y = 43; - name_len = strlen(#dev_name)-1*8; - DrawBar(pos_x, pos_y, name_len + 31, 17, 0xFFFFFF); - DefineButton(pos_x+2, pos_y, name_len + 27, 16, 100+i+BT_HIDE,0xFFFFFF); - _PutImage(pos_x + 5, pos_y, 18,17, is_active*6+dev_icon*17*18*3+#devices); - WriteText(pos_x + 24, pos_y+1, 10110000b, 0, #dev_name+1); - pos_x += name_len + 31; + DrawBar(draw_x,draw_y,6,draw_h+1,0xFFFFFF); + DrawBar(draw_x+6+18,draw_y,160-6-18,draw_h+1,0xFFFFFF); + DefineButton(draw_x,draw_y,159,16,100+i+BT_HIDE,0xFFFFFF); + if (show_dev_name) + { + strcat(#disc_name, #dev_name); + if (is_active) WriteText(draw_x+30,draw_y+5,0x80,0x555555,#disc_name); + WriteText(draw_x+29,draw_y+5,0x80,0,#disc_name); + } + else + { + 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; } } if (two_panels) { - DrawBar(pos_x, pos_y, Form.cwidth - pos_x - 2, 17, 0xFFFFFF); - DrawBar(2, pos_y-2, Form.cwidth - 4, 2, 0xFFFFFF); - DrawBar(2, pos_y+17, Form.cwidth - 4, 2, 0xFFFFFF); - DefineButton(Form.cwidth - 23, pos_y, 17,16, 60+BT_HIDE, 0xCCCccc); - _PutImage(Form.cwidth - 21, pos_y+2, 14,13, 2*14*13*3+#factions); + DrawBar(draw_x, draw_y, Form.cwidth - draw_x - 2, draw_h, 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; } } +void _SystemDiscs::Click(int n) +{ + strcpy(#path, list.get(n)); + files.KeyHome(); + Open_Dir(#path,WITH_REDRAW); +} + + + +void DrawDeviceAndActionsLeftPanel() +{ + Tip(56, T_DEVICES, 55, "="); + SystemDiscs.Draw(); + ActionsDraw(); + DrawLeftPanelBg(); +} + +void Tip(int y, dword caption, id, arrow) +{ + DrawBar(17,y,160,1,0xEFEDEE); + DrawFilledBar(17, y+1, 160, 16); + WriteText(25,y+5,0x80,system.color.work_text,caption); + if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button + WriteText(165,y+5,0x80,system.color.work_text,arrow); //arrow + DrawBar(17,y+17,160,1,system.color.work_graph); +} void ActionsDraw() { - int actions_y=disk_list.count*16+108, lineh=16; + int actions_y= SystemDiscs.list.count*16+108, lineh=16; Tip(actions_y-18, T_ACTIONS, 77, ""); //заголовок for (i=0; actions[i*3]!=0; i++, actions_y+=lineh) { @@ -209,10 +222,9 @@ void ActionsDraw() } } - void DrawLeftPanelBg() { - int actions_y=disk_list.count*16; + int actions_y = SystemDiscs.list.count*16; int start_y = actions_y+156; int onTop1; DrawBar(2,41,190,15,col_lpanel); //синий прямоугольник - над девайсами @@ -233,21 +245,4 @@ void DrawLeftPanelBg() } PutShadow(17,start_y,160,1,1,3); PutShadow(18,start_y+1,158,1,1,1); -} - - -void DrawDeviceAndActionsLeftPanel() -{ - Tip(56, T_DEVICES, 55, "="); - DrawSystemDiscs(); - ActionsDraw(); - DrawLeftPanelBg(); -} - - -void ClickOnDisk(int n) -{ - strcpy(#path, disk_list.get(n)); - files.KeyHome(); - Open_Dir(#path,WITH_REDRAW); } \ No newline at end of file diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 04ebd785af..163fcb7ef6 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.31" -#define ABOUT_TITLE "Eolite 3.31" +#define TITLE "Eolite File Manager v3.33" +#define ABOUT_TITLE "Eolite 3.33" #ifdef LANG_RUS ?define T_FILE "” ©«"