Rev 5974 | Rev 5981 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5974 | Rev 5977 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | #include "..\lib\font.h" |
17 | #include "..\lib\font.h" |
18 | #include "..\lib\collection.h" |
18 | #include "..\lib\collection.h" |
19 | //obj |
19 | //obj |
20 | #include "..\lib\obj\libini.h" |
20 | #include "..\lib\obj\libini.h" |
21 | #include "..\lib\obj\box_lib.h" |
21 | #include "..\lib\obj\box_lib.h" |
- | 22 | //patterns |
|
- | 23 | #include "..\lib\patterns\history.h" |
|
Line 22... | Line 24... | ||
22 | 24 | ||
Line 23... | Line 25... | ||
23 | byte CMD_ENABLE_SAVE_IMG = false; |
25 | byte CMD_ENABLE_SAVE_IMG = false; |
24 | 26 | ||
Line 102... | Line 104... | ||
102 | #include "include\copy.h" |
104 | #include "include\copy.h" |
103 | #include "include\gui.h" |
105 | #include "include\gui.h" |
104 | #include "include\sorting.h" |
106 | #include "include\sorting.h" |
105 | #include "include\icons.h" |
107 | #include "include\icons.h" |
106 | #include "include\left_panel.h" |
108 | #include "include\left_panel.h" |
107 | #include "include\history.h" |
- | |
108 | #include "include\menu.h" |
109 | #include "include\menu.h" |
109 | #include "include\about.h" |
110 | #include "include\about.h" |
110 | #include "include\properties.h" |
111 | #include "include\properties.h" |
Line 111... | Line 112... | ||
111 | 112 | ||
Line 168... | Line 169... | ||
168 | 169 | ||
169 | if (adif_x>adif_y) |
170 | if (adif_x>adif_y) |
170 | { |
171 | { |
171 | if (dif_x > 150) |
172 | if (dif_x > 150) |
172 | { |
173 | { |
173 | if (FoldersHistory.forward()) |
174 | if (History.forward()) |
- | 175 | { |
|
174 | { |
176 | strcpy(#path, History.current()); |
175 | files.KeyHome(); |
177 | files.KeyHome(); |
176 | Open_Dir(#path,WITH_REDRAW); |
178 | Open_Dir(#path,WITH_REDRAW); |
177 | } |
179 | } |
178 | stats = 0; |
180 | stats = 0; |
Line 321... | Line 323... | ||
321 | { |
323 | { |
322 | case 21: //Back |
324 | case 21: //Back |
323 | GoBack(); |
325 | GoBack(); |
324 | break; |
326 | break; |
325 | case 22: //Forward |
327 | case 22: //Forward |
326 | if (FoldersHistory.forward()) |
328 | if (History.forward()) |
327 | { |
329 | { |
- | 330 | strcpy(#path, History.current()); |
|
328 | files.KeyHome(); |
331 | files.KeyHome(); |
329 | Open_Dir(#path,WITH_REDRAW); |
332 | Open_Dir(#path,WITH_REDRAW); |
330 | } |
333 | } |
331 | break; |
334 | break; |
332 | case 23: |
335 | case 23: |
Line 733... | Line 736... | ||
733 | if (buf) free(buf); |
736 | if (buf) free(buf); |
734 | errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT); |
737 | errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT); |
735 | if (ESBYTE[dir_path+1]!='\0') chrcat(dir_path, '/'); |
738 | if (ESBYTE[dir_path+1]!='\0') chrcat(dir_path, '/'); |
736 | if (errornum) |
739 | if (errornum) |
737 | { |
740 | { |
738 | FoldersHistory.add(); |
741 | History.add(#path); |
739 | GoBack(); |
742 | GoBack(); |
740 | Write_Error(errornum); |
743 | Write_Error(errornum); |
741 | return; |
744 | return; |
742 | } |
745 | } |
743 | maxcount = sizeof(file_mas)/sizeof(dword)-1; |
746 | maxcount = sizeof(file_mas)/sizeof(dword)-1; |
Line 751... | Line 754... | ||
751 | PathShow.area_size_x = Form.cwidth-306; |
754 | PathShow.area_size_x = Form.cwidth-306; |
752 | DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff); |
755 | DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff); |
753 | PathShow_prepare stdcall(#PathShow); |
756 | PathShow_prepare stdcall(#PathShow); |
754 | PathShow_draw stdcall(#PathShow); |
757 | PathShow_draw stdcall(#PathShow); |
755 | } |
758 | } |
756 | FoldersHistory.add(); |
759 | History.add(#path); |
757 | files.visible = files.h / files.item_h; |
760 | files.visible = files.h / files.item_h; |
758 | if (files.count < files.visible) files.visible = files.count; |
761 | if (files.count < files.visible) files.visible = files.count; |
759 | if (redraw!=ONLY_SHOW) Sorting(); |
762 | if (redraw!=ONLY_SHOW) Sorting(); |
760 | list_full_redraw = true; |
763 | list_full_redraw = true; |
761 | if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw(); |
764 | if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw(); |
Line 999... | Line 1002... | ||
999 | inline fastcall void GoBack() |
1002 | inline fastcall void GoBack() |
1000 | { |
1003 | { |
1001 | char cur_folder[4096]; |
1004 | char cur_folder[4096]; |
1002 | strcpy(#cur_folder, #path); |
1005 | strcpy(#cur_folder, #path); |
1003 | cur_folder[strlen(#cur_folder)-1]=0x00; //delete last '/' |
1006 | cur_folder[strlen(#cur_folder)-1]=0x00; //delete last '/' |
- | 1007 | if (History.back()) { |
|
- | 1008 | strcpy(#path, History.current()); |
|
1004 | if (FoldersHistory.back()) SelectFileByName(#cur_folder+strrchr(#cur_folder,'/')); |
1009 | SelectFileByName(#cur_folder+strrchr(#cur_folder,'/')); |
- | 1010 | } |
|
1005 | } |
1011 | } |
Line 1006... | Line 1012... | ||
1006 | 1012 | ||
1007 | void ShowOpenWithDialog() |
1013 | void ShowOpenWithDialog() |
1008 | { |
1014 | { |