Rev 5697 | Rev 5702 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5697 | Rev 5698 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | //images |
21 | //images |
22 | #include "imgs\toolbar.txt" |
22 | #include "imgs\toolbar.txt" |
23 | #include "imgs\left_p.txt" |
23 | #include "imgs\left_p.txt" |
24 | #include "imgs\icons.txt" |
24 | #include "imgs\icons.txt" |
Line 25... | Line -... | ||
25 | - | ||
26 | #ifdef LANG_RUS |
- | |
27 | ?define T_FILE " ©«" |
- | |
28 | ?define T_TYPE "¨¯" |
- | |
29 | ?define T_SIZE " §¬¥à" |
- | |
30 | ?define T_NEW_FOLDER "®¢ ï ¯ ¯ª " |
- | |
31 | ?define T_NEW_FILE "®¢ë© ä ©«" |
- | |
32 | ?define T_DELETE_FILE "ë ¤¥©áâ¢¨â¥«ì® å®â¨â¥ 㤠«¨âì" |
- | |
33 | ?define T_YES " " |
- | |
34 | ?define T_NO "¥â" |
- | |
35 | ?define T_CANCEL "⬥ " |
- | |
36 | ?define T_CREATE "®§¤ âì" |
- | |
37 | ?define T_RENAME "¥à¥¨¬¥®¢ âì" |
- | |
38 | ?define FS_ITEM_ALREADY_EXISTS "'«¥¬¥â á â ª¨¬ ¨¬¥¥¬ 㦥 áãé¥áâ¢ã¥â' -E" |
- | |
39 | ?define T_DEL_ERROR_1 "訡ª . ¯ª ¥ ¯ãáâ ï." |
- | |
40 | ?define WAIT_DELETING_FOLDER "¤ «ï¥âáï ¯ ¯ª . ®¤®¦¨â¥..." |
- | |
41 | ?define NOT_CREATE_FOLDER "¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã." |
- | |
42 | ?define NOT_CREATE_FILE "¥ 㤠«®áì ᮧ¤ âì ä ©«." |
- | |
43 | ?define T_PASTE_WINDOW_TITLE "®¯¨àãî..." |
- | |
44 | ?define T_PASTE_WINDOW_TEXT "®¯¨àã¥âáï ä ©«:" |
- | |
45 | ?define T_PASTE_WINDOW_BUTTON "à¥à¢ âì" |
- | |
46 | ?define INFO_AFTER_COPY "®¯¨à®¢ ¨¥ § ¢¥à襮" |
- | |
47 | ?define T_CANCEL_PASTE "®¯¨à®¢ ¨¥ ¯à¥ªà 饮. ¯ª ᪮¯¨à®¢ ¥ ¯®«®áâìî." |
- | |
48 | ?define T_SELECT_APP_TO_OPEN_WITH "ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« " |
- | |
49 | ?define DEL_MORE_FILES_1 "¢ë¡à ë¥ í«¥¬¥âë (" |
- | |
50 | ?define DEL_MORE_FILES_2 " èâ.)?" |
- | |
51 | #elif LANG_EST |
- | |
52 | ?define T_FILE "Fail" |
- | |
53 | ?define T_TYPE "T№№p" |
- | |
54 | ?define T_SIZE "Suurus" |
- | |
55 | ?define T_NEW_FOLDER "Uus kataloog" |
- | |
56 | ?define T_NEW_FILE "Uus fail" |
- | |
57 | ?define T_DELETE_FILE "Kas sa tahad tїesti kustutada" |
- | |
58 | ?define T_YES "Jah" |
- | |
59 | ?define T_NO "Ei" |
- | |
60 | ?define T_CANCEL "Cancel" |
- | |
61 | ?define T_CREATE "Create" |
- | |
62 | ?define T_RENAME "Rename" |
- | |
63 | ?define FS_ITEM_ALREADY_EXISTS "'An item with that name already exists' -E" |
- | |
64 | ?define T_DEL_ERROR_1 "Viga. Kataloog ei ole t№hi." |
- | |
65 | ?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..." |
- | |
66 | ?define NOT_CREATE_FOLDER "Kataloogi ei saa luua." |
- | |
67 | ?define NOT_CREATE_FILE "Faili ei saa luua." |
- | |
68 | ?define T_PASTE_WINDOW_TITLE "Kopeerin..." |
- | |
69 | ?define T_PASTE_WINDOW_TEXT "Kopeerin faili:" |
- | |
70 | ?define T_PASTE_WINDOW_BUTTON "Abort" |
- | |
71 | ?define INFO_AFTER_COPY "Copy finished" |
- | |
72 | ?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely." |
- | |
73 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
- | |
74 | ?define DEL_MORE_FILES_1 "selected items(" |
- | |
75 | ?define DEL_MORE_FILES_2 " pcs.)?" |
- | |
76 | #else |
- | |
77 | ?define T_FILE "File" |
- | |
78 | ?define T_TYPE "Type" |
- | |
79 | ?define T_SIZE "Size" |
- | |
80 | ?define T_NEW_FOLDER "New folder" |
- | |
81 | ?define T_NEW_FILE "New file" |
- | |
82 | ?define T_DELETE_FILE "Do you really want to delete" |
- | |
83 | ?define T_YES "Yes" |
- | |
84 | ?define T_NO "No" |
- | |
85 | ?define T_CANCEL "Cancel" |
- | |
86 | ?define T_CREATE "Create" |
- | |
87 | ?define T_RENAME "Rename" |
- | |
88 | ?define FS_ITEM_ALREADY_EXISTS "'An item with that name already exists' -E" |
- | |
89 | ?define T_DEL_ERROR_1 "Error. Folder isn't empty." |
- | |
90 | ?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..." |
- | |
91 | ?define NOT_CREATE_FOLDER "Folder can not be created." |
- | |
92 | ?define NOT_CREATE_FILE "File can not be created." |
- | |
93 | ?define T_PASTE_WINDOW_TITLE "Copying..." |
- | |
94 | ?define T_PASTE_WINDOW_TEXT "Copying file:" |
- | |
95 | ?define T_PASTE_WINDOW_BUTTON "Abort" |
- | |
96 | ?define INFO_AFTER_COPY "Copy finished" |
- | |
97 | ?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely." |
- | |
98 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
- | |
99 | ?define DEL_MORE_FILES_1 "selected items(" |
- | |
100 | ?define DEL_MORE_FILES_2 " pcs.)?" |
- | |
101 | #endif |
- | |
102 | 25 | ||
103 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
26 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
Line 104... | Line -... | ||
104 | enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement |
- | |
105 | - | ||
106 | #define TITLE "Eolite File Manager v3.01 beta" |
27 | enum {CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement |
Line 107... | Line 28... | ||
107 | #define ABOUT_TITLE "Eolite 3.01 beta" |
28 | |
108 | dword col_padding, col_selec, col_lpanel; |
29 | dword col_padding, col_selec, col_lpanel; |
Line 115... | Line 36... | ||
115 | byte active_settings=0; |
36 | byte active_settings=0; |
116 | word settings_window; |
37 | word settings_window; |
117 | dword _not_draw = false; |
38 | dword _not_draw = false; |
118 | byte menu_call_mouse=0; |
39 | byte menu_call_mouse=0; |
Line -... | Line 40... | ||
- | 40 | ||
- | 41 | byte del_active=0, |
|
- | 42 | new_element_active=0; |
|
119 | 43 | ||
Line 120... | Line 44... | ||
120 | llist files; |
44 | llist files; |
Line -... | Line 45... | ||
- | 45 | ||
- | 46 | byte list_full_redraw; |
|
- | 47 | ||
- | 48 | dword buf; |
|
- | 49 | dword file_mas[6898]; |
|
121 | 50 | int selected_count; |
|
122 | byte list_full_redraw; |
51 | |
123 | 52 | ||
124 | byte |
53 | byte |
125 | path[4096], |
54 | path[4096], |
126 | file_path[4096], |
55 | file_path[4096], |
127 | file_name[256], |
- | |
128 | new_element_name[256], |
- | |
129 | temp[4096]; |
- | |
130 | byte |
- | |
131 | del_active=0, |
- | |
132 | new_element_active=0, |
- | |
133 | show_dev_name=1, |
- | |
134 | real_files_names_case=0, |
- | |
135 | use_big_fonts=0, |
- | |
136 | font_type, |
- | |
137 | font_h, |
56 | file_name[256], |
Line -... | Line 57... | ||
- | 57 | new_element_name[256], |
|
- | 58 | temp[4096], |
|
- | 59 | itdir; |
|
- | 60 | ||
- | 61 | //struct t_settings { |
|
- | 62 | byte use_big_fonts=false, |
|
- | 63 | font_type=0x80, |
|
- | 64 | font_h=9, |
|
- | 65 | sort_num=2, |
|
- | 66 | show_dev_name=true, |
|
- | 67 | real_files_names_case=false, |
|
- | 68 | info_after_copy=false, |
|
138 | info_after_copy=0, |
69 | two_panels=false; |
Line 139... | Line 70... | ||
139 | sort_num=2, |
70 | //} settings; |
Line 140... | Line 71... | ||
140 | itdir; |
71 | |
Line 141... | Line 72... | ||
141 | 72 | ||
142 | dword eolite_ini_path; |
73 | dword eolite_ini_path; |
143 | - | ||
144 | char scroll_used=0; |
- | |
145 | 74 | ||
146 | dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak; |
75 | char scroll_used=false; |
147 | 76 | ||
148 | proc_info Form; |
- | |
149 | int mouse_dd, sc_slider_h, sorting_arrow_x, kolibrios_drive; |
77 | dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak; |
Line 150... | Line 78... | ||
150 | dword buf; |
78 | |
Line 151... | Line -... | ||
151 | dword file_mas[6898]; |
- | |
152 | int j, i; |
79 | proc_info Form; |
153 | int action_buf; |
80 | int mouse_dd, sc_slider_h, sorting_arrow_x, kolibrios_drive; |
154 | int rand_n; |
81 | int j, i; |
155 | int selected_count; |
82 | int action_buf; |
- | 83 | int rand_n; |
|
156 | byte CMD_REFRESH; |
84 | byte CMD_REFRESH; |
157 | 85 | ||
158 | signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
86 | signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
159 | 87 | ||
160 | 88 | ||
Line 394... | Line 322... | ||
394 | break; |
322 | break; |
395 | case 50...60: //Actions |
323 | case 50...60: //Actions |
396 | FnProcess(id-50); |
324 | FnProcess(id-50); |
397 | break; |
325 | break; |
398 | case 100...120: |
326 | case 100...120: |
399 | DEVICE_MARK: |
- | |
400 | DrawRectangle(17,id-100*16+74,159,16, 0); //auaaeaiea |
- | |
401 | strcpy(#path, #disk_list[id-100].Item); |
- | |
402 | files.KeyHome(); |
327 | ClickOnDisk(id-100); |
403 | Open_Dir(#path,WITH_REDRAW); |
- | |
404 | pause(5); |
- | |
405 | DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF); |
- | |
406 | break; |
328 | break; |
407 | } |
329 | } |
408 | break; |
330 | break; |
409 | //Key pressed----------------------------------------------------------------------------- |
331 | //Key pressed----------------------------------------------------------------------------- |
410 | case evKey: |
332 | case evKey: |
Line 415... | Line 337... | ||
415 | status_key = GetStatusKey(); |
337 | status_key = GetStatusKey(); |
Line 416... | Line 338... | ||
416 | 338 | ||
417 | if (Form.status_window>2) break; |
339 | if (Form.status_window>2) break; |
418 | if (del_active) |
340 | if (del_active) |
419 | { |
341 | { |
420 | if (key==013) Del_File(true); |
342 | if (key == ASCII_KEY_ENTER) Del_File(true); |
421 | if (key==027) Del_File(false); |
343 | if (key == ASCII_KEY_ESC) Del_File(false); |
422 | break; |
344 | break; |
423 | } |
345 | } |
424 | if (new_element_active) |
346 | if (new_element_active) |
425 | { |
347 | { |
426 | if (key==027) NewElement(0); |
348 | if (key == ASCII_KEY_ESC) NewElement(0); |
427 | if (key==013) NewElement(1); |
349 | if (key == ASCII_KEY_ENTER) NewElement(1); |
428 | EAX=key<<8; |
350 | EAX=key<<8; |
429 | edit_box_key stdcall (#new_file_ed); |
351 | edit_box_key stdcall (#new_file_ed); |
430 | break; |
352 | break; |
431 | } |
- | |
432 | if (edit2.flags!=64) && (key!=13) && (key!=27) |
- | |
433 | { |
- | |
434 | EAX=key<<8; |
- | |
435 | edit_box_key stdcall (#edit2); |
- | |
436 | break; |
- | |
437 | } |
353 | } |
438 | if (files.ProcessKey(key)) |
354 | if (files.ProcessKey(key)) |
439 | { |
355 | { |
440 | List_ReDraw(); |
356 | List_ReDraw(); |
441 | break; |
357 | break; |
Line 486... | Line 402... | ||
486 | break; |
402 | break; |
487 | } |
403 | } |
Line 488... | Line 404... | ||
488 | 404 | ||
489 | switch (key) |
405 | switch (key) |
- | 406 | { |
|
- | 407 | case 096: |
|
- | 408 | two_panels ^= 1; |
|
- | 409 | draw_window(); |
|
490 | { |
410 | break; |
491 | case 209...217: |
411 | case 209...217: |
492 | id=key-110; |
412 | key -= 210; |
- | 413 | if (key |
|
- | 414 | { |
|
- | 415 | DrawRectangle(17,key*16+74,159,16, 0); //display click |
|
493 | if (id-100>=disc_num) break; |
416 | pause(7); |
- | 417 | ClickOnDisk(key); |
|
- | 418 | } |
|
494 | GOTO DEVICE_MARK; |
419 | break; |
495 | case ASCII_KEY_BS: |
420 | case ASCII_KEY_BS: |
496 | //GoBack(); |
421 | //GoBack(); |
497 | Dir_Up(); |
422 | Dir_Up(); |
498 | break; |
- | |
499 | case ASCII_KEY_ESC: |
- | |
500 | break; |
423 | break; |
501 | case ASCII_KEY_ENTER: |
424 | case ASCII_KEY_ENTER: |
502 | Open(0); |
425 | Open(0); |
503 | break; |
426 | break; |
504 | case 074: //menu |
427 | case 074: //menu |
505 | menu_call_mouse=0; |
- | |
506 | //SwitchToAnotherThread(); |
428 | menu_call_mouse=0; |
507 | menu_stak = malloc(4096); |
429 | menu_stak = malloc(4096); |
508 | CreateThread(#FileMenu,menu_stak+4092); |
430 | CreateThread(#FileMenu,menu_stak+4092); |
509 | break; |
431 | break; |
510 | case 173: //Ctrl+Enter |
432 | case 173: //Ctrl+Enter |
Line 528... | Line 450... | ||
528 | selected_count++; |
450 | selected_count++; |
529 | } |
451 | } |
530 | _INSERT_END: |
452 | _INSERT_END: |
531 | if (files.KeyDown()) List_ReDraw(); |
453 | if (files.KeyDown()) List_ReDraw(); |
532 | break; |
454 | break; |
533 | case 048...059: //F1-F10 |
455 | case 049...059: //F1-F10 |
534 | FnProcess(key-49); |
456 | FnProcess(key-49); |
535 | break; |
457 | break; |
536 | default: |
458 | default: |
537 | for (i=files.current+1; i |
459 | for (i=files.current+1; i |
538 | { |
460 | { |
Line 545... | Line 467... | ||
545 | break; |
467 | break; |
546 | } |
468 | } |
547 | } |
469 | } |
548 | } |
470 | } |
549 | break; |
471 | break; |
- | 472 | case evIPC: |
|
550 | case evReDraw: |
473 | case evReDraw: |
551 | DRAW_WINDOW: |
- | |
552 | draw_window(); |
474 | draw_window(); |
553 | if (action_buf) |
475 | if (action_buf) |
554 | { |
476 | { |
- | 477 | if (action_buf==COPY_PASTE_END) |
|
- | 478 | { |
|
- | 479 | FnProcess(5); |
|
- | 480 | SelectFileByName(#copy_to+strrchr(#copy_to,'/')); |
|
- | 481 | } |
|
555 | menu_action(action_buf); |
482 | if (action_buf==100) Open(0); |
- | 483 | if (action_buf==201) ShowOpenWithDialog(); |
|
- | 484 | if (action_buf==202) FnProcess(3); //F3 |
|
- | 485 | if (action_buf==203) FnProcess(4); //F4 |
|
- | 486 | if (action_buf==104) Copy(#file_path, NOCUT); |
|
- | 487 | if (action_buf==105) Copy(#file_path, CUT); |
|
- | 488 | if (action_buf==106) Paste(); |
|
- | 489 | if (action_buf==207) FnProcess(2); |
|
- | 490 | if (action_buf==108) Del_Form(); |
|
- | 491 | if (action_buf==109) FnProcess(5); |
|
- | 492 | if (action_buf==110) FnProcess(8); |
|
- | 493 | if (action_buf==300) { FnProcess(5); List_ReDraw(); } |
|
556 | action_buf=0; |
494 | action_buf=0; |
557 | } |
495 | } |
558 | break; |
- | |
559 | case evIPC: |
- | |
560 | goto DRAW_WINDOW; |
- | |
561 | break; |
- | |
562 | } |
496 | } |
Line 563... | Line 497... | ||
563 | 497 | ||
564 | if(cmd_free) |
498 | if(cmd_free) |
565 | { |
499 | { |
Line 572... | Line 506... | ||
572 | } |
506 | } |
573 | } |
507 | } |
574 | } |
508 | } |
Line 575... | Line -... | ||
575 | - | ||
576 | - | ||
577 | inline fastcall signed int _strrchr( ESI,BL) |
- | |
578 | { |
- | |
579 | int jj=0, last=strlen(ESI); |
- | |
580 | do { |
- | |
581 | jj++; |
- | |
582 | $lodsb |
- | |
583 | if(AL==BL) last=jj; |
- | |
584 | } while(AL!=0); |
- | |
585 | return last; |
- | |
586 | } |
- | |
587 | - | ||
588 | - | ||
589 | void menu_action(dword id) |
- | |
590 | { |
- | |
591 | if (id==COPY_PASTE_END) |
- | |
592 | { |
- | |
593 | FnProcess(5); |
- | |
594 | SelectFileByName(#copy_to+strrchr(#copy_to,'/')); |
- | |
595 | } |
- | |
596 | if (id==100) Open(0); |
- | |
597 | if (id==201) ShowOpenWithDialog(); |
- | |
598 | if (id==202) FnProcess(3); //F3 |
- | |
599 | if (id==203) FnProcess(4); //F4 |
- | |
600 | if (id==104) Copy(#file_path, NOCUT); |
- | |
601 | if (id==105) Copy(#file_path, CUT); |
- | |
602 | if (id==106) Paste(); |
- | |
603 | if (id==207) FnProcess(2); |
- | |
604 | if (id==108) Del_Form(); |
- | |
605 | if (id==109) FnProcess(5); |
- | |
606 | if (id==110) FnProcess(8); |
- | |
607 | if (id==300) |
- | |
608 | { |
- | |
609 | FnProcess(5); |
- | |
610 | List_ReDraw(); |
- | |
611 | } |
- | |
612 | } |
- | |
613 | 509 | ||
614 | 510 | ||
615 | void draw_window() |
511 | void draw_window() |
616 | { |
512 | { |
617 | DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0); |
513 | DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0); |
618 | GetProcessInfo(#Form, SelfInfo); |
514 | GetProcessInfo(#Form, SelfInfo); |
619 | if (Form.status_window>2) return; |
515 | if (Form.status_window>2) return; |
620 | if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h); |
516 | if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h); |
621 | if (Form.width<480) MoveSize(OLD,OLD,480,OLD); |
- | |
622 | GetProcessInfo(#Form, SelfInfo); //if win_size changed |
517 | if (Form.width<480) MoveSize(OLD,OLD,480,OLD); |
623 | files.SetSizes(192, 57, Form.cwidth - 210, onTop(57,6), disc_num*16+195,files.line_h); |
518 | GetProcessInfo(#Form, SelfInfo); //if win_size changed |
624 | PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal); |
519 | PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal); |
625 | DrawBar(127, 8, 1, 25, system.color.work_graph); |
520 | DrawBar(127, 8, 1, 25, system.color.work_graph); |
626 | for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,system.color.work); |
521 | for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,system.color.work); |
627 | for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,system.color.work); |
522 | for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,system.color.work); |
628 | DrawBar(246,0,Form.cwidth - 297,12, system.color.work); //upper editbox |
523 | DrawBar(246,0,Form.cwidth - 297,12, system.color.work); //upper editbox |
629 | DrawBar(246,29,Form.cwidth - 297,5,system.color.work); //under editbox |
524 | DrawBar(246,29,Form.cwidth - 297,5,system.color.work); //under editbox |
630 | DrawRectangle(246,12,Form.cwidth - 303,16,system.color.work_graph); |
525 | DrawRectangle(246,12,Form.cwidth - 303,16,system.color.work_graph); |
631 | DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about |
526 | DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about |
632 | PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal); |
527 | PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal); |
633 | //main rectangles |
528 | //main rectangles |
634 | DrawRectangle(1,40,Form.cwidth-3,onTop(46,0),system.color.work_graph); |
529 | DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph); |
- | 530 | DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg |
|
- | 531 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
|
635 | DrawRectangle(0,39,Form.cwidth-1,onTop(44,0),col_palette[4]); //bg |
532 | if (!two_panels) |
636 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
- | |
637 | DrawLeftPanel(); |
533 | { |
638 | //ListBox |
- | |
639 | DrawFlatButton(files.x,40,Form.cwidth - files.x - 159,16,31,system.color.work,T_FILE); |
- | |
640 | DrawFlatButton(Form.cwidth - 159,40,73,16,32,system.color.work,T_TYPE); |
- | |
641 | DrawFlatButton(Form.cwidth - 86,40,68,16,33,system.color.work,T_SIZE); |
534 | DrawLeftPanel(); |
642 | DrawBar(files.x+files.w,files.y,1,onTop(22,files.y),system.color.work_graph); //line to the left from the scroll |
- | |
643 | DrawFlatButton(files.x+files.w,40,16,16,0,system.color.work,"\x18"); |
535 | files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, disc_num*16+3,files.line_h); |
- | 536 | DrawListColumns(); |
|
- | 537 | Open_Dir(#path,ONLY_SHOW); |
|
- | 538 | } |
|
- | 539 | else |
|
- | 540 | { |
|
- | 541 | files.SetSizes(2, 57+18, Form.cwidth/2-2-17, Form.cheight-59-18, disc_num*16+3,files.line_h); |
|
- | 542 | DrawListColumns(); |
|
- | 543 | Open_Dir(#path,ONLY_SHOW); |
|
- | 544 | files.SetSizes(Form.cwidth/2, 57+18, Form.cwidth/2-17, Form.cheight-59-18, disc_num*16+3,files.line_h); |
|
- | 545 | DrawListColumns(); |
|
644 | DrawFlatButton(files.x+files.w,onTop(22,0),16,16,0,system.color.work,"\x19"); |
546 | Open_Dir(#path,ONLY_SHOW); |
645 | Open_Dir(#path,ONLY_SHOW); |
547 | } |
646 | if (del_active) Del_Form(); |
548 | if (del_active) Del_Form(); |
Line -... | Line 549... | ||
- | 549 | if (new_element_active) NewElement_Form(new_element_active, #new_element_name); |
|
- | 550 | } |
|
- | 551 | ||
- | 552 | void DrawListColumns() |
|
- | 553 | { |
|
- | 554 | DrawFlatButton(files.x,files.y - 17, files.w - 141,16,31,system.color.work,T_FILE); |
|
- | 555 | DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE); |
|
- | 556 | DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE); |
|
- | 557 | DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18"); |
|
- | 558 | DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19"); |
|
Line 647... | Line 559... | ||
647 | if (new_element_active) NewElement_Form(new_element_active, #new_element_name); |
559 | DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph); |
648 | } |
560 | } |
649 | 561 | ||
650 | 562 | ||
Line 662... | Line 574... | ||
662 | list_full_redraw = false; |
574 | list_full_redraw = false; |
663 | goto _ALL_LIST_REDRAW; |
575 | goto _ALL_LIST_REDRAW; |
664 | } |
576 | } |
665 | if (old_current != files.current) |
577 | if (old_current != files.current) |
666 | { |
578 | { |
667 | Line_ReDraw(0xFFFFFF, old_current-files.first); |
579 | if (old_current-files.first |
668 | Line_ReDraw(col_selec, files.current-files.first); |
580 | Line_ReDraw(col_selec, files.current-files.first); |
669 | old_current = files.current; |
581 | old_current = files.current; |
670 | return; |
582 | return; |
671 | } |
583 | } |
Line 702... | Line 614... | ||
702 | file.sizelo = ESDWORD[file_offet+32]; |
614 | file.sizelo = ESDWORD[file_offet+32]; |
703 | file_name_off = file_offet+40; |
615 | file_name_off = file_offet+40; |
Line 704... | Line 616... | ||
704 | 616 | ||
705 | if (! TestBit(attr, 4) ) //file or folder? |
617 | if (! TestBit(attr, 4) ) //file or folder? |
- | 618 | { |
|
- | 619 | ext1 = strrchr(file_name_off,'.') + file_name_off; |
|
706 | { |
620 | if (ext1==file_name_off) ext1 = " \0"; //if no extension then show nothing |
707 | Put_icon(file_name_off+_strrchr(file_name_off,'.'), files.x+3, files.line_h/2-7+y, color, 0); |
621 | Put_icon(ext1, files.x+3, files.line_h/2-7+y, color, 0); |
708 | WriteText(7-strlen(ConvertSize(file.sizelo))*6+Form.cwidth - 76, files.line_h - font_h/ 2 + y,font_type,0,ConvertSize(file.sizelo)); |
622 | WriteText(7-strlen(ConvertSize(file.sizelo))*6+Form.cwidth - 76, files.line_h - font_h/ 2 + y,font_type,0,ConvertSize(file.sizelo)); |
709 | } |
623 | } |
710 | else |
624 | else |
711 | { |
625 | { |
Line 1103... | Line 1017... | ||
1103 | switch(N) |
1017 | switch(N) |
1104 | { |
1018 | { |
1105 | case 1: |
1019 | case 1: |
1106 | if (!active_about) |
1020 | if (!active_about) |
1107 | { |
1021 | { |
1108 | //SwitchToAnotherThread(); |
- | |
1109 | about_stak = malloc(4096); |
1022 | about_stak = malloc(4096); |
1110 | about_window = CreateThread(#about_dialog,about_stak+4092); |
1023 | about_window = CreateThread(#about_dialog,about_stak+4092); |
1111 | break; |
1024 | break; |
1112 | } |
1025 | } |
1113 | else |
1026 | else |
Line 1139... | Line 1052... | ||
1139 | break; |
1052 | break; |
1140 | case 7: |
1053 | case 7: |
1141 | NewElement_Form(CREATE_FILE, T_NEW_FILE); |
1054 | NewElement_Form(CREATE_FILE, T_NEW_FILE); |
1142 | break; |
1055 | break; |
1143 | case 8: |
1056 | case 8: |
1144 | //SwitchToAnotherThread(); |
- | |
1145 | properties_stak = malloc(8096); |
1057 | properties_stak = malloc(8096); |
1146 | CreateThread(#properties_dialog, properties_stak+8092); |
1058 | CreateThread(#properties_dialog, properties_stak+8092); |
1147 | break; |
1059 | break; |
1148 | case 10: //F10 |
1060 | case 10: //F10 |
1149 | if (!active_settings) |
1061 | if (!active_settings) |
1150 | { |
1062 | { |
1151 | //SwitchToAnotherThread(); |
- | |
1152 | settings_stak = malloc(4096); |
1063 | settings_stak = malloc(4096); |
1153 | settings_window = CreateThread(#settings_dialog, settings_stak+4092); |
1064 | settings_window = CreateThread(#settings_dialog, settings_stak+4092); |
1154 | break; |
1065 | break; |
1155 | } |
1066 | } |
1156 | else |
1067 | else |