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