Subversion Repositories Kolibri OS

Rev

Rev 4040 | Rev 4049 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4040 Rev 4042
Line 74... Line 74...
74
	?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
74
	?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
75
#endif
75
#endif
Line 76... Line 76...
76
 
76
 
Line 77... Line 77...
77
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
77
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
78
 
78
 
79
#define TITLE "Eolite File Manager v1.98.7"
79
#define TITLE "Eolite File Manager v1.98.8"
80
#define ABOUT_TITLE "Eolite v1.98.7"
80
#define ABOUT_TITLE "Eolite v1.98.8"
81
dword col_work    = 0xE4DFE1;
81
dword col_work    = 0xE4DFE1;
82
dword col_border  = 0x9098B0; //A0A0B8; //0x819FC5;
82
dword col_border  = 0x9098B0; //A0A0B8; //0x819FC5;
83
dword col_padding = 0xC8C9C9;
83
dword col_padding = 0xC8C9C9;
Line 114... Line 114...
114
 
114
 
115
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6};
115
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6};
116
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
116
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
Line 117... Line 117...
117
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
117
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
118
 
118
 
119
#include "include\copypaste.h"
119
#include "include\copy.h"
120
#include "include\some_code.h"
120
#include "include\other.h"
121
#include "include\sorting.h"
121
#include "include\sorting.h"
122
#include "include\icons_f.h"
122
#include "include\icons.h"
123
#include "include\ini.h"
123
#include "include\ini.h"
124
#include "include\left_panel.h"
124
#include "include\left_panel.h"
125
#include "include\history.h"
125
#include "include\history.h"
-
 
126
#include "include\menu.h"
Line 126... Line 127...
126
#include "include\file_menu.h"
127
#include "include\about.h"
127
#include "include\about_dialog.h"
128
#include "include\open_with.h"
128
 
129
 
Line 156... Line 157...
156
			
157
			
Line 157... Line 158...
157
			m.get();
158
			m.get();
158
 
159
 
159
			if (m.x > files.x) && (m.x < files.x + files.w) && (m.y > files.y) && (m.y < files.y+files.h) && (!can_select)
160
			if (m.x > files.x) && (m.x < files.x + files.w) && (m.y > files.y) && (m.y < files.y+files.h) && (!can_select)
160
			{
161
			{
161
				m_selected = m.y - 57 / files.line_h;
162
				m_selected = m.y - files.y / files.line_h;
162
				if (m.lkm) can_select = 1;
163
				if (m.lkm) can_select = 1;
163
				if (m.pkm)
164
				if (m.pkm)
164
				{
165
				{
165
					can_show = 1;
166
					can_show = 1;
166
					if (m.y - 57 / files.line_h != files.current) can_select = 1;
167
					if (m.y - files.y / files.line_h != files.current) can_select = 1;
Line 167... Line 168...
167
				}
168
				}
168
			}
169
			}
169
 
170
 
170
			//select/open file {
171
			//select/open file {
171
			if (!m.lkm) && (!m.pkm) && (can_select)
172
			if (!m.lkm) && (!m.pkm) && (can_select)
