diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 0b857ce80..b0e792d33 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -52,6 +52,7 @@ int selected_count; byte path[4096], + DefaultPath[4096], file_path[4096], file_name[256], new_element_name[256], @@ -122,11 +123,8 @@ void main() { strcpy(#path, #param); if (path[strlen(#path)-1]!='/') chrcat(#path, '/'); //add "/" to the end of the string - } - else - { - strlcpy(#path, "/rd/1/", 6); - } + } + Open_Dir(#path,ONLY_OPEN); strcpy(#inactive_path, #path); llist_copy(#files_inactive, #files); diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 25ab63224..2d85979fe 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -18,12 +18,12 @@ ?define PR_T_SYSTEM "Системный" ?define PR_T_ONLY_READ "Только чтение" ?define SET_BYTE_LANG "байт" -#else +#else // Apply to all subfolders ?define WINDOW_TITLE_PROPERTIES "Properties" ?define BTN_CLOSE "Close" ?define BTN_APPLY "Apply" - ?define QUEST_1 "Применить ко всем вложенным" - ?define QUEST_2 "файлам и папкам" + ?define QUEST_1 "Apply to all subfolders" + ?define QUEST_2 "files and Folders" ?define PR_T_NAME "Name:" ?define PR_T_DEST "Destination:" ?define PR_T_SIZE "Size:" diff --git a/programs/cmm/eolite/include/settings.h b/programs/cmm/eolite/include/settings.h index 9eb728bf8..2c1ab78e8 100644 --- a/programs/cmm/eolite/include/settings.h +++ b/programs/cmm/eolite/include/settings.h @@ -9,6 +9,7 @@ ?define LIST_LINE_HEIGHT "Высота строки в списке" ?define NOTIFY_COPY_END "Уведомлять о завершении копирования" ?define T_DOUBLE_CLICK "Время двойного клика (в сотых)" + #define SAVE_PATH_AS_DEFAULT "Сохранить текущий путь по умолчанию" #else ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" ?define TITLE_SETT "Settings" @@ -19,6 +20,7 @@ ?define LIST_LINE_HEIGHT "List line height" ?define NOTIFY_COPY_END "Notify when copying finished" ?define T_DOUBLE_CLICK "Double click time (in hundredths)" + #define SAVE_PATH_AS_DEFAULT "Save the current default path" #endif char config_section[] = "Config"; @@ -39,6 +41,11 @@ void settings_dialog() RunProgram("tinypad", "/sys/settings/assoc.ini"); break; } + else if (id==6) + { + ini_set_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path,strlen(#path)); + break; + } else if (id==20) show_dev_name ^= 1; else if (id==21) { action_buf=109; real_files_names_case ^= 1; } else if (id==22) info_after_copy ^= 1; @@ -59,9 +66,10 @@ void settings_dialog() break; case evReDraw: - DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 226+GetSkinHeight(),0x34,system.color.work,TITLE_SETT); + DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 246+GetSkinHeight(),0x34,system.color.work,TITLE_SETT); DrawSettingsCheckBoxes(); - DrawFlatButton(9, 186, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS); + DrawFlatButton(9, 186, strlen(SAVE_PATH_AS_DEFAULT)+4*6, 22, 6, 0xE4DFE1, SAVE_PATH_AS_DEFAULT); + DrawFlatButton(9, 216, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS); } } } @@ -102,6 +110,7 @@ void LoadIniSettings() ini_get_int stdcall (eolite_ini_path, #config_section, "WinY", 50); WinY = EAX; ini_get_int stdcall (eolite_ini_path, #config_section, "WinW", 550); WinW = EAX; ini_get_int stdcall (eolite_ini_path, #config_section, "WinH", 500); WinH = EAX; + ini_get_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path,4096,"/rd/1/"); }