Rev 9685 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9685 | Rev 9693 | ||
---|---|---|---|
Line 117... | Line 117... | ||
117 | } |
117 | } |
118 | else |
118 | else |
119 | { |
119 | { |
120 | GetFileInfo(#cur_file, #file_info_dirsize); |
120 | GetFileInfo(#cur_file, #file_info_dirsize); |
121 | more_files_count.bytes += file_info_dirsize.sizelo; |
121 | more_files_count.sizelo += file_info_dirsize.sizelo; |
122 | more_files_count.bytes += file_info_dirsize.sizehi; |
122 | more_files_count.sizehi += file_info_dirsize.sizehi; |
123 | more_files_count.files++; |
123 | more_files_count.files++; |
124 | } |
124 | } |
125 | } |
125 | } |
126 | } |
126 | } |
127 | } |
127 | } |
128 | 128 | ||
Line 169... | Line 169... | ||
169 | { |
169 | { |
170 | cmd_free=3; |
170 | cmd_free=3; |
171 | ExitProcess(); |
171 | ExitProcess(); |
172 | } |
172 | } |
173 | if (id==B_APPLY) EventApplyProperties(); |
173 | if (id==B_APPLY) goto _APPLY_PROPERTIES; |
174 | break; |
174 | break; |
175 | 175 | ||
Line 176... | Line 176... | ||
176 | case evMouse: |
176 | case evMouse: |
177 | edit_box_mouse stdcall (#file_name_ed); |
177 | edit_box_mouse stdcall (#file_name_ed); |
178 | edit_box_mouse stdcall (#path_to_file_ed); |
178 | edit_box_mouse stdcall (#path_to_file_ed); |
Line 197... | Line 197... | ||
197 | ExitProcess(); |
197 | ExitProcess(); |
198 | break; |
198 | break; |
199 | 199 | ||
Line 200... | Line 200... | ||
200 | case SCAN_CODE_ENTER: |
200 | case SCAN_CODE_ENTER: |
- | 201 | _APPLY_PROPERTIES: |
|
- | 202 | if (getSelectedCount()) || (itdir) { |
|
201 | EventApplyProperties(); |
203 | ShowConfirmQuestionPopin(); |
- | 204 | } else { |
|
- | 205 | SetProperties(SET_PROPERTIES_SINGLE_FILE); |
|
- | 206 | } |
|
202 | break; |
207 | break; |
Line 203... | Line 208... | ||
203 | 208 | ||
204 | case SCAN_CODE_KEY_A: |
209 | case SCAN_CODE_KEY_A: |
205 | case SCAN_CODE_KEY_C: |
210 | case SCAN_CODE_KEY_C: |
Line 218... | Line 223... | ||
218 | 223 | ||
Line 219... | Line 224... | ||
219 | void DrawPropertiesWindow() |
224 | void DrawPropertiesWindow() |
220 | { |
225 | { |
221 | proc_info pform; |
226 | proc_info pform; |
222 | char size_lbl[32]; |
- | |
223 | char folder_info[200]; |
- | |
224 | dword ext1; |
227 | dword ext1; |
225 | incn y; |
228 | incn y; |
226 | char temp_path[PATHLEN]; |
229 | char temp_path[PATHLEN]; |
227 | bool show_date = false; |
230 | bool show_date = false; |
Line -... | Line 231... | ||
- | 231 | ||
- | 232 | dword p_t_formated_size; |
|
- | 233 | dword p_q_size_bytes; |
|
- | 234 | dword t_contains_files_and_folders[200]; |
|
228 | 235 | ||
229 | if (chrnum(path, '/')>1) || (streq(path, "/kolibrios")) || (streq(path, "/sys")) show_date = true; |
236 | if (chrnum(path, '/')>1) || (streq(path, "/kolibrios")) || (streq(path, "/sys")) show_date = true; |
Line 230... | Line 237... | ||
230 | if (getSelectedCount()) show_date = false; |
237 | if (getSelectedCount()) show_date = false; |
231 | 238 | ||
Line 232... | Line 239... | ||
232 | DefineAndDrawWindow(Form.left + 150,150,315,show_date*60+300+skin_h,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0); |
239 | DefineAndDrawWindow(Form.left + 150,150,315,show_date*60+342+skin_h,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0); |
233 | GetProcessInfo(#pform, SelfInfo); |
240 | GetProcessInfo(#pform, SelfInfo); |
Line 234... | Line -... | ||
234 | - | ||
235 | DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); |
- | |
236 | DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); |
- | |
237 | 241 | ||
238 | WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST); |
242 | DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); |
239 | edit_box_draw stdcall (#path_to_file_ed); |
243 | DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); |
240 | - | ||
241 | if (getSelectedCount()) |
244 | |
242 | { |
245 | if (getSelectedCount()) |
243 | PropertiesDrawIcon(NULL, " |
246 | { |
244 | sprintf(#folder_info,T_FILES_FOLDERS,more_files_count.files,more_files_count.folders); |
- | |
- | 247 | PropertiesDrawIcon(NULL, " |
|
245 | WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info); |
248 | WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, T_BULK_SELECTION); |
246 | sprintf(#size_lbl,T_PROP_SIZE,ConvertSize64(more_files_count.bytes, more_files_count.bytes>>32),more_files_count.bytes); |
- | |
- | 249 | p_t_formated_size = ConvertSize64(more_files_count.sizelo, more_files_count.sizehi); |
|
247 | WriteText(10, 97, 0x90, sc.work_text, #size_lbl); |
250 | p_q_size_bytes = #more_files_count.sizelo; |
- | 251 | sprintf(#t_contains_files_and_folders,T_FILES_FOLDERS,more_files_count.files,more_files_count.folders); |
|
248 | } |
252 | } else { |
- | 253 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, T_NAME); |
|
- | 254 | DrawEditBox(#file_name_ed); |
|
- | 255 | if (itdir) { |
|
249 | else |
256 | PropertiesDrawIcon(NULL, " |
250 | { |
257 | p_t_formated_size = ConvertSize64(dir_size.sizelo, dir_size.sizehi); |
251 | if ( file_info_general.isfolder ) |
258 | p_q_size_bytes = #dir_size.sizelo; |
252 | PropertiesDrawIcon(NULL, " |
- | |
253 | else { |
259 | sprintf(#t_contains_files_and_folders,T_FILES_FOLDERS,dir_size.files,dir_size.folders); |
- | 260 | } else { |
|
- | 261 | sprintf(#temp_path,"%s/%s",path,#file_name2); |
|
- | 262 | if (ext1 = strrchr(#file_name2,'.')) ext1 += #file_name2; |
|
254 | sprintf(#temp_path,"%s/%s",path,#file_name2); |
263 | PropertiesDrawIcon(#temp_path, ext1); |
255 | ext1 = strrchr(#file_name2,'.'); |
- | |
256 | if (ext1) ext1 += #file_name2; |
- | |
257 | PropertiesDrawIcon(#temp_path, ext1); |
- | |
258 | } |
- | |
259 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME); |
- | |
260 | DrawEditBox(#file_name_ed); |
- | |
261 | - | ||
262 | if (!itdir) { |
- | |
263 | sprintf(#size_lbl,T_PROP_SIZE,ConvertSize64(file_info_general.sizelo, file_info_general.sizehi),file_info_general.sizelo); |
- | |
264 | } else { |
- | |
265 | sprintf(#folder_info,T_FILES_FOLDERS,dir_size.files,dir_size.folders); |
- | |
266 | WriteText(10, 117, 0x90, sc.work_text, PR_T_CONTAINS); |
- | |
267 | WriteText(120, 117, 0x90, sc.work_text, #folder_info); |
264 | p_t_formated_size = ConvertSize64(file_info_general.sizelo, file_info_general.sizehi); |
- | 265 | p_q_size_bytes = #file_info_general.sizelo; |
|
- | 266 | sprintf(#t_contains_files_and_folders,T_DATA); |
|
- | 267 | } |
|
- | 268 | } |
|
- | 269 | WriteTextLines(10, y.set(78), 0x90, sc.work_text, T_PATH_SIZE, 20); |
|
- | 270 | edit_box_draw stdcall (#path_to_file_ed); |
|
Line 268... | Line 271... | ||
268 | sprintf(#size_lbl,T_PROP_SIZE,ConvertSize64(dir_size.bytes, dir_size.bytes_high),dir_size.bytes); |
271 | |
269 | } |
272 | WriteText(120, y.inc(20), 0x90, sc.work_text, p_t_formated_size); |
270 | WriteText(10, 99, 0x90, sc.work_text, #size_lbl); |
273 | WriteNumber(120, y.inc(20), 0x90, sc.work_text, 0xc0140001, p_q_size_bytes); |
271 | } |
274 | WriteText(120, y.inc(20), 0x90, sc.work_text, #t_contains_files_and_folders); |
272 | 275 | ||
273 | if (show_date) { |
276 | if (show_date) { |
Line 274... | Line 277... | ||
274 | WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); |
277 | WriteTextLines(10, y.inc(32), 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); |
275 | DrawDateTime(120, 136, sc.work_text, #file_info_general.datecreate, #file_info_general.timecreate); |
278 | DrawDateTime(120, y.n, sc.work_text, #file_info_general.datecreate, #file_info_general.timecreate); |
276 | DrawDateTime(120, 156, sc.work_text, #file_info_general.datelastaccess, #file_info_general.timelastaccess); |
279 | DrawDateTime(120, y.inc(20), sc.work_text, #file_info_general.datelastaccess, #file_info_general.timelastaccess); |
Line 288... | Line 291... | ||
288 | { |
291 | { |
289 | int icon_n = ini_icons.get(file_path, extension, 32); |
292 | int icon_n = ini_icons.get(file_path, extension, 32); |
290 | draw_icon_32(12, 22, sc.work, icon_n); |
293 | draw_icon_32(12, 22, sc.work, icon_n); |
291 | } |
294 | } |
292 | 295 | ||
293 | void EventApplyProperties() |
- | |
294 | { |
- | |
295 | if (getSelectedCount()) || (itdir) { |
- | |
296 | ShowConfirmQuestionPopin(); |
- | |
297 | } else { |
- | |
298 | SetProperties(SET_PROPERTIES_SINGLE_FILE); |
- | |
299 | } |
- | |
300 | } |
- | |
301 | - | ||
302 | 296 |