From c4fe30fe4bdfc21e43e200b05b15d0207f504d0c Mon Sep 17 00:00:00 2001 From: Serhii Sakhno Date: Sun, 8 Mar 2015 15:25:21 +0000 Subject: [PATCH] Eolite 2.61: properties window for selected files git-svn-id: svn://kolibrios.org@5510 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 4 +- programs/cmm/eolite/include/properties.h | 153 ++++++++++++++++------- 2 files changed, 113 insertions(+), 44 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 220f5a42c3..458463b9b3 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -83,8 +83,8 @@ enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir -#define TITLE "Eolite File Manager v2.6" -#define ABOUT_TITLE "Eolite v2.6" +#define TITLE "Eolite File Manager v2.61" +#define ABOUT_TITLE "Eolite v2.61" dword col_padding, col_selec, col_lpanel; int toolbar_buttons_x[7]={9,46,85,134,167,203}; diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index f7803cbf83..0b26f6bce0 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -73,12 +73,51 @@ void GetSizeDir(dword way) } } +void GetSizeMoreFiles(dword way) +{ + int all_file_count, all_dir_count, all_size; + char cur_file[4096]; + dword selected_offset2; + + all_file_count = 0; + all_dir_count = 0; + all_size = 0; + + for (i=0; i", 18, 20, 0xFFFfff, 0); - else - Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 20, 0xFFFfff, 0); - - WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); - edit_box_draw stdcall (#file_name_ed); - + WriteText(10, 50, 0x80, 0x000000, PR_T_DEST); edit_box_draw stdcall (#path_to_file_ed); WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE); - if (!itdir) + + if (cont) { - element_size = file_info_general.sizelo; - } - else - { - WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS); + Put_icon('', 18, 20, 0xFFFfff, 0); strcpy(#folder_info, SET_6); strcat(#folder_info, itoa(file_count)); strcat(#folder_info, SET_7); strcat(#folder_info, itoa(dir_count)); - WriteText(100, 80, 0x80, 0x000000, #folder_info); - element_size = size_dir; + WriteText(50, 23, 0x80, 0x000000, #folder_info); + EAX = ConvertSize(size_dir); + strcpy(#element_size_label, EAX); + strcat(#element_size_label, " ("); + strcat(#element_size_label, itoa(size_dir)); + strcat(#element_size_label, " b)"); + WriteText(100, 65, 0x80, 0x000000, #element_size_label); } + else + { + if ( file_info_general.isfolder ) + Put_icon("", 18, 20, 0xFFFfff, 0); + else + Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 20, 0xFFFfff, 0); - WriteText(10, 95, 0x80, 0x000000, SET_3); - WriteText(10, 110, 0x80, 0x000000, SET_4); - WriteText(10, 125, 0x80, 0x000000, SET_5); - DrawDate(100, 95, 0, #file_info_general.datecreate); - DrawDate(100, 110, 0, #file_info_general.datelastaccess); - DrawDate(100, 125, 0, #file_info_general.datelastedit); - - EAX = ConvertSize(element_size); - strcpy(#element_size_label, EAX); - strcat(#element_size_label, " ("); - strcat(#element_size_label, itoa(element_size)); - strcat(#element_size_label, " b)"); - WriteText(100, 65, 0x80, 0x000000, #element_size_label); - - flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; - flags_frame.font_color = sc.work_text; - flags_frame.font_backgr_color = sc.work; - flags_frame.ext_col = sc.work_graph; - frame_draw stdcall (#flags_frame); - - DrawPropertiesCheckBoxes(); + WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); + edit_box_draw stdcall (#file_name_ed); + + if (!itdir) + { + element_size = file_info_general.sizelo; + } + else + { + WriteText(10, 80, 0x80, 0x000000, PR_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, 80, 0x80, 0x000000, #folder_info); + element_size = size_dir; + } + + WriteText(10, 95, 0x80, 0x000000, SET_3); + WriteText(10, 110, 0x80, 0x000000, SET_4); + WriteText(10, 125, 0x80, 0x000000, SET_5); + DrawDate(100, 95, 0, #file_info_general.datecreate); + DrawDate(100, 110, 0, #file_info_general.datelastaccess); + DrawDate(100, 125, 0, #file_info_general.datelastedit); + + EAX = ConvertSize(element_size); + strcpy(#element_size_label, EAX); + strcat(#element_size_label, " ("); + strcat(#element_size_label, itoa(element_size)); + strcat(#element_size_label, " b)"); + WriteText(100, 65, 0x80, 0x000000, #element_size_label); + + flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; + flags_frame.font_color = sc.work_text; + flags_frame.font_backgr_color = sc.work; + flags_frame.ext_col = sc.work_graph; + frame_draw stdcall (#flags_frame); + + DrawPropertiesCheckBoxes(); + } } }