172
			{
173
			{
173
				can_select = 0;
174
				can_select = 0;
174
				if (m.y>=57)
175
				if (m.y>=files.y)
175
				{
176
				{
176
					id = m.y - 57 / files.line_h;
177
					id = m.y - files.y / files.line_h;
177
					if (id!=m_selected)
178
					if (id!=m_selected)
178
					{
179
					{
Line 191... Line 192...
191
 
192
 
192
			//file menu {
193
			//file menu {
193
			if (!m.pkm) && (!m.lkm) && (can_show)
194
			if (!m.pkm) && (!m.lkm) && (can_show)
194
			{
195
			{
195
				can_show = 0;
196
				can_show = 0;
196
				if (m.y>=57)
197
				if (m.y>=files.y)
197
				{
198
				{
198
					SwitchToAnotherThread();
199
					SwitchToAnotherThread();
199
					CreateThread(#FileMenu,#menu_stak);
200
					CreateThread(#FileMenu,#menu_stak);
200
				}
201
				}
Line 207... Line 208...
207
				files.MouseScroll(m.vert);
208
				files.MouseScroll(m.vert);
208
				List_ReDraw();
209
				List_ReDraw();
209
				break;
210
				break;
210
			}
211
			}
Line 211... Line 212...
211
 
212
 
212
			if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y<57)
213
			if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y
213
			{
214
			{
214
				IF (m.lkm==1) DrawRectangle3D(onLeft(26,0),41,14,14,0xC7C7C7,0xFFFFFF);
215
				IF (m.lkm==1) DrawRectangle3D(onLeft(26,0),41,14,14,0xC7C7C7,0xFFFFFF);
215
				WHILE (m.lkm==1) && (files.first>0)
216
				WHILE (m.lkm==1) && (files.first>0)
216
				{
217
				{
Line 239... Line 240...
239
			if (!m.lkm) && (scroll_used) { scroll_used=NULL; Scroll(); }
240
			if (!m.lkm) && (scroll_used) { scroll_used=NULL; Scroll(); }
240
			if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>56) && (m.y
241
			if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>56) && (m.y
Line 241... Line 242...
241
			
242
			
242
			if (scroll_used)
243
			if (scroll_used)
243
			{
244
			{
244
				IF (scroll_size/2+57>m.y) || (m.y<0) || (m.y>4000) m.y=scroll_size/2+57; //anee eo?ni? iaa ieiii
245
				IF (scroll_size/2+files.y>m.y) || (m.y<0) || (m.y>4000) m.y=scroll_size/2+files.y; //anee eo?ni? iaa ieiii
245
				id=files.first;
246
				id=files.first;
246
				j= scroll_size/2;
247
				j= scroll_size/2;
247
				files.first = m.y -j -57 * files.count;
248
				files.first = m.y -j -files.y * files.count;
248
				files.first /= onTop(22,57);
249
				files.first /= onTop(22,files.y);
249
				IF (files.visible+files.first>files.count) files.first=files.count-files.visible;
250
				IF (files.visible+files.first>files.count) files.first=files.count-files.visible;
250
				IF (id!=files.first) List_ReDraw();
251
				IF (id!=files.first) List_ReDraw();
251
			}
252
			}
252
			break;  
253
			break;  
Line 404... Line 405...
404
								}
405
								}
405
							}
406
							}
406
			}                         
407
			}                         
407
			break;
408
			break;
408
		case evReDraw:
409
		case evReDraw:
409
			if (action_buf) { menu_action(action_buf); action_buf=0;}
-
 
410
			draw_window();
410
			draw_window();
-
 
411
			if (action_buf) { menu_action(action_buf); action_buf=0;}
411
	}
412
	}
412
}
413
}
Line 413... Line 414...
413
 
414
 
414
void menu_action(dword id)
415
void menu_action(dword id)
Line 417... Line 418...
417
	{
418
	{
418
		FnProcess(5);
419
		FnProcess(5);
419
		SelectFile(#copy_to+strrchr(#copy_to,'/'));
420
		SelectFile(#copy_to+strrchr(#copy_to,'/'));
420
	}
421
	}
421
	if (id==100) Open();
422
	if (id==100) Open();
-
 
423
	if (id==201) 
-
 
424
	{
-
 
425
		pause(10);
-
 
426
		SwitchToAnotherThread();
422
	if (id==201) notify("Not compleated yet");
427
		CreateThread(#OpenWith,#open_with_stak);
-
 
428
	}
423
	if (id==202) FnProcess(3); //F3
429
	if (id==202) FnProcess(3); //F3
424
	if (id==203) FnProcess(4); //F4
430
	if (id==203) FnProcess(4); //F4
425
	if (id==104) Copy(#file_path, NOCUT);
431
	if (id==104) Copy(#file_path, NOCUT);
426
	if (id==105) Copy(#file_path, CUT);
432
	if (id==105) Copy(#file_path, CUT);
427
	if (id==106) CreateThread(#Paste,#copy_stak);
433
	if (id==106) CreateThread(#Paste,#copy_stak);
Line 457... Line 463...
457
	DrawLeftPanel();
463
	DrawLeftPanel();
458
	//ListBox
464
	//ListBox
459
	DrawFlatButton(files.x,40,onLeft(files.x,168),16,31,col_work,T_FILE);
465
	DrawFlatButton(files.x,40,onLeft(files.x,168),16,31,col_work,T_FILE);
460
	DrawFlatButton(onLeft(168,0),40,73,16,32,col_work,T_TYPE);
466
	DrawFlatButton(onLeft(168,0),40,73,16,32,col_work,T_TYPE);
461
	DrawFlatButton(onLeft(95,0),40,68,16,33,col_work,T_SIZE);
467
	DrawFlatButton(onLeft(95,0),40,68,16,33,col_work,T_SIZE);
462
	DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll
468
	DrawBar(onLeft(27,0),files.y,1,onTop(22,files.y),col_border); //line to the left from the scroll
463
	DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
469
	DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
464
	DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
470
	DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
465
	Open_Dir(#path,ONLY_SHOW);
471
	Open_Dir(#path,ONLY_SHOW);
466
	if (del_active) Del_Form();
472
	if (del_active) Del_Form();
467
	//if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
473
	//if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
Line 550... Line 556...
550
 
556
 
551
void Line_ReDraw(dword color, filenum){
557
void Line_ReDraw(dword color, filenum){
552
	dword text_col=0,
558
	dword text_col=0,
553
	      name_len=0,
559
	      name_len=0,
554
	      attr,
560
	      attr,
555
	      y=filenum*files.line_h+57;
561
	      y=filenum*files.line_h+files.y;
556
	DrawBar(files.x,y,3,files.line_h,color); 
562
	DrawBar(files.x,y,3,files.line_h,color); 
557
	DrawBar(files.x+19,y,files.w-19,files.line_h,color);
563
	DrawBar(files.x+19,y,files.w-19,files.line_h,color);
558
	DrawBar(files.x+3,y+17,16,1,color);
564
	DrawBar(files.x+3,y+17,16,1,color);
559
	if (files.line_h>18) DrawBar(files.x+3,y+18,16,files.line_h-18,color);
565
	if (files.line_h>18) DrawBar(files.x+3,y+18,16,files.line_h-18,color);
Line 902... Line 908...
902
 
908
 
Line 903... Line 909...
903
stop:
909
stop:
904
 
910
 
-
 
911
char about_stak[512];
905
char about_stak[512];
912
char menu_stak[512];