From dfa7b433725fd7a59e6176b49fa7a44434311081 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 10 Mar 2019 18:08:50 +0000 Subject: [PATCH] Eolite: fix attribute set for selected files git-svn-id: svn://kolibrios.org@7593 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/include/properties.h | 147 +++++++++++---------- programs/cmm/eolite/include/translations.h | 4 +- 2 files changed, 76 insertions(+), 75 deletions(-) diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 3619b329d5..931f96d071 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -1,7 +1,7 @@ #ifdef LANG_RUS ?define WINDOW_TITLE_PROPERTIES "Свойства" - ?define BTN_CLOSE "Закрыть" - ?define BTN_APPLY "Применить" + ?define T_CLOSE "Закрыть" + ?define T_APPLY "Применить" ?define QUEST_1 "Применить ко всем вложенным" ?define QUEST_2 "файлам и папкам?" ?define PR_T_NAME "Имя:" @@ -18,8 +18,8 @@ ?define SET_BYTE_LANG "байт" #else // Apply to all subfolders ?define WINDOW_TITLE_PROPERTIES "Properties" - ?define BTN_CLOSE "Close" - ?define BTN_APPLY "Apply" + ?define T_CLOSE "Close" + ?define T_APPLY "Apply" ?define QUEST_1 "Apply to all subfolders" ?define QUEST_2 "files and Folders?" ?define PR_T_NAME "Name:" @@ -36,6 +36,11 @@ ?define SET_BYTE_LANG "byte" #endif +#define B_SETINGS_APPLY_SUBFOLDER 301 +#define B_SETINGS_APPLY_NO_SUBFOLDER 302 +#define B_APPLY 11 +#define B_CLOSE 12 + char path_to_file[4096]; char file_name2[4096]; edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2}; @@ -44,7 +49,7 @@ edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,siz BDVK file_info_general; BDVK file_info_dirsize; -bool quest_active; +bool apply_question_active; _dir_size more_files_count; @@ -86,46 +91,44 @@ void SetPropertiesDir(dword way) } } -void SetProperties(byte prop) +#define SET_PROPERTIES_SINGLE_FILE 0 +#define SET_PROPERTIES_NO_SUBFOLDER 1 +#define SET_PROPERTIES_ALL_SUBFOLDER 2 +void SetProperties(int mode) { - dword cur_file; + char pcur_file[4096]; dword i; - if (prop==1) || (prop==2) + apply_question_active=false; + + if (SET_PROPERTIES_SINGLE_FILE == mode) { + SetPropertiesFile(#file_path, #file_info_general); + } + + if (SET_PROPERTIES_ALL_SUBFOLDER == mode) + || (SET_PROPERTIES_NO_SUBFOLDER == mode) { if (selected_count) { - cur_file = malloc(4096); for (i=0; i attributes_frame.y ch_read_only.draw(24, y.inc(18)); ch_hidden.draw(24, y.inc(24)); ch_system.draw(24, y.inc(24)); + if (apply_question_active) ShowConfirmQuestionPopin(); } void PropertiesDrawIcon(dword file_path, extension) @@ -339,3 +331,12 @@ void PropertiesDrawIcon(dword file_path, extension) DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff); DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff); } + +void EventApplyProperties() +{ + if (selected_count) || (itdir) { + ShowConfirmQuestionPopin(); + } else { + SetProperties(SET_PROPERTIES_SINGLE_FILE); + } +} \ No newline at end of file diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index ab0daa5f19..8bfc89dd34 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager 4.05" -#define ABOUT_TITLE "EOLITE 4.05" +#define TITLE "Eolite File Manager 4.06" +#define ABOUT_TITLE "EOLITE 4.06" #ifdef LANG_RUS ?define T_FILE "Файл"