Rev 6505 | Rev 6570 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6505 | Rev 6564 | ||
---|---|---|---|
Line 103... | Line 103... | ||
103 | show_breadcrumb=false, |
103 | show_breadcrumb=false, |
104 | show_status_bar=true, |
104 | show_status_bar=true, |
105 | active_panel=1; |
105 | active_panel=1; |
106 | //} settings; |
106 | //} settings; |
Line -... | Line 107... | ||
- | 107 | ||
- | 108 | #define STATUS_BAR_H 16; |
|
- | 109 | int status_bar_h = 0; |
|
107 | 110 | ||
108 | edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0}; |
111 | edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0}; |
109 | PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0}; |
112 | PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0}; |
110 | byte cmd_free=0; |
113 | byte cmd_free=0; |
111 | #include "include\translations.h" |
114 | #include "include\translations.h" |
Line 424... | Line 427... | ||
424 | if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory |
427 | if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory |
425 | ESBYTE[selected_offset] = 1; |
428 | ESBYTE[selected_offset] = 1; |
426 | selected_count++; |
429 | selected_count++; |
427 | } |
430 | } |
428 | List_ReDraw(); |
431 | List_ReDraw(); |
429 | if (show_status_bar) DrawStatusBar(); |
432 | DrawStatusBar(); |
430 | break; |
433 | break; |
431 | case 022: //Ctrl+U - unselect all files |
434 | case 022: //Ctrl+U - unselect all files |
432 | for (i=0; i |
435 | for (i=0; i |
433 | { |
436 | { |
434 | selected_offset = file_mas[i]*304 + buf+32 + 7; |
437 | selected_offset = file_mas[i]*304 + buf+32 + 7; |
435 | ESBYTE[selected_offset] = 0; |
438 | ESBYTE[selected_offset] = 0; |
436 | } |
439 | } |
437 | selected_count = 0; |
440 | selected_count = 0; |
438 | List_ReDraw(); |
441 | List_ReDraw(); |
439 | if (show_status_bar) DrawStatusBar(); |
442 | DrawStatusBar(); |
440 | break; |
443 | break; |
441 | } |
444 | } |
442 | break; |
445 | break; |
443 | } |
446 | } |
Line 453... | Line 456... | ||
453 | break; |
456 | break; |
454 | case SCAN_CODE_TAB: |
457 | case SCAN_CODE_TAB: |
455 | if (!two_panels) break; |
458 | if (!two_panels) break; |
456 | if (active_panel==1) active_panel=2; else active_panel=1; |
459 | if (active_panel==1) active_panel=2; else active_panel=1; |
457 | ChangeActivePanel(); |
460 | ChangeActivePanel(); |
458 | if (show_status_bar) DrawStatusBar(); |
461 | DrawStatusBar(); |
459 | break; |
462 | break; |
460 | case 093: //menu |
463 | case 093: //menu |
461 | menu_call_mouse=0; |
464 | menu_call_mouse=0; |
462 | menu_stak = malloc(4096); |
465 | menu_stak = malloc(4096); |
463 | CreateThread(#FileMenu,menu_stak+4092); |
466 | CreateThread(#FileMenu,menu_stak+4092); |
Line 479... | Line 482... | ||
479 | selected_count++; |
482 | selected_count++; |
480 | } |
483 | } |
481 | _INSERT_END: |
484 | _INSERT_END: |
482 | files.KeyDown(); |
485 | files.KeyDown(); |
483 | List_ReDraw(); |
486 | List_ReDraw(); |
484 | if (show_status_bar) DrawStatusBar(); |
487 | DrawStatusBar(); |
485 | break; |
488 | break; |
486 | case 059...068: //F1-F10 |
489 | case 059...068: //F1-F10 |
487 | FnProcess(key_scancode-58); |
490 | FnProcess(key_scancode-58); |
488 | break; |
491 | break; |
489 | default: |
492 | default: |
Line 543... | Line 546... | ||
543 | DefineButton(x,11,20-2,22-2,61+BT_HIDE+BT_NOFRAME,0); |
546 | DefineButton(x,11,20-2,22-2,61+BT_HIDE+BT_NOFRAME,0); |
544 | } |
547 | } |
Line 545... | Line 548... | ||
545 | 548 | ||
546 | void draw_window() |
549 | void draw_window() |
- | 550 | { |
|
547 | { |
551 | if (show_status_bar) status_bar_h = STATUS_BAR_H; else status_bar_h = 0; |
548 | DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,NULL,TITLE,0); |
552 | DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,NULL,TITLE,0); |
549 | GetProcessInfo(#Form, SelfInfo); |
553 | GetProcessInfo(#Form, SelfInfo); |
550 | if (Form.status_window>2) return; |
554 | if (Form.status_window>2) return; |
551 | if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; } |
555 | if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; } |
Line 557... | Line 561... | ||
557 | for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,NULL); |
561 | for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,NULL); |
558 | DrawBar(246,0, Form.cwidth - 246, 34, col_work); |
562 | DrawBar(246,0, Form.cwidth - 246, 34, col_work); |
559 | _PutImage(Form.cwidth-17,11,6,18,#dots); |
563 | _PutImage(Form.cwidth-17,11,6,18,#dots); |
560 | DefineButton(Form.cwidth-24,7,20,25,51+BT_HIDE+BT_NOFRAME,0); //dots |
564 | DefineButton(Form.cwidth-24,7,20,25,51+BT_HIDE+BT_NOFRAME,0); //dots |
561 | //main rectangles |
565 | //main rectangles |
562 | DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,col_graph); |
566 | DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,col_graph); |
563 | DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg |
567 | DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg |
564 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
568 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
565 | llist_copy(#files_active, #files); |
569 | llist_copy(#files_active, #files); |
566 | strcpy(#active_path, #path); |
570 | strcpy(#active_path, #path); |
567 | if (show_status_bar) DrawStatusBar(); |
571 | DrawStatusBar(); |
568 | DrawFilePanels(); |
572 | DrawFilePanels(); |
569 | if (del_active) Del_Form(); |
573 | if (del_active) Del_Form(); |
570 | if (new_element_active) NewElement_Form(new_element_active, #new_element_name); |
574 | if (new_element_active) NewElement_Form(new_element_active, #new_element_name); |
571 | } |
575 | } |
Line 586... | Line 590... | ||
586 | if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph); |
590 | if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph); |
587 | } |
591 | } |
Line 588... | Line 592... | ||
588 | 592 | ||
589 | void DrawStatusBar() |
593 | void DrawStatusBar() |
- | 594 | { |
|
590 | { |
595 | if (!show_status_bar) return; |
591 | DrawBar(1, Form.cheight - 18, Form.cwidth-2, 17, system.color.work); |
596 | DrawBar(1, Form.cheight - status_bar_h-1, Form.cwidth-2, status_bar_h, system.color.work); |
592 | sprintf(#status_bar_str, STATUS_STR, files.count-1, count_dir-1, files.count-count_dir, selected_count); |
597 | sprintf(#status_bar_str, STATUS_STR, files.count-1, count_dir-1, files.count-count_dir, selected_count); |
593 | WriteText(6,Form.cheight - 13,0x80,0x000000,#status_bar_str); |
598 | WriteText(6,Form.cheight - 13,0x80,0x000000,#status_bar_str); |
Line 594... | Line 599... | ||
594 | } |
599 | } |
595 | 600 | ||
596 | void DrawFilePanels() |
601 | void DrawFilePanels() |
597 | { |
602 | { |
598 | int files_y; |
603 | int files_y; |
599 | if (!two_panels) |
604 | if (!two_panels) |
600 | { |
- | |
601 | DrawDeviceAndActionsLeftPanel(); |
605 | { |
602 | if (show_status_bar) files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h); |
606 | DrawDeviceAndActionsLeftPanel(); |
603 | else files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h); |
607 | files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59 - status_bar_h, files.item_h); |
604 | DrawList(); |
608 | DrawList(); |
605 | Open_Dir(#path,ONLY_SHOW); |
609 | Open_Dir(#path,ONLY_SHOW); |
606 | } |
610 | } |
Line 616... | Line 620... | ||
616 | if (active_panel==1) |
620 | if (active_panel==1) |
617 | { |
621 | { |
618 | llist_copy(#files, #files_inactive); |
622 | llist_copy(#files, #files_inactive); |
619 | strcpy(#path, #inactive_path); |
623 | strcpy(#path, #inactive_path); |
620 | col_selec = 0xCCCccc; |
624 | col_selec = 0xCCCccc; |
621 | if (show_status_bar) files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h); |
- | |
622 | else files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h); |
625 | files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2 - status_bar_h, files.item_h); |
623 | DrawList(); |
626 | DrawList(); |
624 | Open_Dir(#path,WITH_REDRAW); |
627 | Open_Dir(#path,WITH_REDRAW); |
625 | llist_copy(#files, #files_active); |
628 | llist_copy(#files, #files_active); |
626 | strcpy(#path, #active_path); |
629 | strcpy(#path, #active_path); |
627 | col_selec = 0x94AECE; |
630 | col_selec = 0x94AECE; |
628 | if (show_status_bar) files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h); |
- | |
629 | else files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h); |
631 | files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2 - status_bar_h, files.item_h); |
630 | DrawList(); |
632 | DrawList(); |
631 | Open_Dir(#path,WITH_REDRAW); |
633 | Open_Dir(#path,WITH_REDRAW); |
632 | } |
634 | } |
633 | if (active_panel==2) |
635 | if (active_panel==2) |
634 | { |
636 | { |
635 | if (show_status_bar) files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h); |
- | |
636 | else files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h); |
637 | files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2 - status_bar_h, files.item_h); |
637 | DrawList(); |
638 | DrawList(); |
638 | Open_Dir(#path,WITH_REDRAW); |
639 | Open_Dir(#path,WITH_REDRAW); |
639 | llist_copy(#files, #files_active); |
640 | llist_copy(#files, #files_active); |
640 | strcpy(#path, #active_path); |
641 | strcpy(#path, #active_path); |
641 | col_selec = 0x94AECE; |
642 | col_selec = 0x94AECE; |
642 | if (show_status_bar) files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h); |
- | |
643 | else files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h); |
643 | files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2 - status_bar_h, files.item_h); |
644 | DrawList(); |
644 | DrawList(); |
645 | Open_Dir(#path,WITH_REDRAW); |
645 | Open_Dir(#path,WITH_REDRAW); |
646 | } |
646 | } |
647 | } |
647 | } |
648 | } |
648 | } |
Line 789... | Line 789... | ||
789 | SystemDiscs.Draw(); |
789 | SystemDiscs.Draw(); |
790 | files.visible = files.h / files.item_h; |
790 | files.visible = files.h / files.item_h; |
791 | if (files.count < files.visible) files.visible = files.count; |
791 | if (files.count < files.visible) files.visible = files.count; |
792 | if (redraw!=ONLY_SHOW) Sorting(); |
792 | if (redraw!=ONLY_SHOW) Sorting(); |
793 | list_full_redraw = true; |
793 | list_full_redraw = true; |
794 | if (redraw!=ONLY_OPEN)&&(!_not_draw) {if (show_status_bar) DrawStatusBar(); List_ReDraw();} |
794 | if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();} |
795 | } |
795 | } |
796 | if (files.count==-1) && (redraw!=ONLY_OPEN) |
796 | if (files.count==-1) && (redraw!=ONLY_OPEN) |
797 | { |
797 | { |
798 | files.KeyHome(); |
798 | files.KeyHome(); |
799 | if(!_not_draw) { list_full_redraw=true; if (show_status_bar) DrawStatusBar(); List_ReDraw(); } |
799 | if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); } |
800 | } |
800 | } |
801 | SetCurDir(dir_path); |
801 | SetCurDir(dir_path); |
802 | } |
802 | } |