Rev 5833 | Rev 5846 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5416 | punk_joker | 1 | |
2 | ?define EDIT_FILE_ASSOCIATIONS "Редактировать ассоциации файлов" |
||
5435 | leency | 3 | ?define TITLE_SETT "Настройки" |
5416 | punk_joker | 4 | ?define SHOW_DEVICE_CLASS "Выводить названия класса устройств" |
5526 | leency | 5 | ?define SHOW_REAL_NAMES "Показывать имена файлов не меняя регистр" |
6 | ?define FONT_SIZE_LABEL "Размер шрифта" |
||
5743 | leency | 7 | ?define USE_TWO_PANELS "Две панели" |
5719 | leency | 8 | ?define LIST_LINE_HEIGHT "Высота строки в списке" |
5526 | leency | 9 | ?define NOTIFY_COPY_END "Уведомлять о завершении копирования" |
10 | ?define T_DOUBLE_CLICK "Время двойного клика (в сотых)" |
||
5581 | leency | 11 | #define SAVE_PATH_AS_DEFAULT "Сохранить текущий путь по умолчанию" |
5833 | pavelyakov | 12 | #else |
5416 | punk_joker | 13 | ?define EDIT_FILE_ASSOCIATIONS "Edit file associations" |
5435 | leency | 14 | ?define TITLE_SETT "Settings" |
5428 | leency | 15 | ?define SHOW_DEVICE_CLASS "Show device class name" |
5526 | leency | 16 | ?define SHOW_REAL_NAMES "Show real file names without changing case" |
17 | ?define FONT_SIZE_LABEL "Font size" |
||
5743 | leency | 18 | ?define USE_TWO_PANELS "Two panels" |
5719 | leency | 19 | ?define LIST_LINE_HEIGHT "List line height" |
5526 | leency | 20 | ?define NOTIFY_COPY_END "Notify when copying finished" |
21 | ?define T_DOUBLE_CLICK "Double click time (in hundredths)" |
||
5581 | leency | 22 | #define SAVE_PATH_AS_DEFAULT "Save the current default path" |
5833 | pavelyakov | 23 | #endif |
5416 | punk_joker | 24 | |
25 | |||
5748 | leency | 26 | int WinX, WinY, WinW, WinH; |
27 | |||
5416 | punk_joker | 28 | |
29 | { |
||
30 | byte id; |
||
31 | active_settings=1; |
||
5761 | leency | 32 | loop(){ |
5576 | pavelyakov | 33 | switch(WaitEvent()) |
5591 | pavelyakov | 34 | { |
35 | case evButton: |
||
36 | id=GetButtonID(); |
||
5416 | punk_joker | 37 | if (id==1) { ExitSettings(); break; } |
5761 | leency | 38 | else if (id==5) |
5591 | pavelyakov | 39 | { |
5435 | leency | 40 | RunProgram("tinypad", "/sys/settings/assoc.ini"); |
41 | break; |
||
5463 | leency | 42 | } |
5435 | leency | 43 | else if (id==6) |
5833 | pavelyakov | 44 | { |
45 | ini_set_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path,strlen(#path)); |
||
46 | IF(CMD_ENABLE_SAVE_IMG)ini_set_str stdcall (fd_path_eolite_ini_path, #config_section, "DefaultPath", #path,strlen(#path)); |
||
5834 | pavelyakov | 47 | break; |
5833 | pavelyakov | 48 | } |
49 | else if (id==20) show_dev_name ^= 1; |
||
5591 | pavelyakov | 50 | else if (id==21) { action_buf=109; real_files_names_case ^= 1; } |
5743 | leency | 51 | else if (id==22) info_after_copy ^= 1; |
5591 | pavelyakov | 52 | else if (id==24) two_panels ^= 1; |
5719 | leency | 53 | else if (id==25) { files.item_h++; files_active.item_h = files_inactive.item_h = files.item_h; } |
5825 | leency | 54 | else if (id==26) && (files.item_h>18) files.item_h--; |
55 | else if (id==27) MOUSE_TIME++; |
||
5591 | pavelyakov | 56 | else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--; |
57 | else if (id==30) { font.size.text++; IF(!font.changeSIZE()) font.size.text--; BigFontsChange(); } |
||
5761 | leency | 58 | else if (id==31) { font.size.text--; IF(!font.changeSIZE()) font.size.text++; BigFontsChange(); } |
59 | EventRedrawWindow(Form.left,Form.top); |
||
5606 | pavelyakov | 60 | DrawSettingsCheckBoxes(); |
5463 | leency | 61 | break; |
5591 | pavelyakov | 62 | |
63 | |||
64 | GetKeys(); |
||
5707 | leency | 65 | if (key_scancode==SCAN_CODE_ESC) ExitSettings(); |
5743 | leency | 66 | break; |
5416 | punk_joker | 67 | |
5591 | pavelyakov | 68 | |
69 | DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 246+GetSkinHeight(),0x34,system.color.work,TITLE_SETT); |
||
5833 | pavelyakov | 70 | DrawSettingsCheckBoxes(); |
5463 | leency | 71 | DrawFlatButton(9, 186, strlen(SAVE_PATH_AS_DEFAULT)+4*6, 22, 6, 0xE4DFE1, SAVE_PATH_AS_DEFAULT); |
5833 | pavelyakov | 72 | DrawFlatButton(9, 216, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS); |
73 | } |
||
5591 | pavelyakov | 74 | } |
5416 | punk_joker | 75 | } |
5428 | leency | 76 | |
77 | |||
5743 | leency | 78 | { |
79 | active_settings = 0; |
||
5761 | leency | 80 | settings_window = 0; |
5743 | leency | 81 | cmd_free = 4; |
82 | ExitProcess(); |
||
83 | } |
||
84 | |||
85 | |||
5463 | leency | 86 | { |
87 | CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS, show_dev_name); |
||
5526 | leency | 88 | CheckBox2(10, 33, 21, SHOW_REAL_NAMES, real_files_names_case); |
89 | CheckBox2(10, 55, 22, NOTIFY_COPY_END, info_after_copy); |
||
90 | CheckBox2(10, 77, 24, USE_TWO_PANELS, two_panels); |
||
5743 | leency | 91 | MoreLessBox(10, 103, 18, 27, 28, #system.color, MOUSE_TIME, T_DOUBLE_CLICK); |
5745 | leency | 92 | MoreLessBox(10, 130, 18, 25, 26, #system.color, files.item_h, LIST_LINE_HEIGHT); |
5825 | leency | 93 | if (font.data) MoreLessBox(10, 157, 18, 30, 31, #system.color, font.size.text, FONT_SIZE_LABEL); |
5753 | leency | 94 | } |
5463 | leency | 95 | |
5428 | leency | 96 | |
5463 | leency | 97 | |
5441 | leency | 98 | { |
5428 | leency | 99 | files.SetFont(6, 9, 10000000b); |
5767 | leency | 100 | FileShow.font_size_x = files.font_w; |
101 | FileShow.font_number = 0; |
||
102 | ini_get_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", 1); show_dev_name = EAX; |
||
5748 | leency | 103 | ini_get_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", 0); real_files_names_case = EAX; |
104 | ini_get_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", 0); info_after_copy = EAX; |
||
105 | ini_get_int stdcall (eolite_ini_path, #config_section, "FontSize", 9); font.size.text = EAX; |
||
5753 | leency | 106 | ini_get_int stdcall (eolite_ini_path, #config_section, "TwoPanels", 0); two_panels = EAX; |
5748 | leency | 107 | ini_get_int stdcall (eolite_ini_path, #config_section, "LineHeight", 18); files.item_h = EAX; |
5825 | leency | 108 | ini_get_int stdcall (eolite_ini_path, #config_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX; |
5748 | leency | 109 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinX", 200); WinX = EAX; |
110 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinY", 50); WinY = EAX; |
||
111 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinW", 550); WinW = EAX; |
||
112 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinH", 500); WinH = EAX; |
||
113 | ini_get_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path,4096,"/rd/1/"); |
||
5833 | pavelyakov | 114 | } |
5428 | leency | 115 | |
116 | |||
5687 | leency | 117 | |
5441 | leency | 118 | { |
119 | |||
5834 | pavelyakov | 120 | |
5748 | leency | 121 | ini_set_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case); |
122 | ini_set_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy); |
||
123 | ini_set_int stdcall (eolite_ini_path, #config_section, "FontSize", font.size.text); |
||
5753 | leency | 124 | ini_set_int stdcall (eolite_ini_path, #config_section, "TwoPanels", two_panels); |
5748 | leency | 125 | ini_set_int stdcall (eolite_ini_path, #config_section, "LineHeight", files.item_h); |
5825 | leency | 126 | ini_set_int stdcall (eolite_ini_path, #config_section, "TimeDoubleClick", MOUSE_TIME); |
5748 | leency | 127 | ini_set_int stdcall (eolite_ini_path, #config_section, "WinX", Form.left); |
128 | ini_set_int stdcall (eolite_ini_path, #config_section, "WinY", Form.top); |
||
129 | ini_set_int stdcall (eolite_ini_path, #config_section, "WinW", Form.width); |
||
130 | ini_set_int stdcall (eolite_ini_path, #config_section, "WinH", Form.height); |
||
131 | |||
5834 | pavelyakov | 132 | |
133 | { |
||
134 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "ShowDeviceName", show_dev_name); |
||
135 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case); |
||
136 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy); |
||
137 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "FontSize", font.size.text); |
||
138 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "TwoPanels", two_panels); |
||
139 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "LineHeight", files.item_h); |
||
140 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "TimeDoubleClick", MOUSE_TIME); |
||
141 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinX", Form.left); |
||
142 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinY", Form.top); |
||
143 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinW", Form.width); |
||
144 | ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinH", Form.height); |
||
145 | } |
||
146 | } |
||
5441 | leency | 147 | |
5428 | leency | 148 | |
5441 | leency | 149 | |
150 | |||
5428 | leency | 151 | { |
152 | char error_message[500]; |
||
153 | dword ii; |
||
154 | if (files.cur_y>=0) Line_ReDraw(0xFF0000, files.cur_y); |
||
5825 | leency | 155 | pause(5); |
5428 | leency | 156 | sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE"); |
5576 | pavelyakov | 157 | notify(#error_message); |
5620 | leency | 158 | } |
5428 | leency | 159 | |
160 | |||
161 | |||
162 | { |
||
163 | system.color.work = 0xE4DFE1; |
||
5674 | pavelyakov | 164 | system.color.work_text = 0; |
165 | system.color.work_graph = 0x9098B0; //A0A0B8; //0x819FC5; |
||
166 | system.color.work_button = 0xD2D3D3; |
||
167 | system.color.work_button_text = 0x000000; |
||
168 | col_padding = 0xC8C9C9; |
||
5428 | leency | 169 | col_selec = 0x94AECE; |
5767 | leency | 170 | col_lpanel = 0x00699C; |
5428 | leency | 171 | } |
5463 | leency | 172 | |
173 | |||
174 | |||
5687 | leency | 175 | { |
176 | files.item_h = font.size.text + 4; |
||
5825 | leency | 177 | if (files.item_h<18) files.item_h = 18; |
178 | files_active.item_h = files_inactive.item_h = files.item_h; |
||
179 | } |
||
5687 | leency | 180 | |
181 | |||
182 | |||
5463 | leency | 183 | CheckBox(x, y, 14, 14, id, text, system.color.work_graph, system.color.work_text, value); |
5674 | pavelyakov | 184 | }18)> |
5416 | punk_joker | 185 |