Eolite 3.61: status bar optionaly; Show file names in original case;

git-svn-id: svn://kolibrios.org@6505 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2016-08-27 23:44:17 +00:00
parent b1adedb4a8
commit 8b2e98ff52
5 changed files with 34 additions and 19 deletions

View File

@ -1,5 +1,6 @@
[Config]
SelectionColor=148,174,206
ShowDeviceName=1
RealFileNamesCase=0
RealFileNamesCase=1
InfoAfterCopy=0
ShowStatusBar=1

View File

@ -97,10 +97,11 @@ byte CMD_REFRESH;
//struct t_settings {
char sort_num=2;
bool show_dev_name=true,
real_files_names_case=false,
real_files_names_case=true,
info_after_copy=false,
two_panels=false,
show_breadcrumb=false,
show_status_bar=true,
active_panel=1;
//} settings;
@ -425,7 +426,7 @@ void main()
selected_count++;
}
List_ReDraw();
DrawStatusBar();
if (show_status_bar) DrawStatusBar();
break;
case 022: //Ctrl+U - unselect all files
for (i=0; i<files.count; i++)
@ -435,7 +436,7 @@ void main()
}
selected_count = 0;
List_ReDraw();
DrawStatusBar();
if (show_status_bar) DrawStatusBar();
break;
}
break;
@ -454,7 +455,7 @@ void main()
if (!two_panels) break;
if (active_panel==1) active_panel=2; else active_panel=1;
ChangeActivePanel();
DrawStatusBar();
if (show_status_bar) DrawStatusBar();
break;
case 093: //menu
menu_call_mouse=0;
@ -480,7 +481,7 @@ void main()
_INSERT_END:
files.KeyDown();
List_ReDraw();
DrawStatusBar();
if (show_status_bar) DrawStatusBar();
break;
case 059...068: //F1-F10
FnProcess(key_scancode-58);
@ -563,7 +564,7 @@ void draw_window()
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
llist_copy(#files_active, #files);
strcpy(#active_path, #path);
DrawStatusBar();
if (show_status_bar) DrawStatusBar();
DrawFilePanels();
if (del_active) Del_Form();
if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
@ -598,7 +599,8 @@ void DrawFilePanels()
if (!two_panels)
{
DrawDeviceAndActionsLeftPanel();
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h);
if (show_status_bar) files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h);
else files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h);
DrawList();
Open_Dir(#path,ONLY_SHOW);
}
@ -616,25 +618,29 @@ void DrawFilePanels()
llist_copy(#files, #files_inactive);
strcpy(#path, #inactive_path);
col_selec = 0xCCCccc;
files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
if (show_status_bar) files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
else files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h);
DrawList();
Open_Dir(#path,WITH_REDRAW);
llist_copy(#files, #files_active);
strcpy(#path, #active_path);
col_selec = 0x94AECE;
files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
if (show_status_bar) files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
else files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h);
DrawList();
Open_Dir(#path,WITH_REDRAW);
}
if (active_panel==2)
{
files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
if (show_status_bar) files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
else files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h);
DrawList();
Open_Dir(#path,WITH_REDRAW);
llist_copy(#files, #files_active);
strcpy(#path, #active_path);
col_selec = 0x94AECE;
files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
if (show_status_bar) files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
else files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h);
DrawList();
Open_Dir(#path,WITH_REDRAW);
}
@ -785,12 +791,12 @@ void Open_Dir(dword dir_path, redraw){
if (files.count < files.visible) files.visible = files.count;
if (redraw!=ONLY_SHOW) Sorting();
list_full_redraw = true;
if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
if (redraw!=ONLY_OPEN)&&(!_not_draw) {if (show_status_bar) DrawStatusBar(); List_ReDraw();}
}
if (files.count==-1) && (redraw!=ONLY_OPEN)
{
files.KeyHome();
if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
if(!_not_draw) { list_full_redraw=true; if (show_status_bar) DrawStatusBar(); List_ReDraw(); }
}
SetCurDir(dir_path);
}

View File

@ -232,14 +232,16 @@ void DrawLeftPanelBg()
PutShadow(18,actions_y+75+1,158,1,1,1);
DrawBar(2,56,15,actions_y+103,col_lpanel); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
DrawBar(177,56,15,actions_y+103,col_lpanel); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
onTop1 = Form.cheight-start_y-2-16;
onTop1 = Form.cheight-start_y-2;
if (onTop1 < 268)
{
if (show_status_bar) onTop1 = Form.cheight-start_y-2-16;
PutPaletteImage(#blue_hl, 190, onTop1, 2, start_y, 8, #blue_hl_pal);
}
else
{
DrawBar(2,start_y,190, onTop1-268, col_lpanel);
if (show_status_bar) onTop1 = Form.cheight-start_y-2-16;
PutPaletteImage(#blue_hl, 190, 268, 2, Form.cheight-270, 8, #blue_hl_pal);
}
PutShadow(17,start_y,160,1,1,3);

View File

@ -3,6 +3,7 @@
?define TITLE_SETT "<EFBFBD> áâனª¨"
?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
?define SHOW_REAL_NAMES "<EFBFBD>®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
?define SHOW_STATUS_BAR "<EFBFBD>®ª §ë¢ âì áâ âãá ¡ à"
?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
?define SHOW_BREADCRUMBS "ˆá¯®«ì§®¢ âì 'å«¥¡­ë¥ ªà®èª¨'"
?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
@ -16,6 +17,7 @@
?define TITLE_SETT "Settings"
?define SHOW_DEVICE_CLASS "Show device class name"
?define SHOW_REAL_NAMES "Show file names in original case"
?define SHOW_STATUS_BAR "Show status bar"
?define NOTIFY_COPY_END "Notify when copying finished"
?define SHOW_BREADCRUMBS "Show breadcrumbs"
?define USE_TWO_PANELS "Two panels"
@ -75,6 +77,7 @@ void settings_dialog()
else if (id==32) show_breadcrumb ^= true;
else if (id==25) { files.item_h++; files_active.item_h = files_inactive.item_h = files.item_h; }
else if (id==26) && (files.item_h>15) files_inactive.item_h = files.item_h = files.item_h-1;
else if (id==27) show_status_bar ^= 1;
else if (id==30) { label.size.pt++; IF(!label.changeSIZE()) label.size.pt--; BigFontsChange(); }
else if (id==31) { label.size.pt--; IF(!label.changeSIZE()) label.size.pt++; BigFontsChange(); }
EventRedrawWindow(Form.left,Form.top);
@ -88,7 +91,7 @@ void settings_dialog()
break;
case evReDraw:
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 376, 332+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 376, 357+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
DrawSettingsCheckBoxes();
}
}
@ -109,6 +112,7 @@ void DrawSettingsCheckBoxes()
y.n = 0;
CheckBox(x, y.inc(14), 20, SHOW_DEVICE_CLASS, show_dev_name);
CheckBox(x, y.inc(25), 21, SHOW_REAL_NAMES, real_files_names_case);
CheckBox(x, y.inc(25), 27, SHOW_STATUS_BAR, show_status_bar);
CheckBox(x, y.inc(25), 22, NOTIFY_COPY_END, info_after_copy);
CheckBox(x, y.inc(25), 32, SHOW_BREADCRUMBS, show_breadcrumb);
CheckBox(x, y.inc(25), 24, USE_TWO_PANELS, two_panels);
@ -130,7 +134,8 @@ void LoadIniSettings()
FileShow.font_size_x = files.font_w;
FileShow.font_number = 0;
ini_get_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", 1); show_dev_name = EAX;
ini_get_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", 0); real_files_names_case = EAX;
ini_get_int stdcall (eolite_ini_path, #config_section, "ShowStatusBar", 1); show_status_bar = EAX;
ini_get_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", 1); real_files_names_case = EAX;
ini_get_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", 0); info_after_copy = EAX;
ini_get_int stdcall (eolite_ini_path, #config_section, "FontSize", 12); label.size.pt = EAX;
ini_get_int stdcall (eolite_ini_path, #config_section, "TwoPanels", 0); two_panels = EAX;
@ -154,6 +159,7 @@ void LoadIniSettings()
void SaveIniSettings()
{
ini_set_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", show_dev_name);
ini_set_int stdcall (eolite_ini_path, #config_section, "ShowStatusBar", show_status_bar);
ini_set_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case);
ini_set_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy);
ini_set_int stdcall (eolite_ini_path, #config_section, "FontSize", label.size.pt);

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager v3.60"
#define ABOUT_TITLE "EOLITE 3.60"
#define TITLE "Eolite File Manager v3.61"
#define ABOUT_TITLE "EOLITE 3.61"
#ifdef LANG_RUS
?define T_FILE "” ©«"