Subversion Repositories Kolibri OS

Rev

Rev 6885 | Rev 6949 | 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"
6805 leency 17
#include "..\lib\kfont.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],
74
	file_path[4096],
3404 leency 75
	file_name[256],
5555 punk_joker 76
	new_element_name[256],
5698 leency 77
	temp[4096],
3441 leency 78
	itdir;
3363 leency 79
 
5719 leency 80
char active_path[4096], inactive_path[4096];
5698 leency 81
 
5441 leency 82
dword eolite_ini_path;
83
 
5698 leency 84
char scroll_used=false;
5695 leency 85
 
5804 punk_joker 86
dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak,delete_stak;
5608 leency 87
 
3363 leency 88
proc_info Form;
5960 leency 89
int mouse_dd, sc_slider_h;
3434 leency 90
int j, i;
4028 leency 91
int action_buf;
4863 leency 92
int rand_n;
3363 leency 93
 
5748 leency 94
//struct t_settings {
6291 leency 95
char sort_num=2;
96
bool show_dev_name=true,
6505 punk_joker 97
	real_files_names_case=true,
5748 leency 98
	info_after_copy=false,
99
	two_panels=false,
6289 leency 100
	show_breadcrumb=false,
6505 punk_joker 101
	show_status_bar=true,
5748 leency 102
	active_panel=1;
103
//} settings;
5549 punk_joker 104
 
6564 leency 105
#define STATUS_BAR_H 16;
106
int status_bar_h = 0;
107
 
6678 leency 108
edit_box new_file_ed = {200,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0x10000000,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
3363 leency 109
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
5694 leency 110
byte cmd_free=0;
5698 leency 111
#include "include\translations.h"
5804 punk_joker 112
#include "include\fs.h"
5834 pavelyakov 113
 
114
char *fd_path_eolite_ini_path;
115
 
5748 leency 116
#include "include\settings.h"
5804 punk_joker 117
#include "include\progress_dialog.h"
118
#include "..\lib\copyf.h"
4042 leency 119
#include "include\copy.h"
5435 leency 120
#include "include\gui.h"
3363 leency 121
#include "include\sorting.h"
4042 leency 122
#include "include\icons.h"
3363 leency 123
#include "include\left_panel.h"
4042 leency 124
#include "include\menu.h"
6278 leency 125
#include "include\delete.h"
4042 leency 126
#include "include\about.h"
5447 punk_joker 127
#include "include\properties.h"
6289 leency 128
#include "include\breadcrumbs.h"
3363 leency 129
 
130
void main()
131
{
6289 leency 132
	dword id;
5834 pavelyakov 133
	byte count_sl = 0;
5748 leency 134
	signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
6735 leency 135
	char stats;
4863 leency 136
	rand_n = random(40);
5651 pavelyakov 137
 
5626 leency 138
	load_dll(boxlib, #box_lib_init,0);
5991 leency 139
	load_dll(libini, #lib_init,1);
5974 leency 140
 
5743 leency 141
	eolite_ini_path = abspath("Eolite.ini");
5834 pavelyakov 142
	fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
143
 
5441 leency 144
	LoadIniSettings();
6034 leency 145
	SystemDiscs.Get();
4076 leency 146
	SetAppColors();
3363 leency 147
	if (param)
148
	{
6930 leency 149
		if (param[strlen(#param)-1]=='/') param[strlen(#param)-1]=NULL; //no "/" in the end
150
 
151
		if (dir_exists(#param)==true)
152
		{
153
			strcpy(#path, #param);
154
		}
155
		else
156
		{
157
			notify(T_NOTIFY_APP_PARAM_WRONG);
158
		}
5833 pavelyakov 159
	}
160
 
5733 leency 161
	Open_Dir(#path,ONLY_OPEN);
5719 leency 162
	strcpy(#inactive_path, #path);
5733 leency 163
	llist_copy(#files_inactive, #files);
5606 pavelyakov 164
	SetEventMask(1100111b);
5591 pavelyakov 165
	loop(){
166
		switch(WaitEvent())
167
		{
168
			case evMouse:
169
				if (del_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) break;
170
				if (new_element_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2)
171
				{
172
					edit_box_mouse stdcall(#new_file_ed);
173
					break;
174
				}
5549 punk_joker 175
 
5640 pavelyakov 176
				mouse.get();
5591 pavelyakov 177
 
5640 pavelyakov 178
				if (!mouse.mkm) && (stats>0) stats = 0;
5657 pavelyakov 179
				if (mouse.mkm) && (!stats)
5549 punk_joker 180
				{
5640 pavelyakov 181<