Rev 8944 | Rev 8949 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8944 | Rev 8947 | ||
---|---|---|---|
1 | #ifdef LANG_RUS |
1 | #ifdef LANG_RUS |
2 | ?define WINDOW_TITLE_PROPERTIES "¢®©á⢠" |
2 | ?define WINDOW_TITLE_PROPERTIES "¢®©á⢠" |
3 | ?define T_CLOSE " ªàëâì" |
3 | ?define T_CLOSE " ªàëâì" |
4 | ?define T_APPLY "ਬ¥¨âì" |
4 | ?define T_APPLY "ਬ¥¨âì" |
5 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
5 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
6 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬?" |
6 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬?" |
7 | ?define PR_T_NAME "•:" |
7 | ?define PR_T_NAME "•:" |
8 | ?define PR_T_DEST " ᯮ«®¦¥¨¥:" |
8 | ?define PR_T_DEST " ᯮ«®¦¥¨¥:" |
9 | ?define PR_T_SIZE " §¬¥à:" |
9 | ?define PR_T_SIZE " §¬¥à:" |
10 | ?define CREATED_OPENED_MODIFIED "®§¤ :\nâªàëâ:\n§¬¥¥:" |
10 | ?define CREATED_OPENED_MODIFIED "®§¤ :\nâªàëâ:\n§¬¥¥:" |
11 | ?define SET_6 " ©«®¢: " |
11 | ?define SET_6 " ©«®¢: " |
12 | ?define SET_7 " ¯®ª: " |
12 | ?define SET_7 " ¯®ª: " |
13 | ?define PR_T_CONTAINS "®¤¥à¦¨â: " |
13 | ?define PR_T_CONTAINS "®¤¥à¦¨â: " |
14 | ?define FLAGS " ââਡãâë " |
14 | ?define FLAGS " ââਡãâë " |
15 | ?define PR_T_HIDDEN "ªàëâë©" |
15 | ?define PR_T_HIDDEN "ªàëâë©" |
16 | ?define PR_T_SYSTEM "¨á⥬ë©" |
16 | ?define PR_T_SYSTEM "¨á⥬ë©" |
17 | ?define PR_T_ONLY_READ "®«ìª® ç⥨¥" |
17 | ?define PR_T_ONLY_READ "®«ìª® ç⥨¥" |
18 | ?define SET_BYTE_LANG "¡ ©â" |
18 | ?define SET_BYTE_LANG "¡ ©â" |
19 | #else // Apply to all subfolders |
19 | #else // Apply to all subfolders |
20 | ?define WINDOW_TITLE_PROPERTIES "Properties" |
20 | ?define WINDOW_TITLE_PROPERTIES "Properties" |
21 | ?define T_CLOSE "Close" |
21 | ?define T_CLOSE "Close" |
22 | ?define T_APPLY "Apply" |
22 | ?define T_APPLY "Apply" |
23 | ?define QUEST_1 "Apply to all subfolders" |
23 | ?define QUEST_1 "Apply to all subfolders" |
24 | ?define QUEST_2 "files and Folders?" |
24 | ?define QUEST_2 "files and Folders?" |
25 | ?define PR_T_NAME "Name:" |
25 | ?define PR_T_NAME "Name:" |
26 | ?define PR_T_DEST "Destination:" |
26 | ?define PR_T_DEST "Destination:" |
27 | ?define PR_T_SIZE "Size:" |
27 | ?define PR_T_SIZE "Size:" |
28 | ?define CREATED_OPENED_MODIFIED "Created:\nOpened:\nModified:" |
28 | ?define CREATED_OPENED_MODIFIED "Created:\nOpened:\nModified:" |
29 | ?define SET_6 "Files: " |
29 | ?define SET_6 "Files: " |
30 | ?define SET_7 " Folders: " |
30 | ?define SET_7 " Folders: " |
31 | ?define PR_T_CONTAINS "Contains: " |
31 | ?define PR_T_CONTAINS "Contains: " |
32 | ?define FLAGS " Attributes " |
32 | ?define FLAGS " Attributes " |
33 | ?define PR_T_HIDDEN "Hidden" |
33 | ?define PR_T_HIDDEN "Hidden" |
34 | ?define PR_T_SYSTEM "System" |
34 | ?define PR_T_SYSTEM "System" |
35 | ?define PR_T_ONLY_READ "Read-only" |
35 | ?define PR_T_ONLY_READ "Read-only" |
36 | ?define SET_BYTE_LANG "byte" |
36 | ?define SET_BYTE_LANG "byte" |
37 | #endif |
37 | #endif |
38 | 38 | ||
39 | #define B_SETINGS_APPLY_SUBFOLDER 301 |
39 | #define B_SETINGS_APPLY_SUBFOLDER 301 |
40 | #define B_SETINGS_APPLY_NO_SUBFOLDER 302 |
40 | #define B_SETINGS_APPLY_NO_SUBFOLDER 302 |
41 | #define B_APPLY 11 |
41 | #define B_APPLY 11 |
42 | #define B_CLOSE 12 |
42 | #define B_CLOSE 12 |
43 | 43 | ||
44 | char path_to_file[4096]; |
44 | char path_to_file[4096]; |
45 | char file_name2[4096]; |
45 | char file_name2[4096]; |
46 | edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2}; |
46 | edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2}; |
47 | edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file)-2,#path_to_file,NULL, 0b,2,2}; |
47 | edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file)-2,#path_to_file,NULL, 0b,2,2}; |
48 | 48 | ||
49 | BDVK file_info_general; |
49 | BDVK file_info_general; |
50 | BDVK file_info_dirsize; |
50 | BDVK file_info_dirsize; |
51 | 51 | ||
52 | bool apply_question_active; |
52 | bool apply_question_active; |
53 | 53 | ||
54 | DIR_SIZE more_files_count; |
54 | DIR_SIZE more_files_count; |
55 | DIR_SIZE dir_size; |
55 | DIR_SIZE dir_size; |
56 | 56 | ||
57 | checkbox ch_read_only = { PR_T_ONLY_READ, NULL }; |
57 | checkbox ch_read_only = { PR_T_ONLY_READ, NULL }; |
58 | checkbox ch_hidden = { PR_T_HIDDEN, NULL }; |
58 | checkbox ch_hidden = { PR_T_HIDDEN, NULL }; |
59 | checkbox ch_system = { PR_T_SYSTEM, NULL }; |
59 | checkbox ch_system = { PR_T_SYSTEM, NULL }; |
60 | 60 | ||
61 | void SetPropertiesFile(dword cur_file, bdvk_pointer) |
61 | void SetPropertiesFile(dword cur_file, bdvk_pointer) |
62 | { |
62 | { |
63 | GetFileInfo(cur_file, bdvk_pointer); |
63 | GetFileInfo(cur_file, bdvk_pointer); |
64 | ESI = bdvk_pointer; |
64 | ESI = bdvk_pointer; |
65 | ESI.BDVK.readonly = ch_read_only.checked; |
65 | ESI.BDVK.readonly = ch_read_only.checked; |
66 | ESI.BDVK.hidden = ch_hidden.checked; |
66 | ESI.BDVK.hidden = ch_hidden.checked; |
67 | ESI.BDVK.system = ch_system.checked; |
67 | ESI.BDVK.system = ch_system.checked; |
68 | SetFileInfo(cur_file, bdvk_pointer); |
68 | SetFileInfo(cur_file, bdvk_pointer); |
69 | } |
69 | } |
70 | 70 | ||
71 | void SetPropertiesDir(dword way) |
71 | void SetPropertiesDir(dword way) |
72 | { |
72 | { |
73 | dword dirbuf, fcount, i, filename; |
73 | dword dirbuf, fcount, i, filename; |
74 | dword cur_file; |
74 | dword cur_file; |
75 | if (dir_exists(way)) |
75 | if (dir_exists(way)) |
76 | { |
76 | { |
77 | cur_file = malloc(4096); |
77 | cur_file = malloc(4096); |
78 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
78 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
79 | for (i=0; i |
79 | for (i=0; i |
80 | { |
80 | { |
81 | filename = i*304+dirbuf+72; |
81 | filename = i*304+dirbuf+72; |
82 | strcpy(cur_file, way); |
82 | strcpy(cur_file, way); |
83 | chrcat(cur_file, '/'); |
83 | chrcat(cur_file, '/'); |
84 | strcat(cur_file, filename); |
84 | strcat(cur_file, filename); |
85 | if ( ESDWORD[filename-40] & ATR_FOLDER ) |
85 | if ( ESDWORD[filename-40] & ATR_FOLDER ) |
86 | { |
86 | { |
87 | SetPropertiesDir(cur_file); |
87 | SetPropertiesDir(cur_file); |
88 | } |
88 | } |
89 | SetPropertiesFile(cur_file, #file_info_dirsize); |
89 | SetPropertiesFile(cur_file, #file_info_dirsize); |
90 | } |
90 | } |
91 | free(cur_file); |
91 | free(cur_file); |
92 | } |
92 | } |
93 | } |
93 | } |
94 | 94 | ||
95 | #define SET_PROPERTIES_SINGLE_FILE 0 |
95 | #define SET_PROPERTIES_SINGLE_FILE 0 |
96 | #define SET_PROPERTIES_NO_SUBFOLDER 1 |
96 | #define SET_PROPERTIES_NO_SUBFOLDER 1 |
97 | #define SET_PROPERTIES_ALL_SUBFOLDER 2 |
97 | #define SET_PROPERTIES_ALL_SUBFOLDER 2 |
98 | void SetProperties(int mode) |
98 | void SetProperties(int mode) |
99 | { |
99 | { |
100 | char pcur_file[4096]; |
100 | char pcur_file[4096]; |
101 | dword i; |
101 | dword i; |
102 | 102 | ||
103 | apply_question_active=false; |
103 | apply_question_active=false; |
104 | 104 | ||
105 | if (SET_PROPERTIES_SINGLE_FILE == mode) { |
105 | if (SET_PROPERTIES_SINGLE_FILE == mode) { |
106 | SetPropertiesFile(#file_path, #file_info_general); |
106 | SetPropertiesFile(#file_path, #file_info_general); |
107 | } |
107 | } |
108 | 108 | ||
109 | if (SET_PROPERTIES_ALL_SUBFOLDER == mode) |
109 | if (SET_PROPERTIES_ALL_SUBFOLDER == mode) |
110 | || (SET_PROPERTIES_NO_SUBFOLDER == mode) |
110 | || (SET_PROPERTIES_NO_SUBFOLDER == mode) |
111 | { |
111 | { |
112 | if (selected_count) |
112 | if (selected_count) |
113 | { |
113 | { |
114 | for (i=0; i |
114 | for (i=0; i |
115 | { |
115 | { |
116 | if (getElementSelectedFlag(i) == true) |
116 | if (getElementSelectedFlag(i) == true) |
117 | { |
117 | { |
118 | sprintf(#pcur_file,"%s/%s",#path,items.get(i)*304+buf+72); |
118 | sprintf(#pcur_file,"%s/%s",#path,items.get(i)*304+buf+72); |
119 | SetPropertiesFile(#pcur_file, #file_info_general); |
119 | SetPropertiesFile(#pcur_file, #file_info_general); |
120 | if (SET_PROPERTIES_ALL_SUBFOLDER == mode) { |
120 | if (SET_PROPERTIES_ALL_SUBFOLDER == mode) { |
121 | if (dir_exists(#pcur_file)) SetPropertiesDir(#pcur_file); |
121 | if (dir_exists(#pcur_file)) SetPropertiesDir(#pcur_file); |
122 | } |
122 | } |
123 | } |
123 | } |
124 | } |
124 | } |
125 | } |
125 | } |
126 | else |
126 | else |
127 | { |
127 | { |
128 | SetPropertiesFile(#file_path, #file_info_general); |
128 | SetPropertiesFile(#file_path, #file_info_general); |
129 | if (SET_PROPERTIES_ALL_SUBFOLDER == mode) SetPropertiesDir(#file_path); |
129 | if (SET_PROPERTIES_ALL_SUBFOLDER == mode) SetPropertiesDir(#file_path); |
130 | } |
130 | } |
131 | } |
131 | } |
132 | 132 | ||
133 | cmd_free=3; |
133 | cmd_free=3; |
134 | _not_draw = true; |
- | |
135 | Open_Dir(#path,WITH_REDRAW); |
134 | Open_Dir(#path,ONLY_OPEN); |
136 | _not_draw = false; |
- | |
137 | EventRedrawWindow(Form.left,Form.top); |
- | |
138 | ExitProcess(); |
135 | ExitProcess(); |
139 | } |
136 | } |
140 | 137 | ||
141 | void ShowConfirmQuestionPopin() |
138 | void ShowConfirmQuestionPopin() |
142 | { |
139 | { |
143 | apply_question_active = 1; |
140 | apply_question_active = 1; |
144 | DrawPopup(15,80,250,90,1,sc.work, sc.work_graph); |
141 | DrawPopup(15,80,250,90,1,sc.work, sc.work_graph); |
145 | WriteText(35, 102, 0x90, 0x000000, QUEST_1); |
142 | WriteText(35, 102, 0x90, 0x000000, QUEST_1); |
146 | WriteText(65, 117, 0x90, 0x000000, QUEST_2); |
143 | WriteText(65, 117, 0x90, 0x000000, QUEST_2); |
147 | DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES); |
144 | DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES); |
148 | DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO); |
145 | DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO); |
149 | } |
146 | } |
150 | 147 | ||
151 | void GetSizeMoreFiles(dword way) |
148 | void GetSizeMoreFiles(dword way) |
152 | { |
149 | { |
153 | char cur_file[4096]; |
150 | char cur_file[4096]; |
154 | dword i; |
151 | dword i; |
155 | 152 | ||
156 | for (i=0; i |
153 | for (i=0; i |
157 | { |
154 | { |
158 | if (getElementSelectedFlag(i) == true) |
155 | if (getElementSelectedFlag(i) == true) |
159 | { |
156 | { |
160 | sprintf(#cur_file,"%s/%s",way,items.get(i)*304+buf+72); |
157 | sprintf(#cur_file,"%s/%s",way,items.get(i)*304+buf+72); |
161 | if (ESDWORD[items.get(i)*304+buf+32] & ATR_FOLDER ) |
158 | if (ESDWORD[items.get(i)*304+buf+32] & ATR_FOLDER ) |
162 | { |
159 | { |
163 | more_files_count.calculate_loop(#cur_file); |
160 | more_files_count.calculate_loop(#cur_file); |
164 | more_files_count.folders++; |
161 | more_files_count.folders++; |
165 | } |
162 | } |
166 | else |
163 | else |
167 | { |
164 | { |
168 | GetFileInfo(#cur_file, #file_info_dirsize); |
165 | GetFileInfo(#cur_file, #file_info_dirsize); |
169 | more_files_count.bytes += file_info_dirsize.sizelo; |
166 | more_files_count.bytes += file_info_dirsize.sizelo; |
170 | more_files_count.files++; |
167 | more_files_count.files++; |
171 | } |
168 | } |
172 | } |
169 | } |
173 | } |
170 | } |
174 | } |
171 | } |
175 | 172 | ||
176 | void properties_dialog() |
173 | void properties_dialog() |
177 | { |
174 | { |
178 | int id; |
175 | int id; |
179 | 176 | ||
180 | if (selected_count) |
177 | if (selected_count) |
181 | { |
178 | { |
182 | more_files_count.get(NULL); |
179 | more_files_count.get(NULL); |
183 | GetSizeMoreFiles(#path); |
180 | GetSizeMoreFiles(#path); |
184 | ch_read_only.checked = 0; |
181 | ch_read_only.checked = 0; |
185 | ch_hidden.checked = 0; |
182 | ch_hidden.checked = 0; |
186 | ch_system.checked = 0; |
183 | ch_system.checked = 0; |
187 | } |
184 | } |
188 | else |
185 | else |
189 | { |
186 | { |
190 | GetFileInfo(#file_path, #file_info_general); |
187 | GetFileInfo(#file_path, #file_info_general); |
191 | edit_box_set_text stdcall (#file_name_ed, #file_name); |
188 | edit_box_set_text stdcall (#file_name_ed, #file_name); |
192 | if(itdir) dir_size.get(#file_path); |
189 | if(itdir) dir_size.get(#file_path); |
193 | ch_read_only.checked = file_info_general.readonly; |
190 | ch_read_only.checked = file_info_general.readonly; |
194 | ch_hidden.checked = file_info_general.hidden; |
191 | ch_hidden.checked = file_info_general.hidden; |
195 | ch_system.checked = file_info_general.system; |
192 | ch_system.checked = file_info_general.system; |
196 | } |
193 | } |
197 | edit_box_set_text stdcall (#path_to_file_ed, #path); |
194 | edit_box_set_text stdcall (#path_to_file_ed, #path); |
198 | 195 | ||
199 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
196 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
200 | loop() switch(WaitEvent()) |
197 | loop() switch(WaitEvent()) |
201 | { |
198 | { |
202 | case evButton: |
199 | case evButton: |
203 | id=GetButtonID(); |
200 | id=GetButtonID(); |
204 | ch_read_only.click(id); |
201 | ch_read_only.click(id); |
205 | ch_hidden.click(id); |
202 | ch_hidden.click(id); |
206 | ch_system.click(id); |
203 | ch_system.click(id); |
207 | if (apply_question_active) |
204 | if (apply_question_active) |
208 | { |
205 | { |
209 | IF (id==B_SETINGS_APPLY_SUBFOLDER) |
206 | IF (id==B_SETINGS_APPLY_SUBFOLDER) |
210 | SetProperties(SET_PROPERTIES_ALL_SUBFOLDER); |
207 | SetProperties(SET_PROPERTIES_ALL_SUBFOLDER); |
211 | IF (id==B_SETINGS_APPLY_NO_SUBFOLDER) |
208 | IF (id==B_SETINGS_APPLY_NO_SUBFOLDER) |
212 | SetProperties(SET_PROPERTIES_NO_SUBFOLDER); |
209 | SetProperties(SET_PROPERTIES_NO_SUBFOLDER); |
213 | break; |
210 | break; |
214 | } |
211 | } |
215 | if (id==1) || (id==B_CLOSE) |
212 | if (id==1) || (id==B_CLOSE) |
216 | { |
213 | { |
217 | cmd_free=3; |
214 | cmd_free=3; |
218 | ExitProcess(); |
215 | ExitProcess(); |
219 | } |
216 | } |
220 | if (id==B_APPLY) EventApplyProperties(); |
217 | if (id==B_APPLY) EventApplyProperties(); |
221 | break; |
218 | break; |
222 | 219 | ||
223 | case evMouse: |
220 | case evMouse: |
224 | edit_box_mouse stdcall (#file_name_ed); |
221 | edit_box_mouse stdcall (#file_name_ed); |
225 | edit_box_mouse stdcall (#path_to_file_ed); |
222 | edit_box_mouse stdcall (#path_to_file_ed); |
226 | break; |
223 | break; |
227 | 224 | ||
228 | case evKey: |
225 | case evKey: |
229 | GetKeys(); |
226 | GetKeys(); |
230 | 227 | ||
231 | if (apply_question_active) |
228 | if (apply_question_active) |
232 | { |
229 | { |
233 | IF (key_scancode==SCAN_CODE_ENTER) |
230 | IF (key_scancode==SCAN_CODE_ENTER) |
234 | SetProperties(SET_PROPERTIES_ALL_SUBFOLDER); |
231 | SetProperties(SET_PROPERTIES_ALL_SUBFOLDER); |
235 | IF (key_scancode==SCAN_CODE_ESC) |
232 | IF (key_scancode==SCAN_CODE_ESC) |
236 | SetProperties(SET_PROPERTIES_NO_SUBFOLDER); |
233 | SetProperties(SET_PROPERTIES_NO_SUBFOLDER); |
237 | break; |
234 | break; |
238 | } |
235 | } |
239 | 236 | ||
240 | switch(key_scancode) |
237 | switch(key_scancode) |
241 | { |
238 | { |
242 | case SCAN_CODE_ESC: |
239 | case SCAN_CODE_ESC: |
243 | cmd_free=3; |
240 | cmd_free=3; |
244 | ExitProcess(); |
241 | ExitProcess(); |
245 | break; |
242 | break; |
246 | 243 | ||
247 | case SCAN_CODE_ENTER: |
244 | case SCAN_CODE_ENTER: |
248 | EventApplyProperties(); |
245 | EventApplyProperties(); |
249 | break; |
246 | break; |
250 | 247 | ||
251 | case SCAN_CODE_KEY_A: |
248 | case SCAN_CODE_KEY_A: |
252 | case SCAN_CODE_KEY_C: |
249 | case SCAN_CODE_KEY_C: |
253 | if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) { |
250 | if (key_modifier & KEY_LCTRL) || (key_modifier & KEY_RCTRL) { |
254 | EAX = key_editbox; |
251 | EAX = key_editbox; |
255 | edit_box_key stdcall(#file_name_ed); |
252 | edit_box_key stdcall(#file_name_ed); |
256 | edit_box_key stdcall(#path_to_file_ed); |
253 | edit_box_key stdcall(#path_to_file_ed); |
257 | } |
254 | } |
258 | } |
255 | } |
259 | break; |
256 | break; |
260 | 257 | ||
261 | case evReDraw: |
258 | case evReDraw: |
262 | DrawPropertiesWindow(); |
259 | DrawPropertiesWindow(); |
263 | } |
260 | } |
264 | } |
261 | } |
265 | 262 | ||
266 | void DrawPropertiesWindow() |
263 | void DrawPropertiesWindow() |
267 | { |
264 | { |
268 | proc_info pform; |
265 | proc_info pform; |
269 | char element_size_label[32]; |
266 | char element_size_label[32]; |
270 | char folder_info[200]; |
267 | char folder_info[200]; |
271 | dword ext1; |
268 | dword ext1; |
272 | dword element_size; |
269 | dword element_size; |
273 | incn y; |
270 | incn y; |
274 | char temp_path[sizeof(file_path)]; |
271 | char temp_path[sizeof(file_path)]; |
275 | DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0); |
272 | DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0); |
276 | GetProcessInfo(#pform, SelfInfo); |
273 | GetProcessInfo(#pform, SelfInfo); |
277 | 274 | ||
278 | DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); |
275 | DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); |
279 | DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); |
276 | DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); |
280 | 277 | ||
281 | WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST); |
278 | WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST); |
282 | edit_box_draw stdcall (#path_to_file_ed); |
279 | edit_box_draw stdcall (#path_to_file_ed); |
283 | 280 | ||
284 | WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE); |
281 | WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE); |
285 | 282 | ||
286 | if (selected_count) |
283 | if (selected_count) |
287 | { |
284 | { |
288 | PropertiesDrawIcon(NULL, " |
285 | PropertiesDrawIcon(NULL, " |
289 | sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders); |
286 | sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders); |
290 | WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info); |
287 | WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info); |
291 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG); |
288 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG); |
292 | WriteText(120, 97, 0x90, sc.work_text, #element_size_label); |
289 | WriteText(120, 97, 0x90, sc.work_text, #element_size_label); |
293 | } |
290 | } |
294 | else |
291 | else |
295 | { |
292 | { |
296 | if ( file_info_general.isfolder ) |
293 | if ( file_info_general.isfolder ) |
297 | PropertiesDrawIcon(NULL, " |
294 | PropertiesDrawIcon(NULL, " |
298 | else { |
295 | else { |
299 | sprintf(#temp_path,"%s/%s",#path,#file_name2); |
296 | sprintf(#temp_path,"%s/%s",#path,#file_name2); |
300 | ext1 = strrchr(#file_name2,'.'); |
297 | ext1 = strrchr(#file_name2,'.'); |
301 | if (ext1) ext1 += #file_name2; |
298 | if (ext1) ext1 += #file_name2; |
302 | PropertiesDrawIcon(#temp_path, ext1); |
299 | PropertiesDrawIcon(#temp_path, ext1); |
303 | } |
300 | } |
304 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME); |
301 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME); |
305 | DrawEditBox(#file_name_ed); |
302 | DrawEditBox(#file_name_ed); |
306 | 303 | ||
307 | if (!itdir) element_size = file_info_general.sizelo; |
304 | if (!itdir) element_size = file_info_general.sizelo; |
308 | else |
305 | else |
309 | { |
306 | { |
310 | WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS); |
307 | WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS); |
311 | sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders); |
308 | sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders); |
312 | WriteText(120, 116, 0x90, sc.work_text, #folder_info); |
309 | WriteText(120, 116, 0x90, sc.work_text, #folder_info); |
313 | element_size = dir_size.bytes; |
310 | element_size = dir_size.bytes; |
314 | } |
311 | } |
315 | WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); |
312 | WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); |
316 | DrawDate(120, 136, sc.work_text, #file_info_general.datecreate); |
313 | DrawDate(120, 136, sc.work_text, #file_info_general.datecreate); |
317 | DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess); |
314 | DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess); |
318 | DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit); |
315 | DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit); |
319 | 316 | ||
320 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); |
317 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); |
321 | WriteText(120, 99, 0x90, sc.work_text, #element_size_label); |
318 | WriteText(120, 99, 0x90, sc.work_text, #element_size_label); |
322 | } |
319 | } |
323 | DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS); |
320 | DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS); |
324 | y.n = 212; //212 => attributes_frame.y |
321 | y.n = 212; //212 => attributes_frame.y |
325 | ch_read_only.draw(24, y.inc(18)); |
322 | ch_read_only.draw(24, y.inc(18)); |
326 | ch_hidden.draw(24, y.inc(24)); |
323 | ch_hidden.draw(24, y.inc(24)); |
327 | ch_system.draw(24, y.inc(24)); |
324 | ch_system.draw(24, y.inc(24)); |
328 | if (apply_question_active) ShowConfirmQuestionPopin(); |
325 | if (apply_question_active) ShowConfirmQuestionPopin(); |
329 | } |
326 | } |
330 | 327 | ||
331 | void PropertiesDrawIcon(dword file_path, extension) |
328 | void PropertiesDrawIcon(dword file_path, extension) |
332 | { |
329 | { |
333 | #define ICON_PADDING 11 |
330 | #define ICON_PADDING 11 |
334 | DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff); |
331 | DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff); |
335 | DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff); |
332 | DrawIconByExtension(file_path, extension, -icon_size/2+28, -icon_size/2+38, 0xFFFfff); |
336 | } |
333 | } |
337 | 334 | ||
338 | void EventApplyProperties() |
335 | void EventApplyProperties() |
339 | { |
336 | { |
340 | if (selected_count) || (itdir) { |
337 | if (selected_count) || (itdir) { |
341 | ShowConfirmQuestionPopin(); |
338 | ShowConfirmQuestionPopin(); |
342 | } else { |
339 | } else { |
343 | SetProperties(SET_PROPERTIES_SINGLE_FILE); |
340 | SetProperties(SET_PROPERTIES_SINGLE_FILE); |
344 | } |
341 | } |
345 | } |
342 | } |