Subversion Repositories Kolibri OS

Rev

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

Rev 3997 Rev 4002
Line 71... Line 71...
71
	?define T_PASTE_WINDOW_TEXT "Copying file:"
71
	?define T_PASTE_WINDOW_TEXT "Copying file:"
72
#endif
72
#endif
Line 73... Line 73...
73
 
73
 
Line 74... Line 74...
74
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
74
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
75
 
75
 
76
#define TITLE "Eolite File Manager v1.97.7"
76
#define TITLE "Eolite File Manager v1.98"
77
#define ABOUT_TITLE "Eolite v1.97.7"
77
#define ABOUT_TITLE "Eolite v1.98"
78
dword col_work    = 0xE4DFE1;
78
dword col_work    = 0xE4DFE1;
79
dword col_border  = 0x9098B0; //A0A0B8; //0x819FC5;
79
dword col_border  = 0x9098B0; //A0A0B8; //0x819FC5;
80
dword col_padding = 0xC8C9C9;
80
dword col_padding = 0xC8C9C9;
Line 436... Line 436...
436
	DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll
436
	DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll
437
	DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
437
	DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
438
	DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
438
	DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
439
	Open_Dir(#path,ONLY_SHOW);
439
	Open_Dir(#path,ONLY_SHOW);
440
	if (del_active) Del_Form();
440
	if (del_active) Del_Form();
-
 
441
	//if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
441
	if (rename_active) FnProcess(2);
442
	if (rename_active) FnProcess(2);
442
}
443
}
Line 443... Line 444...
443
 
444
 
Line 638... Line 639...
638
}
639
}
Line 639... Line 640...
639
 
640
 
640
 
641
 
641
void Del_Form()
642
void Del_Form()
-
 
643
{
-
 
644
	int dform_x=files.w-220/2+files.x;
-
 
645
	if (del_active==2)
-
 
646
	{
-
 
647
		if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
-
 
648
	}
642
{
649
	else
643
	int dform_x = Form.width/2-13;
650
	{
644
	if (!files.count) return;
651
		if (!files.count) return;
645
	DrawPopup(dform_x,160,220,80,1,col_work,col_border);
652
		DrawPopup(dform_x,160,220,80,1,col_work,col_border);
646
	WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,0,T_DELETE_FILE);
653
		WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,0,T_DELETE_FILE);
Line 657... Line 664...
657
	}
664
		}
658
	DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
665
		DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
659
	DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);
666
		DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);		
660
	del_active=1;
667
		del_active=1;
661
}
668
	}
-
 
669
}
Line 662... Line 670...
662
 
670
 
663
	
671
	
664
void Del_File2(dword way)
672
void Del_File2(dword way)
Line 668... Line 676...
668
	if (DeleteFile(way))
676
	if (DeleteFile(way))
669
	{
677
	{
670
		error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
678
		error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
671
		for (i=0; i
679
		for (i=0; i
672
		{
680
		{
673
			//need redraw window during this process
-
 
674
			//like this:
-
 
675
			//if CheckEvent()==Redraw DrawWindow();
681
			if (CheckEvent()==evReDraw) draw_window();
676
			//i'm too tired to code now...
-
 
677
			filename = i*304+dirbuf+72;
682
			filename = i*304+dirbuf+72;
678
			strcpy(#del_from, way);
683
			strcpy(#del_from, way);
679
			chrcat(#del_from, '/');
684
			chrcat(#del_from, '/');
680
			strcat(#del_from, filename);
685
			strcat(#del_from, filename);
681
			if ( TestBit(ESDWORD[filename-40], 4) )
686
			if ( TestBit(ESDWORD[filename-40], 4) )
Line 690... Line 695...
690
 
695
 
691
void Del_File(byte dodel)
696
void Del_File(byte dodel)
692
{    
697
{    
693
	if (dodel==true)
698
	if (dodel==true)
-
 
699
	{
694
	{
700
		del_active=2;
695
		List_ReDraw();
701
		List_ReDraw();
696
		if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
702
		if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
697
		Del_File2(#file_path);
703
		Del_File2(#file_path);
698
 	}
704
 	}