Subversion Repositories Kolibri OS

Rev

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

Rev 3434 Rev 3439
Line 22... Line 22...
22
//for OpenDir
22
//for OpenDir
23
#define ONLY_SHOW	0
23
#define ONLY_SHOW	0
24
#define WITH_REDRAW	1
24
#define WITH_REDRAW	1
25
#define ONLY_OPEN	2
25
#define ONLY_OPEN	2
Line 26... Line 26...
26
 
26
 
27
#define TITLE "Eolite File Manager v1.77"
27
#define TITLE "Eolite File Manager v1.8"
28
#define ABOUT_TITLE "Eolite v1.77"
28
#define ABOUT_TITLE "Eolite v1.80"
29
dword col_work    = 0xE4DFE1;
29
dword col_work    = 0xE4DFE1;
30
dword col_border  = 0x819FC5;
30
dword col_border  = 0x819FC5;
31
dword col_padding = 0xC8C9C9;
31
dword col_padding = 0xC8C9C9;
32
dword col_selec   = 0x94AECE;
32
dword col_selec   = 0x94AECE;
Line 43... Line 43...
43
	file_path[4096],
43
	file_path[4096],
44
	file_name[256],
44
	file_name[256],
45
	copy_file[4096],
45
	copy_file[4096],
46
	temp[4096];	 
46
	temp[4096];	 
47
byte
47
byte
48
	cut_active,
48
	cut_active=0,
49
	rename_active,
49
	rename_active=0,
50
	del_active;
50
	del_active=0,
51
byte
-
 
52
	show_dev_name=1,
51
	show_dev_name=1,
53
	sort_num=2,
52
	sort_num=2,
54
	isdir;
53
	isdir;
Line 55... Line 54...
55
 
54
 
Line 183... Line 182...
183
			}
182
			}
184
			break;  
183
			break;  
185
//Button pressed-----------------------------------------------------------------------------
184
//Button pressed-----------------------------------------------------------------------------
186
		case evButton:
185
		case evButton:
187
			id=GetButtonID();
186
			id=GetButtonID();
188
			IF (id==1) ExitProcess();
187
			if (id==1) ExitProcess();
189
 
-
 
-
 
188
			if (rename_active) break;
190
			IF (del_active)
189
			if (del_active)
191
			{
190
			{
192
				IF (id==301) || (id==302) Del_File(302-id);
191
				IF (id==301) || (id==302) Del_File(302-id);
193
				break;
192
				break;
194
			}
193
			}
-
 
194
			
195
			switch(id) 
195
			switch(id) 
196
			{
196
			{
197
				case 21: //Back
197
				case 21: //Back
198
						GoBack();
198
						GoBack();
199
						break;
199
						break;
Line 348... Line 348...
348
			GetProcessInfo(#Form, SelfInfo);
348
			GetProcessInfo(#Form, SelfInfo);
349
			if (Form.status_window>2) break;
349
			if (Form.status_window>2) break;
350
			files.SetSizes(192, 57, onLeft(192,27), onTop(57,6), disc_num*16+195,files.line_h);
350
			files.SetSizes(192, 57, onLeft(192,27), onTop(57,6), disc_num*16+195,files.line_h);
351
			if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h);
351
			if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h);
352
			if (Form.width<480) MoveSize(OLD,OLD,480,OLD);
352
			if (Form.width<480) MoveSize(OLD,OLD,480,OLD);
-
 
353
			GetProcessInfo(#Form, SelfInfo); //if win_size changed
353
			draw_window();
354
			draw_window();
354
	}
355
	}
355
}
356
}
Line 378... Line 379...
378
	DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll
379
	DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll
379
	DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
380
	DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
380
	DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
381
	DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
381
	Open_Dir(#path,ONLY_SHOW);
382
	Open_Dir(#path,ONLY_SHOW);
382
	if (del_active) Del_Form();
383
	if (del_active) Del_Form();
-
 
384
	if (rename_active) ActionsProcess(2);
383
}
385
}
Line 384... Line 386...
384
 
386
 
385
 
387
 
Line 465... Line 467...
465
	Scroll();
467
	Scroll();
466
}
468
}
Line 467... Line 469...
467
 
469
 
468
void Line_ReDraw(dword color, filenum){
470
void Line_ReDraw(dword color, filenum){
469
	dword text_col=0, name_len=0, y=filenum*files.line_h+57;
-
 
470
	IF (rename_active==1) ReName(false);
471
	dword text_col=0, name_len=0, y=filenum*files.line_h+57;
471
	DrawBar(192,y,3,files.line_h,color); 
472
	DrawBar(192,y,3,files.line_h,color); 
472
	DrawBar(192+19,y,onLeft(46,192),files.line_h,color); DrawBar(195,y+17,16,1,color);
473
	DrawBar(192+19,y,onLeft(46,192),files.line_h,color); DrawBar(195,y+17,16,1,color);
473
	if (files.line_h>18) DrawBar(195,y+18,16,files.line_h-18,color);
474
	if (files.line_h>18) DrawBar(195,y+18,16,files.line_h-18,color);
Line 753... Line 754...
753
			SwitchToAnotherThread();
754
			SwitchToAnotherThread();
754
			CreateThread(#about_dialog,#stak1);
755
			CreateThread(#about_dialog,#stak1);
755
			break;
756
			break;
756
		case 2:
757
		case 2:
757
			if (!files.count) break;
758
			if (!files.count) break;
758
			DeleteButton(files.current+201);
-
 
759
			edit2.flags=100000000000010b; //set active
759
			edit2.flags=100000000000010b; //set active
760
			edit2.width=onLeft(24,217);
760
			edit2.width=onLeft(24,217);
761
			edit2.top=files.current*files.line_h+59;
761
			edit2.top=files.current*files.line_h+59;
762
			edit2.size=edit2.pos=strlen(#file_name);
762
			edit2.size=edit2.pos=strlen(#file_name);
763
			edit_box_draw  stdcall (#edit2);
763
			edit_box_draw  stdcall (#edit2);