Rev 5554 | Rev 5556 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5481 | leency | 1 | //Leency, Veliant, Punk_Joker & KolibriOS Team 2008-2015 |
3363 | leency | 2 | //GNU GPL licence. |
3 | |||
4022 | leency | 4 | #ifndef AUTOBUILD |
5 | #include "lang.h--" |
||
6 | #endif |
||
7 | |||
3363 | leency | 8 | //libraries |
4049 | leency | 9 | #define MEMSIZE 0xD0000 |
3363 | leency | 10 | #include "..\lib\kolibri.h" |
4427 | punk_joker | 11 | #include "..\lib\clipboard.h" |
3363 | leency | 12 | #include "..\lib\strings.h" |
13 | #include "..\lib\mem.h" |
||
14 | #include "..\lib\dll.h" |
||
15 | #include "..\lib\file_system.h" |
||
5499 | leency | 16 | #include "..\lib\gui.h" |
3434 | leency | 17 | #include "..\lib\list_box.h" |
18 | #include "..\lib\copyf.h" |
||
4863 | leency | 19 | #include "..\lib\random.h" |
5487 | leency | 20 | //obj |
5499 | leency | 21 | #include "..\lib\obj\libini.h" |
22 | #include "..\lib\obj\box_lib.h" |
||
3363 | leency | 23 | //images |
24 | #include "imgs\toolbar.txt" |
||
25 | #include "imgs\left_p.txt" |
||
4846 | leency | 26 | #include "imgs\icons.txt" |
3363 | leency | 27 | |
3848 | punk_joker | 28 | #ifdef LANG_RUS |
29 | ?define T_FILE "Файл" |
||
30 | ?define T_TYPE "Тип" |
||
31 | ?define T_SIZE "Размер" |
||
32 | ?define T_NEW_FOLDER "Новая папка" |
||
33 | ?define T_NEW_FILE "Новый файл" |
||
34 | ?define T_DELETE_FILE "Вы действительно хотите удалить" |
||
35 | ?define T_YES "Да" |
||
36 | ?define T_NO "Нет" |
||
5555 | punk_joker | 37 | ?define T_CANCEL "Отмена" |
38 | ?define T_CREATE "Создать" |
||
3848 | punk_joker | 39 | ?define T_DEL_ERROR_1 "Ошибка. Папка не пустая." |
3997 | leency | 40 | ?define WAIT_DELETING_FOLDER "Удаляется папка. Подожите..." |
3848 | punk_joker | 41 | ?define NOT_CREATE_FOLDER "Не удалось создать папку." |
42 | ?define NOT_CREATE_FILE "Не удалось создать файл." |
||
5506 | punk_joker | 43 | ?define ERROR_1 "Ошибка при загрузке библиотеки /rd/1/lib/box_lib.obj" |
5514 | leency | 44 | ?define T_PASTE_WINDOW_TITLE "Копирую..." |
3883 | leency | 45 | ?define T_PASTE_WINDOW_TEXT "Копируется файл:" |
5514 | leency | 46 | ?define T_PASTE_WINDOW_BUTTON "Прервать" |
47 | ?define INFO_AFTER_COPY "Копирование завершено" |
||
4022 | leency | 48 | ?define T_CANCEL_PASTE "Копирование прекращено. Папка скопирована не полностью." |
4049 | leency | 49 | ?define T_SELECT_APP_TO_OPEN_WITH "Выберите программу для открытия файла" |
5514 | leency | 50 | ?define DEL_MORE_FILES_1 "выбранные элементы (" |
5512 | punk_joker | 51 | ?define DEL_MORE_FILES_2 " шт.)?" |
3933 | kaitz | 52 | #elif LANG_EST |
53 | ?define T_FILE "Fail" |
||
54 | ?define T_TYPE "T№№p" |
||
55 | ?define T_SIZE "Suurus" |
||
56 | ?define T_NEW_FOLDER "Uus kataloog" |
||
57 | ?define T_NEW_FILE "Uus fail" |
||
58 | ?define T_DELETE_FILE "Kas sa tahad tїesti kustutada" |
||
59 | ?define T_YES "Jah" |
||
60 | ?define T_NO "Ei" |
||
61 | ?define T_DEL_ERROR_1 "Viga. Kataloog ei ole t№hi." |
||
3997 | leency | 62 | ?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..." |
3933 | kaitz | 63 | ?define NOT_CREATE_FOLDER "Kataloogi ei saa luua." |
64 | ?define NOT_CREATE_FILE "Faili ei saa luua." |
||
5506 | punk_joker | 65 | ?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj" |
5514 | leency | 66 | ?define T_PASTE_WINDOW_TITLE "Kopeerin..." |
3933 | kaitz | 67 | ?define T_PASTE_WINDOW_TEXT "Kopeerin faili:" |
5514 | leency | 68 | ?define T_PASTE_WINDOW_BUTTON "Abort" |
69 | ?define INFO_AFTER_COPY "Copy finished" |
||
4022 | leency | 70 | ?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely." |
4049 | leency | 71 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
5514 | leency | 72 | ?define DEL_MORE_FILES_1 "selected items(" |
73 | ?define DEL_MORE_FILES_2 " pcs.)?" |
||
3848 | punk_joker | 74 | #else |
75 | ?define T_FILE "File" |
||
76 | ?define T_TYPE "Type" |
||
77 | ?define T_SIZE "Size" |
||
78 | ?define T_NEW_FOLDER "New folder" |
||
79 | ?define T_NEW_FILE "New file" |
||
80 | ?define T_DELETE_FILE "Do you really want to delete" |
||
81 | ?define T_YES "Yes" |
||
82 | ?define T_NO "No" |
||
83 | ?define T_DEL_ERROR_1 "Error. Folder isn't empty." |
||
3997 | leency | 84 | ?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..." |
3848 | punk_joker | 85 | ?define NOT_CREATE_FOLDER "Folder can not be created." |
86 | ?define NOT_CREATE_FILE "File can not be created." |
||
5506 | punk_joker | 87 | ?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj" |
5514 | leency | 88 | ?define T_PASTE_WINDOW_TITLE "Copying..." |
3883 | leency | 89 | ?define T_PASTE_WINDOW_TEXT "Copying file:" |
5514 | leency | 90 | ?define T_PASTE_WINDOW_BUTTON "Abort" |
91 | ?define INFO_AFTER_COPY "Copy finished" |
||
4022 | leency | 92 | ?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely." |
4049 | leency | 93 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
5514 | leency | 94 | ?define DEL_MORE_FILES_1 "selected items(" |
95 | ?define DEL_MORE_FILES_2 " pcs.)?" |
||
3848 | punk_joker | 96 | #endif |
97 | |||
3444 | leency | 98 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
99 | |||
5555 | punk_joker | 100 | #define TITLE "Eolite File Manager v2.77" |
101 | #define ABOUT_TITLE "Eolite v2.77" |
||
4076 | leency | 102 | dword col_padding, col_selec, col_lpanel; |
3363 | leency | 103 | |
3434 | leency | 104 | int toolbar_buttons_x[7]={9,46,85,134,167,203}; |
105 | struct path_string { char Item[4096]; }; |
||
3363 | leency | 106 | |
4136 | punk_joker | 107 | byte active_about=0; |
4070 | punk_joker | 108 | word about_window; |
5416 | punk_joker | 109 | byte active_settings=0; |
110 | word settings_window; |
||
4040 | punk_joker | 111 | |
4136 | punk_joker | 112 | byte menu_call_mouse=0; |
113 | |||
3434 | leency | 114 | llist files; |
115 | |||
116 | byte |
||
3363 | leency | 117 | path[4096], |
118 | file_path[4096], |
||
3404 | leency | 119 | file_name[256], |
5555 | punk_joker | 120 | new_element_name[256], |
3434 | leency | 121 | temp[4096]; |
122 | byte |
||
3439 | leency | 123 | rename_active=0, |
124 | del_active=0, |
||
5555 | punk_joker | 125 | new_element_active=0, |
4399 | punk_joker | 126 | show_dev_name=1, |
4225 | punk_joker | 127 | real_files_names_case=0, |
5532 | leency | 128 | use_big_fonts=0, |
129 | font_type, |
||
5459 | punk_joker | 130 | info_after_copy=0, |
3434 | leency | 131 | sort_num=2, |
3441 | leency | 132 | itdir; |
3363 | leency | 133 | |
5441 | leency | 134 | dword eolite_ini_path; |
135 | |||
3363 | leency | 136 | proc_info Form; |
4076 | leency | 137 | system_colors sc; |
3363 | leency | 138 | mouse m; |
5532 | leency | 139 | int mouse_dd, scroll_used, sc_slider_h, sorting_arrow_x, kolibrios_drive; |
4897 | leency | 140 | dword buf; |
3434 | leency | 141 | dword file_mas[6898]; |
142 | int j, i; |
||
4028 | leency | 143 | int action_buf; |
4863 | leency | 144 | int rand_n; |
5513 | punk_joker | 145 | int selected_count; |
3363 | leency | 146 | |
5549 | punk_joker | 147 | mouse gestures; |
148 | signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
||
149 | byte stats; |
||
150 | |||
4028 | leency | 151 | edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6}; |
5555 | punk_joker | 152 | edit_box new_file_ed = {150,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#new_element_name,#mouse_dd,64,6,6}; |
3434 | leency | 153 | PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0}; |
3363 | leency | 154 | PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0}; |
155 | |||
4042 | leency | 156 | #include "include\copy.h" |
5435 | leency | 157 | #include "include\gui.h" |
3363 | leency | 158 | #include "include\sorting.h" |
4042 | leency | 159 | #include "include\icons.h" |
3363 | leency | 160 | #include "include\left_panel.h" |
161 | #include "include\history.h" |
||
4042 | leency | 162 | #include "include\menu.h" |
163 | #include "include\about.h" |
||
5416 | punk_joker | 164 | #include "include\settings.h" |
5447 | punk_joker | 165 | #include "include\properties.h" |
3363 | leency | 166 | |
167 | void main() |
||
168 | { |
||
3444 | leency | 169 | word key, id, can_show, can_select, m_selected; |
4897 | leency | 170 | dword selected_offset; |
4863 | leency | 171 | rand_n = random(40); |
5549 | punk_joker | 172 | gestures.get(); |
3363 | leency | 173 | mem_Init(); |
3848 | punk_joker | 174 | if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_1); |
5399 | punk_joker | 175 | if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini"); |
5441 | leency | 176 | eolite_ini_path = abspath("Eolite.ini"); |
177 | LoadIniSettings(); |
||
178 | GetSystemDiscs(); |
||
4076 | leency | 179 | SetAppColors(); |
5555 | punk_joker | 180 | strcpy(#new_element_name, T_NEW_FILE); |