Rev 5738 | Rev 5745 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5738 | Rev 5743 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | #ifndef AUTOBUILD |
4 | #ifndef AUTOBUILD |
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 510000 |
9 | #define MEMSIZE 530000 |
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\copyf.h" |
16 | #include "..\lib\copyf.h" |
- | 17 | #include "..\lib\random.h" |
|
17 | #include "..\lib\random.h" |
18 | #include "..\lib\font.h" |
18 | //obj |
19 | //obj |
19 | #include "..\lib\obj\libini.h" |
20 | #include "..\lib\obj\libini.h" |
20 | #include "..\lib\obj\box_lib.h" |
21 | #include "..\lib\obj\box_lib.h" |
21 | //images |
22 | //images |
Line 31... | Line 32... | ||
31 | int toolbar_buttons_x[7]={9,46,85,134,167,203}; |
32 | int toolbar_buttons_x[7]={9,46,85,134,167,203}; |
32 | struct path_string { char Item[4096]; }; |
33 | struct path_string { char Item[4096]; }; |
Line 33... | Line 34... | ||
33 | 34 | ||
34 | byte active_about=0; |
35 | byte active_about=0; |
35 | word about_window; |
- | |
36 | byte active_settings=0; |
36 | word about_window; |
37 | word settings_window; |
37 | word settings_window; |
38 | dword _not_draw = false; |
38 | dword _not_draw = false; |
Line 39... | Line 39... | ||
39 | byte menu_call_mouse=0; |
39 | byte menu_call_mouse=0; |
Line 57... | Line 57... | ||
57 | new_element_name[256], |
57 | new_element_name[256], |
58 | temp[4096], |
58 | temp[4096], |
59 | itdir; |
59 | itdir; |
Line 60... | Line 60... | ||
60 | 60 | ||
61 | //struct t_settings { |
61 | //struct t_settings { |
62 | byte use_big_fonts=false, |
62 | byte font_size=9, |
63 | sort_num=2, |
63 | sort_num=2, |
64 | show_dev_name=true, |
64 | show_dev_name=true, |
65 | real_files_names_case=false, |
65 | real_files_names_case=false, |
66 | info_after_copy=false, |
66 | info_after_copy=false, |
Line 108... | Line 108... | ||
108 | word id; |
108 | word id; |
109 | char can_show, can_select, stats; |
109 | char can_show, can_select, stats; |
110 | dword selected_offset; |
110 | dword selected_offset; |
111 | dword IPC_LEN,IPC_ID; |
111 | dword IPC_LEN,IPC_ID; |
112 | char IPC_BUF[10]; |
112 | char IPC_BUF[10]; |
113 | dword tmp; |
- | |
114 | rand_n = random(40); |
113 | rand_n = random(40); |
Line 115... | Line 114... | ||
115 | 114 | ||
116 | load_dll(boxlib, #box_lib_init,0); |
115 | load_dll(boxlib, #box_lib_init,0); |
117 | load_dll(libini, #lib_init,1); |
116 | load_dll(libini, #lib_init,1); |
118 | eolite_ini_path = abspath("Eolite.ini"); |
117 | eolite_ini_path = abspath("Eolite.ini"); |
119 | LoadIniSettings(); |
118 | LoadIniSettings(); |
120 | GetSystemDiscs(); |
119 | GetSystemDiscs(); |
121 | SetAppColors(); |
120 | SetAppColors(); |
122 | if (param) |
121 | if (param) |
123 | { |
- | |
124 | tmp = strlen(#path); |
122 | { |
125 | strlcpy(#path, #param, tmp); |
- | |
126 | $dec tmp |
123 | strcpy(#path, #param); |
127 | if (path[tmp]!='/') DSBYTE[#path+tmp] = '/'; //add "/" to the end of the string |
124 | if (path[strlen(#path)-1]!='/') chrcat(#path, '/'); //add "/" to the end of the string |
128 | } |
125 | } |
129 | else |
126 | else |
130 | { |
127 | { |
131 | strlcpy(#path, "/rd/1/", 6); |
128 | strlcpy(#path, "/rd/1/", 6); |
132 | } |
129 | } |
133 | Open_Dir(#path,ONLY_OPEN); |
130 | Open_Dir(#path,ONLY_OPEN); |
134 | strcpy(#inactive_path, #path); |
131 | strcpy(#inactive_path, #path); |
- | 132 | llist_copy(#files_inactive, #files); |
|
135 | llist_copy(#files_inactive, #files); |
133 | //font.load("/sys/font/Verdana.kf"); |
136 | SetEventMask(1100111b); |
134 | SetEventMask(1100111b); |
137 | loop(){ |
135 | loop(){ |
138 | switch(WaitEvent()) |
136 | switch(WaitEvent()) |
139 | { |
137 | { |
Line 264... | Line 262... | ||
264 | if (scroll_used) |
262 | if (scroll_used) |
265 | { |
263 | { |
266 | if (sc_slider_h/2+files.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii |
264 | if (sc_slider_h/2+files.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii |
267 | id = files.first; |
265 | id = files.first; |
268 | files.first = -sc_slider_h / 2 + mouse.y -j -files.y * files.count; |
266 | files.first = -sc_slider_h / 2 + mouse.y -j -files.y * files.count; |
269 | files.first /= Form.cheight - 18 - files.y; |
267 | files.first /= files.h - 18; |
270 | if (files.visible+files.first>files.count) files.first=files.count-files.visible; |
268 | if (files.visible+files.first>files.count) files.first=files.count-files.visible; |
- | 269 | if (files.first<0) files.first=0; |
|
271 | if (id!=files.first) List_ReDraw(); |
270 | if (id!=files.first) List_ReDraw(); |
272 | break; |
271 | break; |
273 | } |
272 | } |
Line 508... | Line 507... | ||
508 | if (action_buf==106) Paste(); |
507 | if (action_buf==106) Paste(); |
509 | if (action_buf==207) FnProcess(2); |
508 | if (action_buf==207) FnProcess(2); |
510 | if (action_buf==108) Del_Form(); |
509 | if (action_buf==108) Del_Form(); |
511 | if (action_buf==109) FnProcess(5); |
510 | if (action_buf==109) FnProcess(5); |
512 | if (action_buf==110) FnProcess(8); |
511 | if (action_buf==110) FnProcess(8); |
513 | if (action_buf==300) { FnProcess(5); List_ReDraw(); } |
- | |
514 | action_buf=0; |
512 | action_buf=0; |
515 | } |
513 | } |
516 | } |
514 | } |
Line 517... | Line 515... | ||
517 | 515 | ||
Line 1112... | Line 1110... | ||
1112 | case 8: |
1110 | case 8: |
1113 | properties_stak = malloc(8096); |
1111 | properties_stak = malloc(8096); |
1114 | CreateThread(#properties_dialog, properties_stak+8092); |
1112 | CreateThread(#properties_dialog, properties_stak+8092); |
1115 | break; |
1113 | break; |
1116 | case 10: //F10 |
1114 | case 10: //F10 |
1117 | if (!active_settings) |
1115 | if (!settings_window) |
1118 | { |
1116 | { |
1119 | settings_stak = malloc(4096); |
1117 | settings_stak = malloc(4096); |
1120 | settings_window = CreateThread(#settings_dialog, settings_stak+4092); |
1118 | settings_window = CreateThread(#settings_dialog, settings_stak+4092); |
1121 | break; |
1119 | break; |
1122 | } |
1120 | } |
Line 1135... | Line 1133... | ||
1135 | strcpy(#active_path, #inactive_path); |
1133 | strcpy(#active_path, #inactive_path); |
1136 | strcpy(#inactive_path, #path); |
1134 | strcpy(#inactive_path, #path); |
1137 | DrawFilePanels(); |
1135 | DrawFilePanels(); |
1138 | } |
1136 | } |
Line 1139... | Line -... | ||
1139 | - | ||
1140 | //need to remove these functiones, they are a very old shit :) |
- | |
1141 | dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;} |
- | |
Line 1142... | Line 1137... | ||
1142 | 1137 |