Subversion Repositories Kolibri OS

Rev

Rev 5556 | Rev 5571 | 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 "Создать"
5557 punk_joker 39
	?define FILE_EXISTS "Файл с таким именем существует"
40
	?define FOLDER_EXISTS "Папка с таким именем существует"
3848 punk_joker 41
	?define T_DEL_ERROR_1 "Ошибка. Папка не пустая."
3997 leency 42
	?define WAIT_DELETING_FOLDER "Удаляется папка. Подожите..."
3848 punk_joker 43
	?define NOT_CREATE_FOLDER "Не удалось создать папку."
44
	?define NOT_CREATE_FILE "Не удалось создать файл."
5506 punk_joker 45
	?define ERROR_1 "Ошибка при загрузке библиотеки /rd/1/lib/box_lib.obj"
5514 leency 46
	?define T_PASTE_WINDOW_TITLE "Копирую..."
3883 leency 47
	?define T_PASTE_WINDOW_TEXT "Копируется файл:"
5514 leency 48
	?define T_PASTE_WINDOW_BUTTON "Прервать"
49
	?define INFO_AFTER_COPY "Копирование завершено"
4022 leency 50
	?define T_CANCEL_PASTE "Копирование прекращено. Папка скопирована не полностью."
4049 leency 51
	?define T_SELECT_APP_TO_OPEN_WITH "Выберите программу для открытия файла"
5514 leency 52
	?define DEL_MORE_FILES_1 "выбранные элементы ("
5512 punk_joker 53
	?define DEL_MORE_FILES_2 " шт.)?"
3933 kaitz 54
#elif LANG_EST
55
	?define T_FILE "Fail"
56
	?define T_TYPE "T№№p"
57
	?define T_SIZE "Suurus"
58
	?define T_NEW_FOLDER "Uus kataloog"
59
	?define T_NEW_FILE "Uus fail"
60
	?define T_DELETE_FILE "Kas sa tahad tїesti kustutada"
61
	?define T_YES "Jah"
62
	?define T_NO "Ei"
5556 punk_joker 63
	?define T_CANCEL "Cancel"
64
	?define T_CREATE "Create"
5557 punk_joker 65
	?define FILE_EXISTS "The file with the same name exists"
66
	?define FOLDER_EXISTS "A folder with the same name exists"
3933 kaitz 67
	?define T_DEL_ERROR_1 "Viga. Kataloog ei ole t№hi."
3997 leency 68
	?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
3933 kaitz 69
	?define NOT_CREATE_FOLDER "Kataloogi ei saa luua."
70
	?define NOT_CREATE_FILE "Faili ei saa luua."
5506 punk_joker 71
	?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
5514 leency 72
	?define T_PASTE_WINDOW_TITLE "Kopeerin..."
3933 kaitz 73
	?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
5514 leency 74
	?define T_PASTE_WINDOW_BUTTON "Abort"
75
	?define INFO_AFTER_COPY "Copy finished"
4022 leency 76
	?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
4049 leency 77
	?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
5514 leency 78
	?define DEL_MORE_FILES_1 "selected items("
79
	?define DEL_MORE_FILES_2 " pcs.)?"
3848 punk_joker 80
#else
81
	?define T_FILE "File"
82
	?define T_TYPE "Type"
83
	?define T_SIZE "Size"
84
	?define T_NEW_FOLDER "New folder"
85
	?define T_NEW_FILE "New file"
86
	?define T_DELETE_FILE "Do you really want to delete"
87
	?define T_YES "Yes"
88
	?define T_NO "No"
5556 punk_joker 89
	?define T_CANCEL "Cancel"
90
	?define T_CREATE "Create"
5557 punk_joker 91
	?define FILE_EXISTS "The file with the same name exists"
92
	?define FOLDER_EXISTS "A folder with the same name exists"
3848 punk_joker 93
	?define T_DEL_ERROR_1 "Error. Folder isn't empty."
3997 leency 94
	?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
3848 punk_joker 95
	?define NOT_CREATE_FOLDER "Folder can not be created."
96
	?define NOT_CREATE_FILE "File can not be created."
5506 punk_joker 97
	?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
5514 leency 98
	?define T_PASTE_WINDOW_TITLE "Copying..."
3883 leency 99
	?define T_PASTE_WINDOW_TEXT "Copying file:"
5514 leency 100
	?define T_PASTE_WINDOW_BUTTON "Abort"
101
	?define INFO_AFTER_COPY "Copy finished"
4022 leency 102
	?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
4049 leency 103
	?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
5514 leency 104
	?define DEL_MORE_FILES_1 "selected items("
105
	?define DEL_MORE_FILES_2 " pcs.)?"
3848 punk_joker 106
#endif
107
 
3444 leency 108
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
109
 
5557 punk_joker 110
#define TITLE "Eolite File Manager v2.78"
111
#define ABOUT_TITLE "Eolite v2.78"
4076 leency 112
dword col_padding, col_selec, col_lpanel;
3363 leency 113
 
3434 leency 114
int toolbar_buttons_x[7]={9,46,85,134,167,203};
115
struct path_string { char Item[4096]; };
3363 leency 116
 
4136 punk_joker 117
byte active_about=0;
4070 punk_joker 118
word about_window;
5416 punk_joker 119
byte active_settings=0;
120
word settings_window;
4040 punk_joker 121
 
4136 punk_joker 122
byte menu_call_mouse=0;
123
 
3434 leency 124
llist files;
125
 
126
byte
3363 leency 127
	path[4096],
128
	file_path[4096],
3404 leency 129
	file_name[256],
5555 punk_joker 130
	new_element_name[256],
3434 leency 131
	temp[4096];
132
byte
3439 leency 133
	rename_active=0,
134
	del_active=0,
5555 punk_joker 135
	new_element_active=0,
4399 punk_joker 136
	show_dev_name=1,
4225 punk_joker 137
	real_files_names_case=0,
5532 leency 138
	use_big_fonts=0,
139
	font_type,
5459 punk_joker 140
	info_after_copy=0,
3434 leency 141
	sort_num=2,
3441 leency 142
	itdir;
3363 leency 143
 
5441 leency 144
dword eolite_ini_path;
145
 
3363 leency 146
proc_info Form;
4076 leency 147
system_colors sc;
3363 leency 148
mouse m;
5532 leency 149
int mouse_dd, scroll_used, sc_slider_h, sorting_arrow_x, kolibrios_drive;
4897 leency 150
dword buf;
3434 leency 151
dword file_mas[6898];
152
int j, i;
4028 leency 153
int action_buf;
4863 leency 154
int rand_n;
5513 punk_joker 155
int selected_count;
3363 leency 156
 
5549 punk_joker 157
mouse gestures;
158
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
159
byte stats;
160
 
5557 punk_joker 161
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xFFFFFF,0,248,#file_name,#mouse_dd,64,6,6};
162
edit_box new_file_ed = {150,213,80,0xFFFFFF,0x94AECE,0x000000,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
3434 leency 163
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
3363 leency 164
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
165
 
4042 leency 166
#include "include\copy.h"
5435 leency 167
#include "include\gui.h"
3363 leency 168
#include "include\sorting.h"
4042 leency 169
#include "include\icons.h"
3363 leency 170
#include "include\left_panel.h"
171
#include "include\history.h"
4042 leency 172
#include "include\menu.h"
173
#include "include\about.h"
5416 punk_joker 174
#include "include\settings.h"
5447 punk_joker 175
#include "include\properties.h"
3363 leency 176
 
177
void main()
178
{
3444 leency 179
	word key, id, can_show, can_select, m_selected;
4897 leency 180
	dword selected_offset;
4863