Subversion Repositories Kolibri OS

Rev

Rev 6570 | Rev 6602 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6278 leency 1
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2016
3363 leency 2
//GNU GPL licence.
3
 
4022 leency 4
#ifndef AUTOBUILD
5
#include "lang.h--"
6
#endif
7
 
3363 leency 8
//libraries
5974 leency 9
#define MEMSIZE 4096 * 180
4427 punk_joker 10
#include "..\lib\clipboard.h"
3363 leency 11
#include "..\lib\strings.h"
12
#include "..\lib\mem.h"
13
#include "..\lib\file_system.h"
5499 leency 14
#include "..\lib\gui.h"
3434 leency 15
#include "..\lib\list_box.h"
4863 leency 16
#include "..\lib\random.h"
5743 leency 17
#include "..\lib\font.h"
5960 leency 18
#include "..\lib\collection.h"
5499 leency 19
#include "..\lib\obj\libini.h"
20
#include "..\lib\obj\box_lib.h"
5977 leency 21
#include "..\lib\patterns\history.h"
5834 pavelyakov 22
 
3363 leency 23
//images
24
#include "imgs\left_p.txt"
4846 leency 25
#include "imgs\icons.txt"
3363 leency 26
 
6278 leency 27
//Button IDs
28
enum {
29
	POPUP_BTN1 = 201,
6289 leency 30
	POPUP_BTN2 = 202,
31
	BREADCRUMB_ID = 300
6278 leency 32
};
3444 leency 33
 
6278 leency 34
//NewElement options
35
enum {
36
	CREATE_FILE=1,
37
	CREATE_FOLDER,
38
	RENAME_ITEM
39
};
40
 
41
//OpenDir options
42
enum {
43
	ONLY_SHOW,
44
	WITH_REDRAW,
45
	ONLY_OPEN
46
};
47
 
6191 leency 48
dword col_padding, col_selec, col_lpanel, col_work, col_graph;
3363 leency 49
 
3434 leency 50
int toolbar_buttons_x[7]={9,46,85,134,167,203};
3363 leency 51
 
4136 punk_joker 52
byte active_about=0;
4070 punk_joker 53
word about_window;
5416 punk_joker 54
word settings_window;
5753 leency 55
byte active_settings=0;
5606 pavelyakov 56
dword _not_draw = false;
4136 punk_joker 57
byte menu_call_mouse=0;
6403 punk_joker 58
byte exif_load=0;
4136 punk_joker 59
 
5733 leency 60
byte del_active=0;
61
byte new_element_active=0;
5698 leency 62
 
5733 leency 63
llist files, files_active, files_inactive;
3434 leency 64
 
5694 leency 65
byte list_full_redraw;
66
 
5698 leency 67
dword buf;
68
dword file_mas[6898];
69
int selected_count;
6406 punk_joker 70
int count_dir;
5698 leency 71
 
3434 leency 72
byte
3363 leency 73
	path[4096],
5833 pavelyakov 74
	DefaultPath[4096],
3363 leency 75
	file_path[4096],
3404 leency 76
	file_name[256],
5555 punk_joker 77
	new_element_name[256],
5698 leency 78
	temp[4096],
3441 leency 79
	itdir;
3363 leency 80
 
5719 leency 81
char active_path[4096], inactive_path[4096];
5698 leency 82
 
5441 leency 83
dword eolite_ini_path;
84
 
5698 leency 85
char scroll_used=false;
5695 leency 86
 
5804 punk_joker 87
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak,delete_stak;
5608 leency 88
 
3363 leency 89
proc_info Form;
5960 leency 90
int mouse_dd, sc_slider_h;
3434 leency 91
int j, i;
4028 leency 92
int action_buf;
4863 leency 93
int rand_n;
5591 pavelyakov 94
byte CMD_REFRESH;
3363 leency 95
 
5748 leency 96
//struct t_settings {
6291 leency 97
char sort_num=2;
98
bool show_dev_name=true,
6505 punk_joker 99
	real_files_names_case=true,
5748 leency 100
	info_after_copy=false,
101
	two_panels=false,
6289 leency 102
	show_breadcrumb=false,
6505 punk_joker 103
	show_status_bar=true,
5748 leency 104
	active_panel=1;
105
//} settings;
5549 punk_joker 106
 
6564 leency 107
#define STATUS_BAR_H 16;
108
int status_bar_h = 0;
109
 
5581 leency 110
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
3363 leency 111
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
5694 leency 112
byte cmd_free=0;
5698 leency 113
#include "include\translations.h"
5804 punk_joker 114
#include "include\fs.h"
5834 pavelyakov 115
 
116
char *fd_path_eolite_ini_path;
117
 
5748 leency 118
#include "include\settings.h"
5804 punk_joker 119
#include "include\progress_dialog.h"
120
#include "..\lib\copyf.h"
4042 leency 121
#include "include\copy.h"
5435 leency 122
#include "include\gui.h"
3363 leency 123
#include "include\sorting.h"
4042 leency 124
#include "include\icons.h"
3363 leency 125
#include "include\left_panel.h"
4042 leency 126
#include "include\menu.h"
6278 leency 127
#include "include\delete.h"
4042 leency 128
#include "include\about.h"
5447 punk_joker 129
#include "include\properties.h"
6289 leency 130
#include "include\breadcrumbs.h"
3363 leency 131
 
132
void main()
133
{
6289 leency 134
	dword id;
5834 pavelyakov 135
	byte count_sl = 0;
5748 leency 136
	signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
5695 leency 137
	char can_show, can_select, stats;
4897 leency 138
	dword selected_offset;
5591 pavelyakov 139
	dword IPC_LEN,IPC_ID;
140
	char IPC_BUF[10];
4863 leency 141
	rand_n = random(40);
5651 pavelyakov 142
 
5626 leency 143
	load_dll(boxlib, #box_lib_init,0);
5991 leency 144
	load_dll(libini, #lib_init,1);
5974 leency 145
 
5743 leency 146
	eolite_ini_path = abspath("Eolite.ini");
5834 pavelyakov 147
	fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
148
 
5441 leency 149
	LoadIniSettings();
6034 leency 150
	SystemDiscs.Get();
4076 leency 151
	SetAppColors();
3363 leency 152
	if (param)
153
	{
5743 leency 154
		strcpy(#path, #param);
155
		if (path[strlen(#path)-1]!='/') chrcat(#path, '/'); //add "/" to the end of the string
5833 pavelyakov 156
	}
157
 
5733 leency 158
	Open_Dir(#path,ONLY_OPEN);
5719 leency 159
	strcpy(#inactive_path, #path);
5733 leency 160
	llist_copy(#files_inactive, #files);
5606 pavelyakov 161
	SetEventMask(1100111b);
5591 pavelyakov 162
	loop(){
163
		switch(WaitEvent())
164
		{
165
			case evMouse:
166
				if (del_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) break;
167
				if (new_element_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2)
168
				{
169
					edit_box_mouse stdcall(#new_file_ed);
170
					break;
171
				}
5549 punk_joker 172
 
5640 pavelyakov 173
				mouse.get();
5591 pavelyakov 174
 
5640 pavelyakov 175
				if (!mouse.mkm) && (stats>0) stats = 0;
5657 pavelyakov 176
				if (mouse.mkm) && (!stats)
5549 punk_joker 177