Eolite 3.58: add status bar

git-svn-id: svn://kolibrios.org@6404 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2016-04-20 00:11:28 +00:00
parent fb3c3f01e9
commit 5ce4d443d8
3 changed files with 23 additions and 8 deletions

View File

@ -76,6 +76,7 @@ byte
file_name[256], file_name[256],
new_element_name[256], new_element_name[256],
temp[4096], temp[4096],
status_bar_str[50],
itdir; itdir;
char active_path[4096], inactive_path[4096]; char active_path[4096], inactive_path[4096];
@ -424,6 +425,7 @@ void main()
selected_count++; selected_count++;
} }
List_ReDraw(); List_ReDraw();
DrawStatusBar();
break; break;
case 022: //Ctrl+U - unselect all files case 022: //Ctrl+U - unselect all files
for (i=0; i<files.count; i++) for (i=0; i<files.count; i++)
@ -433,6 +435,7 @@ void main()
} }
selected_count = 0; selected_count = 0;
List_ReDraw(); List_ReDraw();
DrawStatusBar();
break; break;
} }
break; break;
@ -451,6 +454,7 @@ void main()
if (!two_panels) break; if (!two_panels) break;
if (active_panel==1) active_panel=2; else active_panel=1; if (active_panel==1) active_panel=2; else active_panel=1;
ChangeActivePanel(); ChangeActivePanel();
DrawStatusBar();
break; break;
case 093: //menu case 093: //menu
menu_call_mouse=0; menu_call_mouse=0;
@ -476,6 +480,7 @@ void main()
_INSERT_END: _INSERT_END:
files.KeyDown(); files.KeyDown();
List_ReDraw(); List_ReDraw();
DrawStatusBar();
break; break;
case 059...068: //F1-F10 case 059...068: //F1-F10
FnProcess(key_scancode-58); FnProcess(key_scancode-58);
@ -559,6 +564,7 @@ void draw_window()
llist_copy(#files_active, #files); llist_copy(#files_active, #files);
strcpy(#active_path, #path); strcpy(#active_path, #path);
DrawFilePanels(); DrawFilePanels();
DrawStatusBar();
if (del_active) Del_Form(); if (del_active) Del_Form();
if (new_element_active) NewElement_Form(new_element_active, #new_element_name); if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
} }
@ -579,13 +585,20 @@ void DrawList()
if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph); if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph);
} }
void DrawStatusBar()
{
DrawBar(1, Form.cheight - 18, Form.cwidth-2, 17, col_palette);
sprintf(#status_bar_str, STATUS_STR, files.count, selected_count);
WriteText(6,Form.cheight - 13,0x80,0x000000,#status_bar_str);
}
void DrawFilePanels() void DrawFilePanels()
{ {
int files_y; int files_y;
if (!two_panels) if (!two_panels)
{ {
DrawDeviceAndActionsLeftPanel(); DrawDeviceAndActionsLeftPanel();
files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h); files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h);
DrawList(); DrawList();
Open_Dir(#path,ONLY_SHOW); Open_Dir(#path,ONLY_SHOW);
} }
@ -603,25 +616,25 @@ void DrawFilePanels()
llist_copy(#files, #files_inactive); llist_copy(#files, #files_inactive);
strcpy(#path, #inactive_path); strcpy(#path, #inactive_path);
col_selec = 0xCCCccc; col_selec = 0xCCCccc;
files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h); files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
DrawList(); DrawList();
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
llist_copy(#files, #files_active); llist_copy(#files, #files_active);
strcpy(#path, #active_path); strcpy(#path, #active_path);
col_selec = 0x94AECE; col_selec = 0x94AECE;
files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h); files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
DrawList(); DrawList();
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
} }
if (active_panel==2) if (active_panel==2)
{ {
files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h); files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
DrawList(); DrawList();
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
llist_copy(#files, #files_active); llist_copy(#files, #files_active);
strcpy(#path, #active_path); strcpy(#path, #active_path);
col_selec = 0x94AECE; col_selec = 0x94AECE;
files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h); files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
DrawList(); DrawList();
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
} }

View File

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

View File

@ -1,5 +1,5 @@
#define TITLE "Eolite File Manager v3.57" #define TITLE "Eolite File Manager v3.58"
#define ABOUT_TITLE "EOLITE 3.57" #define ABOUT_TITLE "EOLITE 3.58"
#ifdef LANG_RUS #ifdef LANG_RUS
?define T_FILE "” ©«" ?define T_FILE "” ©«"
@ -28,6 +28,7 @@
?define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« " ?define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« "
?define DEL_MORE_FILES_1 "¢ë¡à ­­ë¥ í«¥¬¥­âë (" ?define DEL_MORE_FILES_1 "¢ë¡à ­­ë¥ í«¥¬¥­âë ("
?define DEL_MORE_FILES_2 " èâ.)?" ?define DEL_MORE_FILES_2 " èâ.)?"
?define STATUS_STR "<EFBFBD>«¥¬¥­â®¢: %d ‚뤥«¥­­®: %d"
#else #else
?define T_FILE "File" ?define T_FILE "File"
?define T_TYPE "Type" ?define T_TYPE "Type"
@ -56,4 +57,5 @@
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
?define DEL_MORE_FILES_1 "selected items(" ?define DEL_MORE_FILES_1 "selected items("
?define DEL_MORE_FILES_2 " pcs.)?" ?define DEL_MORE_FILES_2 " pcs.)?"
?define STATUS_STR "Elements: %d Selected: %d"
#endif #endif