Rev 8983 | Rev 9576 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8983 | Rev 9535 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | char path_to_file[4096]; |
1 | char path_to_file[PATHLEN]; |
2 | char file_name2[4096]; |
2 | char file_name2[PATHLEN]; |
3 | edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2}; |
3 | edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2)-2,#file_name2,NULL, 0b,2,2}; |
4 | 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}; |
4 | 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}; |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | BDVK file_info_general; |
6 | BDVK file_info_general; |
Line 30... | Line 30... | ||
30 | dword dirbuf, fcount, i, filename; |
30 | dword dirbuf, fcount, i, filename; |
31 | dword cur_file; |
31 | dword cur_file; |
32 | if (dir_exists(way)) |
32 | if (dir_exists(way)) |
33 | { |
33 | { |
34 | cur_file = malloc(4096); |
34 | cur_file = malloc(PATHLEN); |
35 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
35 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
36 | for (i=0; i |
36 | for (i=0; i |
37 | { |
37 | { |
38 | filename = i*304+dirbuf+72; |
38 | filename = i*304+dirbuf+72; |
39 | strcpy(cur_file, way); |
39 | sprintf(cur_file, "%s/%s", way, filename); |
40 | chrcat(cur_file, '/'); |
- | |
41 | strcat(cur_file, filename); |
- | |
42 | if ( ESDWORD[filename-40] & ATR_FOLDER ) |
40 | if ( ESDWORD[filename-40] & ATR_FOLDER ) |
43 | { |
41 | { |
44 | SetPropertiesDir(cur_file); |
42 | SetPropertiesDir(cur_file); |
45 | } |
43 | } |
46 | SetPropertiesFile(cur_file, #file_info_dirsize); |
44 | SetPropertiesFile(cur_file, #file_info_dirsize); |
47 | } |
45 | } |
Line 93... | Line 91... | ||
93 | } |
91 | } |
94 | 92 | ||
Line 95... | Line 93... | ||
95 | void ShowConfirmQuestionPopin() |
93 | void ShowConfirmQuestionPopin() |
96 | { |
94 | { |
97 | apply_question_active = 1; |
95 | apply_question_active = true; |
98 | DrawPopup(15,80,250,90,1,sc.work, sc.work_graph); |
96 | DrawPopup(15,80,250,90,1,sc.work, sc.work_graph); |
99 | WriteText(35, 102, 0x90, 0x000000, QUEST_1); |
97 | WriteText(35, 102, 0x90, 0x000000, QUEST_1); |
100 | WriteText(65, 117, 0x90, 0x000000, QUEST_2); |
98 | WriteText(65, 117, 0x90, 0x000000, QUEST_2); |
101 | DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES); |
99 | DrawStandartCaptButton(62,138,B_SETINGS_APPLY_SUBFOLDER,T_YES); |
102 | DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO); |
100 | DrawStandartCaptButton(155,138,B_SETINGS_APPLY_NO_SUBFOLDER,T_NO); |
Line 224... | Line 222... | ||
224 | char folder_info[200]; |
222 | char folder_info[200]; |
225 | dword ext1; |
223 | dword ext1; |
226 | dword element_size; |
224 | dword element_size; |
227 | incn y; |
225 | incn y; |
228 | char temp_path[sizeof(file_path)]; |
226 | char temp_path[PATHLEN]; |
229 | DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0); |
227 | bool show_date = false; |
- | 228 | ||
- | 229 | if (chrnum(path, '/')>1) || (streq(path, "/kolibrios")) || (streq(path, "/sys")) show_date = true; |
|
- | 230 | if (getSelectedCount()) show_date = false; |
|
- | 231 | ||
- | 232 | DefineAndDrawWindow(Form.left + 150,150,315,show_date*60+300+skin_height,0x34,sc.work,WINDOW_TITLE_PROPERTIES,0); |
|
230 | GetProcessInfo(#pform, SelfInfo); |
233 | GetProcessInfo(#pform, SelfInfo); |
231 | 234 | ||
Line 232... | Line 235... | ||
232 | DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); |
235 | DrawStandartCaptButton(pform.cwidth - 96, pform.cheight-34, B_CLOSE, T_CLOSE); |
233 | DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); |
236 | DrawStandartCaptButton(pform.cwidth -208, pform.cheight-34, B_APPLY, T_APPLY); |
Line 234... | Line 237... | ||
234 | 237 | ||
235 | WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST); |
238 | WriteText(10, 78, 0x90, sc.work_text, PR_T_DEST); |
Line 236... | Line -... | ||
236 | edit_box_draw stdcall (#path_to_file_ed); |
- | |
237 | - | ||
238 | WriteText(10, 97, 0x90, sc.work_text, PR_T_SIZE); |
239 | edit_box_draw stdcall (#path_to_file_ed); |
239 | 240 | ||
240 | if (getSelectedCount()) |
241 | if (getSelectedCount()) |
241 | { |
242 | { |
242 | PropertiesDrawIcon(NULL, " |
243 | PropertiesDrawIcon(NULL, " |
243 | sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders); |
244 | sprintf(#folder_info,T_FILES_FOLDERS,more_files_count.files,more_files_count.folders); |
244 | WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info); |
245 | WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info); |
245 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG); |
246 | sprintf(#element_size_label,T_PROP_SIZE,ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes); |
246 | WriteText(120, 97, 0x90, sc.work_text, #element_size_label); |
247 | WriteText(10, 97, 0x90, sc.work_text, #element_size_label); |
247 | } |
248 | } |
248 | else |
249 | else |
249 | { |
250 | { |
Line 257... | Line 258... | ||
257 | } |
258 | } |
258 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME); |
259 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, sc.work_text, PR_T_NAME); |
259 | DrawEditBox(#file_name_ed); |
260 | DrawEditBox(#file_name_ed); |
260 | 261 | ||
Line -... | Line 262... | ||
- | 262 | if (!itdir) { |
|
261 | if (!itdir) element_size = file_info_general.sizelo; |
263 | element_size = file_info_general.sizelo; |
262 | else |
264 | } else { |
263 | { |
- | |
- | 265 | sprintf(#folder_info,PR_T_CONTAINS,dir_size.files,dir_size.folders); |
|
264 | WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS); |
266 | WriteText(10, 117, 0x90, sc.work_text, PR_T_CONTAINS); |
265 | sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders); |
- | |
266 | WriteText(120, 116, 0x90, sc.work_text, #folder_info); |
267 | WriteText(120, 117, 0x90, sc.work_text, #folder_info); |
267 | element_size = dir_size.bytes; |
268 | element_size = dir_size.bytes; |
268 | } |
269 | } |
- | 270 | sprintf(#element_size_label,T_PROP_SIZE,ConvertSize64(element_size, NULL),element_size); |
|
- | 271 | WriteText(10, 99, 0x90, sc.work_text, #element_size_label); |
|
- | 272 | } |
|
- | 273 | ||
- | 274 | if (show_date) { |
|
269 | WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); |
275 | WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); |
270 | DrawDate(120, 136, sc.work_text, #file_info_general.datecreate); |
276 | DrawDate(120, 136, sc.work_text, #file_info_general.datecreate); |
271 | DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess); |
277 | DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess); |
272 | DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit); |
278 | DrawDate(120, 176, sc.work_text, #file_info_general.datelastedit); |
273 | - | ||
274 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); |
- | |
275 | WriteText(120, 99, 0x90, sc.work_text, #element_size_label); |
- | |
276 | } |
279 | } |
- | 280 | ||
277 | DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS); |
281 | DrawFrame(10, y.set(pform.cheight - 143), -10*2 + pform.cwidth - 2, 92, FLAGS); |
278 | y.n = 212; //212 => attributes_frame.y |
- | |
279 | ch_read_only.draw(24, y.inc(18)); |
282 | ch_read_only.draw(24, y.inc(18)); |
280 | ch_hidden.draw(24, y.inc(24)); |
283 | ch_hidden.draw(24, y.inc(24)); |
281 | ch_system.draw(24, y.inc(24)); |
284 | ch_system.draw(24, y.inc(24)); |
282 | if (apply_question_active) ShowConfirmQuestionPopin(); |
285 | if (apply_question_active) ShowConfirmQuestionPopin(); |
283 | } |
286 | } |