Rev 7220 | Rev 7244 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7220 | Rev 7227 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | #endif |
37 | #endif |
Line 38... | Line 38... | ||
38 | 38 | ||
39 | dword mouse_2; |
39 | dword mouse_2; |
40 | char path_to_file[4096]; |
40 | char path_to_file[4096]; |
41 | char file_name2[4096]; |
41 | char file_name2[4096]; |
42 | edit_box file_name_ed = {230,55,35,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2),#file_name2,#mouse_2, 1000000000000000b,2,2}; |
42 | edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2),#file_name2,#mouse_2, 1000000000000000b,2,2}; |
43 | edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file),#path_to_file,#mouse_2, 1000000000000000b,2,2}; |
- | |
Line 44... | Line 43... | ||
44 | frame flags_frame = { 0, NULL, 10, 92, 212, 0x000111, 0xFFFfff, 1, FLAGS, 0, 1, 12, 0x000111, 0xFFFFFF }; |
43 | edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file),#path_to_file,#mouse_2, 1000000000000000b,2,2}; |
45 | 44 | ||
46 | int file_count, dir_count, size_dir; |
45 | int file_count, dir_count, size_dir; |
47 | char folder_info[200]; |
46 | char folder_info[200]; |
Line 232... | Line 231... | ||
232 | atr_system = file_info_general.system; |
231 | atr_system = file_info_general.system; |
233 | } |
232 | } |
234 | strcpy(#path_to_file, #path); |
233 | strcpy(#path_to_file, #path); |
235 | path_to_file_ed.size = strlen(#path_to_file); |
234 | path_to_file_ed.size = strlen(#path_to_file); |
Line 236... | Line 235... | ||
236 | 235 | ||
237 | SetEventMask(0x27); |
236 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
238 | loop() switch(WaitEvent()) |
237 | loop() switch(WaitEvent()) |
239 | { |
238 | { |
240 | case evButton: |
239 | case evButton: |
241 | id=GetButtonID(); |
240 | id=GetButtonID(); |
Line 323... | Line 322... | ||
323 | 322 | ||
324 | void DrawPropertiesWindow() |
323 | void DrawPropertiesWindow() |
325 | { |
324 | { |
326 | dword ext1; |
325 | dword ext1; |
327 | char temp_path[sizeof(file_path)]; |
326 | char temp_path[sizeof(file_path)]; |
328 | DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0); |
- | |
329 | if ( !asm test path_to_file_ed.flags, 2) |
- | |
330 | { |
- | |
331 | path_to_file_ed.blur_border_color = system.color.work; |
- | |
332 | path_to_file_ed.color = system.color.work; |
- | |
333 | } |
- | |
334 | else |
- | |
335 | { |
- | |
336 | path_to_file_ed.blur_border_color = 0x000000; |
- | |
337 | path_to_file_ed.color = 0xffffff; |
- | |
338 | } |
- | |
339 | if ( !asm test path_to_file_ed.flags, 2) |
- | |
340 | { |
- | |
341 | file_name_ed.blur_border_color = system.color.work; |
- | |
342 | file_name_ed.color = system.color.work; |
- | |
343 | } |
- | |
344 | else |
- | |
345 | { |
- | |
346 | file_name_ed.blur_border_color = 0x000000; |
- | |
347 | file_name_ed.color = 0xffffff; |
- | |
348 | } |
327 | DefineAndDrawWindow(Form.left + 150,150,315,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0); |
Line 349... | Line 328... | ||
349 | GetProcessInfo(#settings_form, SelfInfo); |
328 | GetProcessInfo(#settings_form, SelfInfo); |
350 | 329 | ||
Line 372... | Line 351... | ||
372 | sprintf(#temp_path,"%s/%s",#path,#file_name2); |
351 | sprintf(#temp_path,"%s/%s",#path,#file_name2); |
373 | ext1 = strrchr(#file_name2,'.'); |
352 | ext1 = strrchr(#file_name2,'.'); |
374 | if (ext1) ext1 += #file_name2; |
353 | if (ext1) ext1 += #file_name2; |
375 | PropertiesDrawIcon(#temp_path, ext1); |
354 | PropertiesDrawIcon(#temp_path, ext1); |
376 | } |
355 | } |
377 | WriteText(file_name_ed.left+4, 20, 0x80, system.color.work_text, PR_T_NAME); |
356 | WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, system.color.work_text, PR_T_NAME); |
378 | edit_box_draw stdcall (#file_name_ed); |
357 | DrawEditBox(#file_name_ed); |
Line 379... | Line 358... | ||
379 | 358 | ||
380 | if (!itdir) element_size = file_info_general.sizelo; |
359 | if (!itdir) element_size = file_info_general.sizelo; |
381 | else |
360 | else |
382 | { |
361 | { |
Line 391... | Line 370... | ||
391 | DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit); |
370 | DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit); |
Line 392... | Line 371... | ||
392 | 371 | ||
393 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); |
372 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); |
394 | WriteText(120, 99, 0x90, system.color.work_text, #element_size_label); |
373 | WriteText(120, 99, 0x90, system.color.work_text, #element_size_label); |
395 | } |
374 | } |
396 | flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; |
- | |
397 | flags_frame.font_color = system.color.work_text; |
- | |
398 | flags_frame.ext_col = system.color.work_graph; |
- | |
399 | flags_frame.font_backgr_color = system.color.work; |
- | |
400 | frame_draw stdcall (#flags_frame); |
375 | DrawFrame(10, 212, -10*2 + settings_form.cwidth - 2, 92, FLAGS); |
401 | DrawPropertiesCheckBoxes(); |
376 | DrawPropertiesCheckBoxes(); |
Line 402... | Line 377... | ||
402 | } |
377 | } |
403 | 378 | ||
404 | void PropertiesDrawIcon(dword file_path, extension) |
379 | void PropertiesDrawIcon(dword file_path, extension) |
405 | { |
380 | { |
406 | #define ICON_PADDING 10 |
381 | #define ICON_PADDING 11 |
407 | DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, system.color.work_light); |
382 | DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff); |
Line 408... | Line 383... | ||
408 | DrawIconByExtension(file_path, extension, 20, 30, system.color.work_light); |
383 | DrawIconByExtension(file_path, extension, 20, 30, system.color.work_light); |
409 | } |
384 | } |
410 | 385 | ||
411 | void DrawPropertiesCheckBoxes() |
386 | void DrawPropertiesCheckBoxes() |
412 | { |
387 | { |
413 | incn y; |
388 | incn y; |
414 | y.n = flags_frame.start_y; |
389 | y.n = 212; //212 => attributes_frame.y |
415 | CheckBox(24, y.inc(18), 20, PR_T_ONLY_READ, atr_readonly); |
390 | CheckBox(24, y.inc(18), 20, PR_T_ONLY_READ, atr_readonly); |