forked from KolibriOS/kolibrios
Eolite 2.54: better look, better code, calculate folder parameters only once, translate to English
git-svn-id: svn://kolibrios.org@5450 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
82b430c758
commit
090639e531
@ -83,8 +83,8 @@
|
||||
|
||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||
|
||||
#define TITLE "Eolite File Manager v2.53"
|
||||
#define ABOUT_TITLE "Eolite v2.53"
|
||||
#define TITLE "Eolite File Manager v2.54"
|
||||
#define ABOUT_TITLE "Eolite v2.54"
|
||||
dword col_padding, col_selec, col_lpanel;
|
||||
|
||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||
|
@ -1,55 +1,63 @@
|
||||
#ifdef LANG_RUS
|
||||
?define PROP_TITLE "‘¢®©á⢠"
|
||||
?define WINDOW_TITLE_PROPERITIES "‘¢®©á⢠"
|
||||
?define BTN_CLOSE "<EFBFBD><EFBFBD><EFBFBD>謔<EFBFBD>"
|
||||
?define SET_1 "<EFBFBD> ᯮ«®¦¥¨¥"
|
||||
?define SET_2 "<EFBFBD> §¬¥à"
|
||||
?define T_NAME "ˆ¬ï:"
|
||||
?define T_DEST "<EFBFBD> ᯮ«®¦¥¨¥:"
|
||||
?define T_SIZE "<EFBFBD> §¬¥à:"
|
||||
?define SET_3 "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
?define SET_4 "<EFBFBD><EFBFBD>謔"
|
||||
?define SET_5 "<EFBFBD>Кキキ"
|
||||
?define SET_6 "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: "
|
||||
?define SET_7 " <20><><EFBFBD><EFBFBD>: "
|
||||
?define SET_8 "‘®¤¥à¦¨â "
|
||||
?define HIDDEN_T "‘ªàëâë©"
|
||||
?define SYSTEM_T "‘¨á⥬ë©"
|
||||
?define ONLY_READ_T "’®«ìª® ç⥨¥"
|
||||
?define T_CONTAINS "‘®¤¥à¦¨â: "
|
||||
?define FLAGS " €ââਡãâë "
|
||||
?define T_HIDDEN "‘ªàëâë©"
|
||||
?define T_SYSTEM "‘¨á⥬ë©"
|
||||
?define T_ONLY_READ "’®«ìª® ç⥨¥"
|
||||
#elif LANG_EST
|
||||
?define PROP_TITLE "‘¢®©á⢠"
|
||||
?define WINDOW_TITLE_PROPERITIES "‘¢®©á⢠"
|
||||
?define BTN_CLOSE "<EFBFBD><EFBFBD><EFBFBD>謔<EFBFBD>"
|
||||
?define SET_1 "<EFBFBD> ᯮ«®¦¥¨¥"
|
||||
?define SET_2 "<EFBFBD> §¬¥à"
|
||||
?define T_NAME "ˆ¬ï:"
|
||||
?define T_DEST "<EFBFBD> ᯮ«®¦¥¨¥:"
|
||||
?define T_SIZE "<EFBFBD> §¬¥à:"
|
||||
?define SET_3 "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
?define SET_4 "<EFBFBD><EFBFBD>謔"
|
||||
?define SET_5 "<EFBFBD>Кキキ"
|
||||
?define SET_6 "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: "
|
||||
?define SET_7 " <20><><EFBFBD><EFBFBD>: "
|
||||
?define SET_8 "‘®¤¥à¦¨â "
|
||||
?define HIDDEN_T "‘ªàëâë©"
|
||||
?define SYSTEM_T "‘¨á⥬ë©"
|
||||
?define ONLY_READ_T "’®«ìª® ç⥨¥"
|
||||
?define T_CONTAINS "‘®¤¥à¦¨â: "
|
||||
?define FLAGS " €ââਡãâë "
|
||||
?define T_HIDDEN "‘ªàëâë©"
|
||||
?define T_SYSTEM "‘¨á⥬ë©"
|
||||
?define T_ONLY_READ "’®«ìª® ç⥨¥"
|
||||
#else
|
||||
?define PROP_TITLE "‘¢®©á⢠"
|
||||
?define BTN_CLOSE "‡ ªàëâì"
|
||||
?define SET_1 "<EFBFBD> ᯮ«®¦¥¨¥"
|
||||
?define SET_2 "<EFBFBD> §¬¥à"
|
||||
?define SET_3 "‘®§¤ "
|
||||
?define SET_4 "Žâªàëâ"
|
||||
?define SET_5 "ˆ§¬¥¥"
|
||||
?define SET_6 "” ©«®¢: "
|
||||
?define SET_7 " <20> ¯®ª: "
|
||||
?define SET_8 "‘®¤¥à¦¨â "
|
||||
?define HIDDEN_T "‘ªàëâë©"
|
||||
?define SYSTEM_T "‘¨á⥬ë©"
|
||||
?define ONLY_READ_T "’®«ìª® ç⥨¥"
|
||||
?define WINDOW_TITLE_PROPERITIES "Properities"
|
||||
?define BTN_CLOSE "Close"
|
||||
?define T_NAME "Name:"
|
||||
?define T_DEST "Destination:"
|
||||
?define T_SIZE "Size:"
|
||||
?define SET_3 "Created"
|
||||
?define SET_4 "Opened"
|
||||
?define SET_5 "Modified"
|
||||
?define SET_6 "Files: "
|
||||
?define SET_7 " Folders: "
|
||||
?define T_CONTAINS "Contains: "
|
||||
?define FLAGS " Attributes "
|
||||
?define T_HIDDEN "Hidden"
|
||||
?define T_SYSTEM "System"
|
||||
?define T_ONLY_READ "Read-only"
|
||||
#endif
|
||||
|
||||
dword mouse_ddd2;
|
||||
char path_to_file[4096]="\0";
|
||||
char file_name2[4096]="\0";
|
||||
edit_box file_name_ed = {100,30,5,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2};
|
||||
edit_box path_to_file_ed = {100,100,27,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2};
|
||||
checkbox2 HIDDEN_chb = {10*65536+15, 115*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, HIDDEN_T, CH_FLAG_MIDDLE, 0};
|
||||
checkbox2 SYSTEM_chb = {90*65536+15, 115*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SYSTEM_T, CH_FLAG_MIDDLE, 0};
|
||||
checkbox2 ONLY_READ_chb = {180*65536+15, 115*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, ONLY_READ_T, CH_FLAG_MIDDLE, 0};
|
||||
edit_box file_name_ed = {150,50,25,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2};
|
||||
edit_box path_to_file_ed = {150,100,46,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2};
|
||||
|
||||
frame flags_frame = { 0, 180, 10, 80, 106, 0x000111, 0xFFFfff, 1, FLAGS, 0, 0, 6, 0x000111, 0xCCCccc };
|
||||
checkbox2 HIDDEN_chb = {22*65536+15, 120*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, T_HIDDEN, CH_FLAG_MIDDLE, 0};
|
||||
checkbox2 SYSTEM_chb = {22*65536+15, 140*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, T_SYSTEM, CH_FLAG_MIDDLE, 0};
|
||||
checkbox2 ONLY_READ_chb = {22*65536+15, 160*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, T_ONLY_READ, CH_FLAG_MIDDLE, 0};
|
||||
|
||||
int file_count, dir_count, size_dir;
|
||||
char folder_info[200];
|
||||
@ -101,6 +109,8 @@ void properties_dialog()
|
||||
strcpy(#path_to_file, #path);
|
||||
path_to_file_ed.size = strlen(#path_to_file);
|
||||
|
||||
if (itdir) GetSizeDir(#file_path);
|
||||
|
||||
SetEventMask(0x27);
|
||||
loop() switch(WaitEvent())
|
||||
{
|
||||
@ -123,39 +133,51 @@ void properties_dialog()
|
||||
break;
|
||||
|
||||
case evReDraw:
|
||||
DefineAndDrawWindow(Form.left + 150,150,300,228+GetSkinHeight(),0x34,sc.work,PROP_TITLE);
|
||||
DefineAndDrawWindow(Form.left + 150,150,300,238+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE_PROPERITIES);
|
||||
GetProcessInfo(#settings_form, SelfInfo);
|
||||
DrawFlatButton(208, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE);
|
||||
if (! TestBit(file_info.attr, 4) ) Put_icon(#file_name2+strrchr(#file_name2,'.'), 10, 5, sc.work, 0);
|
||||
else Put_icon("<DIR>", 10, 5, sc.work, 0);
|
||||
WriteText(10, 30, 0x80, 0x000000, SET_1);
|
||||
DrawBar(10, 10, 32, 32, 0xFFFfff);
|
||||
if (! TestBit(file_info.attr, 4) )
|
||||
Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 20, 0xFFFfff, 0);
|
||||
else
|
||||
Put_icon("<DIR>", 18, 20, 0xFFFfff, 0);
|
||||
|
||||
WriteText(50, 13, 0x80, 0x000000, T_NAME);
|
||||
edit_box_draw stdcall (#file_name_ed);
|
||||
|
||||
WriteText(10, 50, 0x80, 0x000000, T_DEST);
|
||||
edit_box_draw stdcall (#path_to_file_ed);
|
||||
WriteText(10, 47, 0x80, 0x000000, SET_2);
|
||||
|
||||
/*WriteText(10, 63, 0x80, 0x000000, SET_3);
|
||||
if (!itdir)
|
||||
{
|
||||
WriteText(10, 78, 0x80, 0x000000, SET_4);
|
||||
WriteText(10, 93, 0x80, 0x000000, SET_5);
|
||||
}*/
|
||||
if (TestBit(file_info.attr, 0)) ONLY_READ_chb.flags = 110b;
|
||||
if (TestBit(file_info.attr, 1)) HIDDEN_chb.flags = 110b;
|
||||
if (TestBit(file_info.attr, 2)) SYSTEM_chb.flags = 110b;
|
||||
WriteText(10, 65, 0x80, 0x000000, T_SIZE);
|
||||
if (!itdir)
|
||||
{
|
||||
WriteText(100, 47, 0x80, 0x000000, ConvertSize(file_info.sizelo));
|
||||
WriteText(100, 65, 0x80, 0x000000, ConvertSize(file_info.sizelo));
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteText(10, 63, 0x80, 0x000000, SET_8);
|
||||
GetSizeDir(#file_path);
|
||||
strcat(#folder_info, SET_6);
|
||||
WriteText(10, 80, 0x80, 0x000000, T_CONTAINS);
|
||||
strcpy(#folder_info, SET_6);
|
||||
strcat(#folder_info, itoa(file_count));
|
||||
strcat(#folder_info, SET_7);
|
||||
strcat(#folder_info, itoa(dir_count));
|
||||
WriteText(100, 63, 0x80, 0x000000, #folder_info);
|
||||
WriteText(100, 47, 0x80, 0x000000, ConvertSize(size_dir));
|
||||
WriteText(100, 80, 0x80, 0x000000, #folder_info);
|
||||
WriteText(100, 65, 0x80, 0x000000, ConvertSize(size_dir));
|
||||
}
|
||||
|
||||
flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 60;
|
||||
flags_frame.font_color = sc.work_text;
|
||||
flags_frame.font_backgr_color = sc.work;
|
||||
frame_draw stdcall (#flags_frame);
|
||||
|
||||
if (TestBit(file_info.attr, 0)) ONLY_READ_chb.flags = 110b;
|
||||
if (TestBit(file_info.attr, 1)) HIDDEN_chb.flags = 110b;
|
||||
if (TestBit(file_info.attr, 2)) SYSTEM_chb.flags = 110b;
|
||||
check_box_draw stdcall (#HIDDEN_chb);
|
||||
check_box_draw stdcall (#SYSTEM_chb);
|
||||
check_box_draw stdcall (#ONLY_READ_chb);
|
||||
|
Loading…
Reference in New Issue
Block a user