Rev 7051 | Rev 7086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7051 | Rev 7054 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | #include "lang.h--" |
5 | #include "lang.h--" |
6 | #endif |
6 | #endif |
Line 7... | Line 7... | ||
7 | 7 | ||
8 | //libraries |
8 | //libraries |
9 | #define MEMSIZE 4096 * 180 |
9 | #define MEMSIZE 4096 * 180 |
10 | #include "..\lib\clipboard.h" |
10 | #include "../lib/clipboard.h" |
11 | #include "..\lib\strings.h" |
11 | #include "../lib/strings.h" |
12 | #include "..\lib\mem.h" |
12 | #include "../lib/mem.h" |
13 | #include "..\lib\file_system.h" |
13 | #include "../lib/file_system.h" |
14 | #include "..\lib\gui.h" |
14 | #include "../lib/gui.h" |
15 | #include "..\lib\list_box.h" |
15 | #include "../lib/list_box.h" |
16 | #include "..\lib\random.h" |
16 | #include "../lib/random.h" |
17 | #include "..\lib\kfont.h" |
17 | #include "../lib/kfont.h" |
18 | #include "..\lib\collection.h" |
18 | #include "../lib/collection.h" |
- | 19 | #include "../lib/menu.h" |
|
- | 20 | #include "../lib/copyf.h" |
|
19 | #include "..\lib\menu.h" |
21 | |
20 | #include "..\lib\obj\libini.h" |
22 | #include "../lib/obj/libini.h" |
- | 23 | #include "../lib/obj/box_lib.h" |
|
21 | #include "..\lib\obj\box_lib.h" |
24 | |
- | 25 | #include "../lib/patterns/history.h" |
|
Line 22... | Line 26... | ||
22 | #include "..\lib\patterns\history.h" |
26 | #include "../lib/patterns/libimg_load_skin.h" |
23 | 27 | ||
24 | //images |
- | |
Line 25... | Line 28... | ||
25 | #include "imgs\left_p.txt" |
28 | //images |
26 | #include "imgs\icons.txt" |
29 | #include "imgs/left_p.txt" |
27 | 30 | ||
28 | //Button IDs |
31 | //Button IDs |
Line 101... | Line 104... | ||
101 | show_breadcrumb=false, |
104 | show_breadcrumb=false, |
102 | show_status_bar=true, |
105 | show_status_bar=true, |
103 | active_panel=1; |
106 | active_panel=1; |
104 | //} settings; |
107 | //} settings; |
Line -... | Line 108... | ||
- | 108 | ||
- | 109 | libimg_image icons16_default; |
|
- | 110 | libimg_image icons16_selected; |
|
105 | 111 | ||
106 | #define STATUS_BAR_H 16; |
112 | #define STATUS_BAR_H 16; |
Line 107... | Line 113... | ||
107 | int status_bar_h = 0; |
113 | int status_bar_h = 0; |
108 | 114 | ||
Line 112... | Line 118... | ||
112 | #include "include\translations.h" |
118 | #include "include\translations.h" |
113 | #include "include\fs.h" |
119 | #include "include\fs.h" |
Line 114... | Line 120... | ||
114 | 120 | ||
115 | #include "include\settings.h" |
121 | #include "include\settings.h" |
116 | #include "include\progress_dialog.h" |
- | |
117 | #include "..\lib\copyf.h" |
122 | #include "include\progress_dialog.h" |
118 | #include "include\copy.h" |
123 | #include "include\copy.h" |
119 | #include "include\gui.h" |
124 | #include "include\gui.h" |
120 | #include "include\sorting.h" |
125 | #include "include\sorting.h" |
121 | #include "include\icons.h" |
126 | #include "include\icons.h" |
Line 134... | Line 139... | ||
134 | char stats; |
139 | char stats; |
135 | rand_n = random(40); |
140 | rand_n = random(40); |
Line 136... | Line 141... | ||
136 | 141 | ||
137 | load_dll(boxlib, #box_lib_init,0); |
142 | load_dll(boxlib, #box_lib_init,0); |
- | 143 | load_dll(libini, #lib_init,1); |
|
- | 144 | load_dll(libio, #libio_init,1); |
|
Line 138... | Line 145... | ||
138 | load_dll(libini, #lib_init,1); |
145 | load_dll(libimg, #libimg_init,1); |
Line 139... | Line 146... | ||
139 | 146 | ||
140 | eolite_ini_path = abspath("Eolite.ini"); |
147 | eolite_ini_path = abspath("Eolite.ini"); |
141 | 148 | ||
Line -... | Line 149... | ||
- | 149 | LoadIniSettings(); |
|
- | 150 | SystemDiscs.Get(); |
|
- | 151 | SetAppColors(); |
|
- | 152 | ||
- | 153 | Libimg_LoadImage(#icons16_default, "/sys/icons16.png"); |
|
142 | LoadIniSettings(); |
154 | Libimg_LoadImage(#icons16_selected, "/sys/icons16.png"); |
143 | SystemDiscs.Get(); |
155 | Libimg_ReplaceColor(icons16_selected.image, icons16_selected.w, icons16_selected.h, 0xffFFFfff, 0xFF94AECE); |
144 | SetAppColors(); |
156 | Libimg_ReplaceColor(icons16_selected.image, icons16_selected.w, icons16_selected.h, 0xffCACBD6, 0xFF94AECE); |
145 | 157 | ||
146 | //-p just show file/folder properties dialog |
158 | //-p just show file/folder properties dialog |
Line 314... | Line 326... | ||
314 | //Button pressed----------------------------------------------------------------------------- |
326 | //Button pressed----------------------------------------------------------------------------- |
315 | case evButton: |
327 | case evButton: |
316 | id=GetButtonID(); |
328 | id=GetButtonID(); |
317 | switch(id) |
329 | switch(id) |
318 | { |
330 | { |
319 | case 01: |
331 | case CLOSE_BTN: |
320 | KillProcess(about_window); |
332 | KillProcess(about_window); |
321 | SaveIniSettings(); |
333 | SaveIniSettings(); |
322 | ExitProcess(); |
334 | ExitProcess(); |
323 | case 21: //Back |
335 | case 21: //Back |
324 | GoBack(); |
336 | GoBack(); |
Line 358... | Line 370... | ||
358 | if (del_active) Del_File(id-POPUP_BTN2); |
370 | if (del_active) Del_File(id-POPUP_BTN2); |
359 | if (new_element_active) NewElement(id-POPUP_BTN2); |
371 | if (new_element_active) NewElement(id-POPUP_BTN2); |
360 | DeleteButton(POPUP_BTN1); |
372 | DeleteButton(POPUP_BTN1); |
361 | DeleteButton(POPUP_BTN2); |
373 | DeleteButton(POPUP_BTN2); |
362 | break; |
374 | break; |
363 | case BREADCRUMB_ID...400: |
375 | case BREADCRUMB_ID...360: |
364 | ClickOnBreadCrumb(id-BREADCRUMB_ID); |
376 | ClickOnBreadCrumb(id-BREADCRUMB_ID); |
365 | break; |
377 | break; |
366 | } |
378 | } |
367 | break; |
379 | break; |
Line 686... | Line 698... | ||
686 | icon_y = files.item_h/2-7+y; |
698 | icon_y = files.item_h/2-7+y; |
687 | BDVK file; |
699 | BDVK file; |
688 | char temp_path[sizeof(file_path)]; |
700 | char temp_path[sizeof(file_path)]; |
689 | char label_file_name[4096]; |
701 | char label_file_name[4096]; |
690 | if (filenum==-1) return; |
702 | if (filenum==-1) return; |
691 | DrawBar(files.x,y,3,files.item_h,bgcol); |
703 | DrawBar(files.x,y,4,files.item_h,bgcol); |
692 | DrawBar(files.x+19,y,files.w-19,files.item_h,bgcol); |
704 | DrawBar(files.x+20,y,files.w-20,files.item_h,bgcol); |
693 | if (files.item_h>15) DrawBar(files.x+3,y,16,icon_y-y,bgcol); |
705 | DrawBar(files.x+4,y,16,icon_y-y,bgcol); |
694 | if (files.item_h>16) DrawBar(files.x+3,icon_y+15,16,y+files.item_h-icon_y-15,bgcol); |
706 | if (files.item_h>16) DrawBar(files.x+4,icon_y+15,16,y+files.item_h-icon_y-15,bgcol); |
Line 695... | Line 707... | ||
695 | 707 | ||
696 | file_offet = file_mas[filenum+files.first]*304 + buf+32; |
708 | file_offet = file_mas[filenum+files.first]*304 + buf+32; |
697 | attr = ESDWORD[file_offet]; |
709 | attr = ESDWORD[file_offet]; |
698 | file.selected = ESBYTE[file_offet+7]; |
710 | file.selected = ESBYTE[file_offet+7]; |
Line 713... | Line 725... | ||
713 | ); |
725 | ); |
714 | if (ext1) && (strlen(ext1)<9) WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1); |
726 | if (ext1) && (strlen(ext1)<9) WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1); |
715 | } |
727 | } |
716 | else |
728 | else |
717 | { |
729 | { |
718 | if (!strncmp(file_name_off,"..",3)) ext1=".."; else { |
730 | if (!strncmp(file_name_off,"..",3)) ext1=" |
719 | ext1=" |
731 | ext1=" |
720 | WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1); |
732 | WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1); |
721 | } |
733 | } |
722 | } |
734 | } |
723 | sprintf(#temp_path,"%s/%s",#path,file_name_off); |
735 | sprintf(#temp_path,"%s/%s",#path,file_name_off); |
724 | DrawIconByExtension(#temp_path, ext1, files.x+3, icon_y, bgcol); |
736 | DrawIconByExtension(#temp_path, ext1, files.x+4, icon_y, bgcol); |
Line 725... | Line 737... | ||
725 | 737 | ||
726 | if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden? |
738 | if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden? |
727 | if (bgcol!=0xFFFfff) |
739 | if (bgcol!=0xFFFfff) |
728 | { |
740 | { |