Rev 5723 | Rev 5735 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5723 | Rev 5733 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | byte active_settings=0; |
36 | byte active_settings=0; |
37 | word settings_window; |
37 | word settings_window; |
38 | dword _not_draw = false; |
38 | dword _not_draw = false; |
39 | byte menu_call_mouse=0; |
39 | byte menu_call_mouse=0; |
Line 40... | Line 40... | ||
40 | 40 | ||
41 | byte del_active=0, |
41 | byte del_active=0; |
Line 42... | Line 42... | ||
42 | new_element_active=0; |
42 | byte new_element_active=0; |
Line 43... | Line 43... | ||
43 | 43 | ||
Line 44... | Line 44... | ||
44 | llist files; |
44 | llist files, files_active, files_inactive; |
45 | 45 | ||
Line 66... | Line 66... | ||
66 | info_after_copy=false, |
66 | info_after_copy=false, |
67 | two_panels=false, |
67 | two_panels=false, |
68 | active_panel=1; |
68 | active_panel=1; |
69 | //} settings; |
69 | //} settings; |
Line 70... | Line -... | ||
70 | - | ||
71 | int active_current, inactive_current, active_first, inactive_first; |
70 | |
Line 72... | Line -... | ||
72 | char active_path[4096], inactive_path[4096]; |
- | |
73 | 71 | char active_path[4096], inactive_path[4096]; |
|
Line 74... | Line 72... | ||
74 | 72 | ||
Line 75... | Line 73... | ||
75 | dword eolite_ini_path; |
73 | dword eolite_ini_path; |
Line 76... | Line 74... | ||
76 | 74 | ||
77 | char scroll_used=false; |
75 | char scroll_used=false; |
78 | 76 | ||
79 | dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak; |
77 | dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak; |
80 | 78 | ||
81 | proc_info Form; |
79 | proc_info Form; |
Line 130... | Line 128... | ||
130 | } |
128 | } |
131 | else |
129 | else |
132 | { |
130 | { |
133 | strlcpy(#path, "/rd/1/", 6); |
131 | strlcpy(#path, "/rd/1/", 6); |
134 | } |
132 | } |
135 | strcpy(#active_path, #path); |
- | |
136 | strcpy(#inactive_path, #path); |
- | |
137 | Open_Dir(#path,ONLY_OPEN); |
133 | Open_Dir(#path,ONLY_OPEN); |
- | 134 | strcpy(#inactive_path, #path); |
|
- | 135 | llist_copy(#files_inactive, #files); |
|
138 | SetEventMask(1100111b); |
136 | SetEventMask(1100111b); |
139 | loop(){ |
137 | loop(){ |
140 | switch(WaitEvent()) |
138 | switch(WaitEvent()) |
141 | { |
139 | { |
142 | case evMouse: |
140 | case evMouse: |
Line 287... | Line 285... | ||
287 | { |
285 | { |
288 | if (active_panel!=2) |
286 | if (active_panel!=2) |
289 | { |
287 | { |
290 | active_panel = 2; |
288 | active_panel = 2; |
291 | __SET_VALS_AND_DRAW: |
289 | __SET_VALS_AND_DRAW: |
292 | active_current = inactive_current; |
- | |
293 | inactive_current = files.current; |
290 | llist_copy(#files_active, #files_inactive); |
294 | active_first = inactive_first; |
291 | llist_copy(#files_inactive, #files); |
295 | inactive_first = files.first; |
- | |
296 | strcpy(#active_path, #inactive_path); |
292 | strcpy(#active_path, #inactive_path); |
297 | strcpy(#inactive_path, #path); |
293 | strcpy(#inactive_path, #path); |
298 | DrawFilePanels(); |
294 | DrawFilePanels(); |
299 | } |
295 | } |
300 | } |
296 | } |
Line 341... | Line 337... | ||
341 | Copy(#file_path, NOCUT); |
337 | Copy(#file_path, NOCUT); |
342 | break; |
338 | break; |
343 | case 26: |
339 | case 26: |
344 | Paste(); |
340 | Paste(); |
345 | break; |
341 | break; |
346 | case 31...33: //sort |
342 | case 31...33: //sorting |
347 | if(sort_num==1) DrawFilledBar(sorting_arrow_x,files.y-12,6,10); |
- | |
348 | if(sort_num==2) DrawFilledBar(sorting_arrow_x,files.y-12,6,10); |
- | |
349 | if(sort_num==3) DrawFilledBar(sorting_arrow_x,files.y-12,6,10); |
- | |
350 | sort_num=id-30; |
343 | sort_num = id - 30; |
- | 344 | DrawList(); |
|
351 | Open_Dir(#path,WITH_REDRAW); |
345 | Open_Dir(#path,WITH_REDRAW); |
352 | break; |
346 | break; |
353 | case 50...60: //Actions |
347 | case 50...60: //Actions |
354 | FnProcess(id-50); |
348 | FnProcess(id-50); |
355 | break; |
349 | break; |
Line 551... | Line 545... | ||
551 | PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal); |
545 | PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal); |
552 | //main rectangles |
546 | //main rectangles |
553 | DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph); |
547 | DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph); |
554 | DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg |
548 | DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg |
555 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
549 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
556 | active_current = files.current; |
- | |
557 | active_first = files.first; |
550 | llist_copy(#files_active, #files); |
558 | strcpy(#active_path, #path); |
551 | strcpy(#active_path, #path); |
559 | DrawFilePanels(); |
552 | DrawFilePanels(); |
560 | if (del_active) Del_Form(); |
553 | if (del_active) Del_Form(); |
561 | if (new_element_active) NewElement_Form(new_element_active, #new_element_name); |
554 | if (new_element_active) NewElement_Form(new_element_active, #new_element_name); |
562 | } |
555 | } |
Line 563... | Line 556... | ||
563 | 556 | ||
564 | void DrawList() |
557 | void DrawList() |
- | 558 | { |
|
565 | { |
559 | word sorting_arrow_x; |
566 | DrawFlatButton(files.x,files.y - 17, files.w - 141,16,31,system.color.work,T_FILE); |
560 | DrawFlatButton(files.x, files.y-17, files.w - 141,16,31,system.color.work,T_FILE); |
567 | DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE); |
561 | DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE); |
568 | DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE); |
562 | DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE); |
569 | DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18"); |
563 | DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18"); |
- | 564 | DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16,0,system.color.work,"\x19"); |
|
- | 565 | if (sort_num==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18; |
|
- | 566 | if (sort_num==2) sorting_arrow_x = files.x + files.w - 90; |
|
- | 567 | if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; |
|
570 | DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19"); |
568 | WriteText(sorting_arrow_x,files.y-12,0x80,system.color.work_graph,"\x19"); |
571 | DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph); |
569 | DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph); |
572 | if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph); |
- | |
573 | Open_Dir(#path,WITH_REDRAW); |
570 | if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph); |
Line 574... | Line 571... | ||
574 | } |
571 | } |
575 | 572 | ||
576 | void DrawFilePanels() |
573 | void DrawFilePanels() |
577 | { |
574 | { |
578 | if (!two_panels) |
575 | if (!two_panels) |
579 | { |
576 | { |
580 | DrawDeviceAndActionsLeftPanel(); |
577 | DrawDeviceAndActionsLeftPanel(); |
- | 578 | files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h); |
|
581 | files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h); |
579 | DrawList(); |
582 | DrawList(); |
580 | Open_Dir(#path,ONLY_SHOW); |
583 | } |
581 | } |
- | 582 | else |
|
- | 583 | { |
|
- | 584 | llist_copy(#files, #files_inactive); |
|
- | 585 | strcpy(#path, #inactive_path); |
|
584 | else |
586 | col_selec = 0xCCCccc; |
585 | { |
587 | |
586 | if (active_panel==1) |
- | |
587 | { |
- | |
588 | files.current = inactive_current; |
- | |
589 | files.first = inactive_first; |
588 | if (active_panel==1) |
590 | strcpy(#path, #inactive_path); |
589 | { |
591 | files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h); |
590 | files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h); |
592 | DrawList(); |
591 | DrawList(); |
593 | files.current = active_current; |
592 | Open_Dir(#path,WITH_REDRAW); |
- | 593 | llist_copy(#files, #files_active); |
|
594 | files.first = active_first; |
594 | strcpy(#path, #active_path); |
595 | strcpy(#path, #active_path); |
595 | col_selec = 0x94AECE; |
- | 596 | files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h); |
|
596 | files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h); |
597 | DrawList(); |
597 | DrawList(); |
598 | Open_Dir(#path,WITH_REDRAW); |
598 | } |
599 | } |
599 | if (active_panel==2) |
- | |
600 | { |
- | |
601 | files.current = inactive_current; |
- | |
602 | files.first = inactive_first; |
600 | if (active_panel==2) |
603 | strcpy(#path, #inactive_path); |
601 | { |
604 | files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h); |
602 | files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.line_h); |
605 | DrawList(); |
603 | DrawList(); |
606 | files.current = active_current; |
604 | Open_Dir(#path,WITH_REDRAW); |
- | 605 | llist_copy(#files, #files_active); |
|
607 | files.first = active_first; |
606 | strcpy(#path, #active_path); |
608 | strcpy(#path, #active_path); |
607 | col_selec = 0x94AECE; |
- | 608 | files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h); |
|
609 | files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h); |
609 | DrawList(); |
610 | DrawList(); |
610 | Open_Dir(#path,WITH_REDRAW); |
611 | } |
611 | } |
Line 734... | Line 734... | ||
734 | PathShow_draw stdcall(#PathShow); |
734 | PathShow_draw stdcall(#PathShow); |
735 | } |
735 | } |
736 | HistoryPath(ADD_NEW_PATH); |
736 | HistoryPath(ADD_NEW_PATH); |
737 | files.visible = files.h / files.line_h; |
737 | files.visible = files.h / files.line_h; |
738 | if (files.count < files.visible) files.visible = files.count; |
738 | if (files.count < files.visible) files.visible = files.count; |
739 | if (sort_num==1) sorting_arrow_x = Form.width+60/2; |
- | |
740 | if (sort_num==2) sorting_arrow_x = Form.width-115; |
- | |
741 | if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; |
- | |
742 | WriteText(sorting_arrow_x,files.y-12,0x80,system.color.work_graph,"\x19"); |
- | |
743 | if (redraw!=ONLY_SHOW) Sorting(); |
739 | if (redraw!=ONLY_SHOW) Sorting(); |
744 | list_full_redraw = true; |
740 | list_full_redraw = true; |
745 | if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw(); |
741 | if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw(); |
746 | DrawSystemDiscs(); |
742 | DrawSystemDiscs(); |
747 | } |
743 | } |
Line 755... | Line 751... | ||
755 | 751 | ||
756 | inline Sorting() |
752 | inline Sorting() |
757 | { |
753 | { |
758 | dword k=0, l=1; |
754 | dword k=0, l=1; |
759 | dword file_off; |
- | |
760 | int i; |
755 | dword file_off; |
761 | if (!strncmp(#path,"/",2)) //do not sort |
756 | if (!strncmp(#path,"/",2)) //do not sort |
762 | { |
757 | { |
763 | for(k=1;k |
758 | for(k=1;k |
764 | return; |
759 | return; |
Line 781... | Line 776... | ||
781 | Sort_by_Name(0,k-1); |
776 | Sort_by_Name(0,k-1); |
782 | if (sort_num==1) Sort_by_Name(k,files.count-1); |
777 | if (sort_num==1) Sort_by_Name(k,files.count-1); |
783 | if (sort_num==2) Sort_by_Type(k,files.count-1); |
778 | if (sort_num==2) Sort_by_Type(k,files.count-1); |
784 | if (sort_num==3) Sort_by_Size(k,files.count-1); |
779 | if (sort_num==3) Sort_by_Size(k,files.count-1); |
785 | //make ".." first item in list |
780 | //make ".." first item in list |
786 | if (k>0) && (!strncmp(file_mas[0]*304+buf+72,"..",3)) |
781 | if (k>0) && (strncmp(file_mas[0]*304+buf+72,"..",2)!=0) |
787 | for(k--; k>0; k--;) if (!strncmp(file_mas[k]*304+buf+72,"..",3)) {file_mas[k]> |
782 | for(k--; k>0; k--;) if (!strncmp(file_mas[k]*304+buf+72,"..",2)) {file_mas[k]> |
788 | } |
783 | } |
Line 789... | Line 784... | ||
789 | 784 | ||
790 | 785 |