Rev 5554 | Rev 5556 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5554 | Rev 5555 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | ?define T_NEW_FOLDER "®¢ ï ¯ ¯ª " |
32 | ?define T_NEW_FOLDER "®¢ ï ¯ ¯ª " |
33 | ?define T_NEW_FILE "®¢ë© ä ©«" |
33 | ?define T_NEW_FILE "®¢ë© ä ©«" |
34 | ?define T_DELETE_FILE "ë ¤¥©áâ¢¨â¥«ì® å®â¨â¥ 㤠«¨âì" |
34 | ?define T_DELETE_FILE "ë ¤¥©áâ¢¨â¥«ì® å®â¨â¥ 㤠«¨âì" |
35 | ?define T_YES " " |
35 | ?define T_YES " " |
36 | ?define T_NO "¥â" |
36 | ?define T_NO "¥â" |
- | 37 | ?define T_CANCEL "⬥ " |
|
- | 38 | ?define T_CREATE "®§¤ âì" |
|
37 | ?define T_DEL_ERROR_1 "訡ª . ¯ª ¥ ¯ãáâ ï." |
39 | ?define T_DEL_ERROR_1 "訡ª . ¯ª ¥ ¯ãáâ ï." |
38 | ?define WAIT_DELETING_FOLDER "¤ «ï¥âáï ¯ ¯ª . ®¤®¦¨â¥..." |
40 | ?define WAIT_DELETING_FOLDER "¤ «ï¥âáï ¯ ¯ª . ®¤®¦¨â¥..." |
39 | ?define NOT_CREATE_FOLDER "¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã." |
41 | ?define NOT_CREATE_FOLDER "¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã." |
40 | ?define NOT_CREATE_FILE "¥ 㤠«®áì ᮧ¤ âì ä ©«." |
42 | ?define NOT_CREATE_FILE "¥ 㤠«®áì ᮧ¤ âì ä ©«." |
41 | ?define ERROR_1 "訡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj" |
43 | ?define ERROR_1 "訡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj" |
Line 93... | Line 95... | ||
93 | ?define DEL_MORE_FILES_2 " pcs.)?" |
95 | ?define DEL_MORE_FILES_2 " pcs.)?" |
94 | #endif |
96 | #endif |
Line 95... | Line 97... | ||
95 | 97 | ||
Line 96... | Line 98... | ||
96 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
98 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
97 | 99 | ||
98 | #define TITLE "Eolite File Manager v2.75" |
100 | #define TITLE "Eolite File Manager v2.77" |
Line 99... | Line 101... | ||
99 | #define ABOUT_TITLE "Eolite v2.75" |
101 | #define ABOUT_TITLE "Eolite v2.77" |
100 | dword col_padding, col_selec, col_lpanel; |
102 | dword col_padding, col_selec, col_lpanel; |
Line 113... | Line 115... | ||
113 | 115 | ||
114 | byte |
116 | byte |
115 | path[4096], |
117 | path[4096], |
116 | file_path[4096], |
118 | file_path[4096], |
- | 119 | file_name[256], |
|
117 | file_name[256], |
120 | new_element_name[256], |
118 | temp[4096]; |
121 | temp[4096]; |
119 | byte |
122 | byte |
120 | rename_active=0, |
123 | rename_active=0, |
- | 124 | del_active=0, |
|
121 | del_active=0, |
125 | new_element_active=0, |
122 | show_dev_name=1, |
126 | show_dev_name=1, |
123 | real_files_names_case=0, |
127 | real_files_names_case=0, |
124 | use_big_fonts=0, |
128 | use_big_fonts=0, |
125 | font_type, |
129 | font_type, |
Line 143... | Line 147... | ||
143 | mouse gestures; |
147 | mouse gestures; |
144 | signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
148 | signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
145 | byte stats; |
149 | byte stats; |
Line 146... | Line 150... | ||
146 | 150 | ||
- | 151 | edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6}; |
|
147 | edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6}; |
152 | edit_box new_file_ed = {150,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#new_element_name,#mouse_dd,64,6,6}; |
148 | PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0}; |
153 | PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0}; |
Line 149... | Line 154... | ||
149 | PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0}; |
154 | PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0}; |
150 | 155 | ||
Line 170... | Line 175... | ||
170 | if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini"); |
175 | if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini"); |
171 | eolite_ini_path = abspath("Eolite.ini"); |
176 | eolite_ini_path = abspath("Eolite.ini"); |
172 | LoadIniSettings(); |
177 | LoadIniSettings(); |
173 | GetSystemDiscs(); |
178 | GetSystemDiscs(); |
174 | SetAppColors(); |
179 | SetAppColors(); |
- | 180 | strcpy(#new_element_name, T_NEW_FILE); |
|
- | 181 | new_file_ed.size = strlen(T_NEW_FILE); |
|
175 | if (param) |
182 | if (param) |
176 | { |
183 | { |
177 | strcpy(#path, #param); |
184 | strcpy(#path, #param); |
178 | if (path[strlen(#path)-1]!='/') chrcat(#path, '/'); //add "/" to the end of the string |
185 | if (path[strlen(#path)-1]!='/') chrcat(#path, '/'); //add "/" to the end of the string |
179 | } |
186 | } |
Line 185... | Line 192... | ||
185 | SetEventMask(0x27); |
192 | SetEventMask(0x27); |
186 | loop() switch(WaitEvent()) |
193 | loop() switch(WaitEvent()) |
187 | { |
194 | { |
188 | case evMouse: |
195 | case evMouse: |
189 | if (del_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) break; |
196 | if (del_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) break; |
- | 197 | if (new_element_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) |
|
- | 198 | { |
|
- | 199 | edit_box_mouse stdcall(#new_file_ed); |
|
- | 200 | break; |
|
- | 201 | } |
|
190 | if (rename_active) { edit_box_mouse stdcall(#edit2); break; } |
202 | if (rename_active) { edit_box_mouse stdcall(#edit2); break; } |
Line 191... | Line 203... | ||
191 | 203 | ||
Line 341... | Line 353... | ||
341 | if (del_active) |
353 | if (del_active) |
342 | { |
354 | { |
343 | IF (id==301) || (id==302) Del_File(302-id); |
355 | IF (id==301) || (id==302) Del_File(302-id); |
344 | break; |
356 | break; |
345 | } |
357 | } |
- | 358 | if (new_element_active) |
|
- | 359 | { |
|
- | 360 | IF (id==301) || (id==302) NewElement(302-id); |
|
- | 361 | break; |
|
- | 362 | } |
|
Line 346... | Line 363... | ||
346 | 363 | ||
347 | switch(id) |
364 | switch(id) |
348 | { |
365 | { |
349 | case 21: //Back |
366 | case 21: //Back |
Line 397... | Line 414... | ||
397 | { |
414 | { |
398 | IF (key==013) Del_File(true); |
415 | IF (key==013) Del_File(true); |
399 | IF (key==027) Del_File(false); |
416 | IF (key==027) Del_File(false); |
400 | break; |
417 | break; |
401 | } |
418 | } |
- | 419 | IF (new_element_active) |
|
- | 420 | { |
|
- | 421 | IF (key==027) NewElement(0); |
|
- | 422 | EAX=key<<8; |
|
- | 423 | edit_box_key stdcall (#new_file_ed); |
|
- | 424 | break; |
|
- | 425 | } |
|
402 | IF (edit2.flags!=64) && (key!=13) && (key!=27) |
426 | IF (edit2.flags!=64) && (key!=13) && (key!=27) |
403 | { |
427 | { |
404 | EAX=key<<8; |
428 | EAX=key<<8; |
405 | edit_box_key stdcall (#edit2); |
429 | edit_box_key stdcall (#edit2); |
406 | break; |
430 | break; |
Line 591... | Line 615... | ||
591 | DrawBar(files.x+files.w,files.y,1,onTop(22,files.y),sc.work_graph); //line to the left from the scroll |
615 | DrawBar(files.x+files.w,files.y,1,onTop(22,files.y),sc.work_graph); //line to the left from the scroll |
592 | DrawFlatButton(files.x+files.w,40,16,16,0,sc.work,"\x18"); |
616 | DrawFlatButton(files.x+files.w,40,16,16,0,sc.work,"\x18"); |
593 | DrawFlatButton(files.x+files.w,onTop(22,0),16,16,0,sc.work,"\x19"); |
617 | DrawFlatButton(files.x+files.w,onTop(22,0),16,16,0,sc.work,"\x19"); |
594 | Open_Dir(#path,ONLY_SHOW); |
618 | Open_Dir(#path,ONLY_SHOW); |
595 | if (del_active) Del_Form(); |
619 | if (del_active) Del_Form(); |
- | 620 | if (new_element_active) NewElement_Form(); |
|
596 | if (rename_active) FnProcess(2); |
621 | if (rename_active) FnProcess(2); |
597 | } |
622 | } |
Line 598... | Line 623... | ||
598 | 623 | ||
Line 1028... | Line 1053... | ||
1028 | param[1] = '\0'; |
1053 | param[1] = '\0'; |
1029 | strcat(#param, #file_path); |
1054 | strcat(#param, #file_path); |
1030 | RunProgram("/sys/@open", #param); |
1055 | RunProgram("/sys/@open", #param); |
1031 | } |
1056 | } |
Line -... | Line 1057... | ||
- | 1057 | ||
- | 1058 | void NewElement(byte newf) |
|
- | 1059 | { |
|
- | 1060 | if (newf) |
|
- | 1061 | { |
|
- | 1062 | strcpy(#temp, #path); |
|
- | 1063 | strcat(#temp, new_file_ed.text); |
|
- | 1064 | if (new_element_active==1) |
|
- | 1065 | { |
|
- | 1066 | WriteFile(0, 0, #temp); |
|
- | 1067 | if (EAX) |
|
- | 1068 | { |
|
- | 1069 | Write_Error(EAX); |
|
- | 1070 | ShowMessage(NOT_CREATE_FILE, 150); |
|
- | 1071 | } |
|
- | 1072 | } |
|
- | 1073 | else |
|
- | 1074 | { |
|
- | 1075 | CreateDir(#temp); |
|
- | 1076 | if (EAX) |
|
- | 1077 | { |
|
- | 1078 | Write_Error(EAX); |
|
- | 1079 | ShowMessage(NOT_CREATE_FOLDER, 150); |
|
- | 1080 | } |
|
- | 1081 | } |
|
- | 1082 | } |
|
- | 1083 | new_element_active = 0; |
|
- | 1084 | SelectFile(new_file_ed.text); |
|
- | 1085 | } |
|
- | 1086 | ||
- | 1087 | void NewElement_Form(byte crt) |
|
- | 1088 | { |
|
- | 1089 | int dform_x=files.w-220/2+files.x; |
|
- | 1090 | new_element_active = crt; |
|
- | 1091 | if (new_element_active==1) |
|
- | 1092 | { |
|
- | 1093 | strcpy(#new_element_name, T_NEW_FILE); |
|
- | 1094 | new_file_ed.size = strlen(T_NEW_FILE); |
|
- | 1095 | } |
|
- | 1096 | else |
|
- | 1097 | { |
|
- | 1098 | strcpy(#new_element_name, T_NEW_FOLDER); |
|
- | 1099 | new_file_ed.size = strlen(T_NEW_FOLDER); |
|
- | 1100 | } |
|
- | 1101 | DrawPopup(dform_x,160,220,80,1,sc.work,sc.work_graph); |
|
- | 1102 | new_file_ed.left = dform_x+27; |
|
- | 1103 | new_file_ed.top = 180; |
|
- | 1104 | edit_box_draw stdcall (#new_file_ed); |
|
- | 1105 | DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_CREATE); |
|
- | 1106 | DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_CANCEL); |
|
- | 1107 | } |
|
1032 | 1108 | ||
1033 | void FnProcess(char N) |
1109 | void FnProcess(char N) |
1034 | { |
1110 | { |
1035 | switch(N) |
1111 | switch(N) |
1036 | { |
1112 | { |
Line 1071... | Line 1147... | ||
1071 | GetSystemDiscs(); |
1147 | GetSystemDiscs(); |
1072 | Open_Dir(#path,WITH_REDRAW); |
1148 | Open_Dir(#path,WITH_REDRAW); |
1073 | DrawLeftPanel(); |
1149 | DrawLeftPanel(); |
1074 | break; |
1150 | break; |
1075 | case 6: |
1151 | case 6: |
1076 | strcpy(#temp, #path); |
1152 | /*strcpy(#temp, #path); |
1077 | strcat(#temp, T_NEW_FOLDER); |
1153 | strcat(#temp, T_NEW_FOLDER); |
1078 | CreateDir(#temp); |
1154 | CreateDir(#temp); |
1079 | if (!EAX){ |
1155 | if (!EAX){ |
1080 | SelectFile(T_NEW_FOLDER); |
1156 | SelectFile(T_NEW_FOLDER); |
1081 | FnProcess(2); |
1157 | FnProcess(2); |
1082 | } |
1158 | } |
1083 | else |
1159 | else |
1084 | { |
1160 | { |
1085 | Write_Error(EAX); |
1161 | Write_Error(EAX); |
1086 | ShowMessage(NOT_CREATE_FOLDER, 150); |
1162 | ShowMessage(NOT_CREATE_FOLDER, 150); |
1087 | } |
1163 | }*/ |
- | 1164 | NewElement_Form(2); |
|
1088 | break; |
1165 | break; |
1089 | case 7: |
1166 | case 7: |
1090 | strcpy(#temp, #path); |
1167 | /*strcpy(#temp, #path); |
1091 | strcat(#temp, T_NEW_FILE); |
1168 | strcat(#temp, T_NEW_FILE); |
1092 | WriteFile(0, 0, #temp); |
1169 | WriteFile(0, 0, #temp); |
1093 | if (!EAX){ |
1170 | if (!EAX){ |
1094 | SelectFile(T_NEW_FILE); |
1171 | SelectFile(T_NEW_FILE); |
1095 | FnProcess(2); |
1172 | FnProcess(2); |
1096 | } |
1173 | } |
1097 | else |
1174 | else |
1098 | { |
1175 | { |
1099 | Write_Error(EAX); |
1176 | Write_Error(EAX); |
1100 | ShowMessage(NOT_CREATE_FILE, 150); |
1177 | ShowMessage(NOT_CREATE_FILE, 150); |
1101 | } |
1178 | }*/ |
- | 1179 | NewElement_Form(1); |
|
1102 | break; |
1180 | break; |
1103 | case 8: |
1181 | case 8: |
1104 | SwitchToAnotherThread(); |
1182 | SwitchToAnotherThread(); |
1105 | CreateThread(#properties_dialog, #properties_stak+4092); |
1183 | CreateThread(#properties_dialog, #properties_stak+4092); |
1106 | break; |
1184 | break; |