Subversion Repositories Kolibri OS

Rev

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

Rev 3991 Rev 3997
Line 29... Line 29...
29
	?define T_NEW_FILE "®¢ë© ä ©«"
29
	?define T_NEW_FILE "®¢ë© ä ©«"
30
	?define T_DELETE_FILE "‚ë ¤¥©á⢨⥫쭮 å®â¨â¥ 㤠«¨âì"
30
	?define T_DELETE_FILE "‚ë ¤¥©á⢨⥫쭮 å®â¨â¥ 㤠«¨âì"
31
	?define T_YES "„ "
31
	?define T_YES "„ "
32
	?define T_NO "¥â"
32
	?define T_NO "¥â"
33
	?define T_DEL_ERROR_1 "Žè¨¡ª .  ¯ª  ­¥ ¯ãáâ ï."
33
	?define T_DEL_ERROR_1 "Žè¨¡ª .  ¯ª  ­¥ ¯ãáâ ï."
34
	?define T_DEL_ERROR_2 "Žè¨¡ª . ” ©«®¢ ï á¨á⥬  ⮫쪮 ¤«ï ç⥭¨ï."
34
	?define WAIT_DELETING_FOLDER "“¤ «ï¥âáï ¯ ¯ª . ®¤®¦¨â¥..."
35
	?define NOT_CREATE_FOLDER "¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã."
35
	?define NOT_CREATE_FOLDER "¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã."
36
	?define NOT_CREATE_FILE "¥ 㤠«®áì ᮧ¤ âì ä ©«."
36
	?define NOT_CREATE_FILE "¥ 㤠«®áì ᮧ¤ âì ä ©«."
37
	?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
37
	?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
38
	?define T_PASTE_WINDOW "Š®¯¨àãî..."
38
	?define T_PASTE_WINDOW "Š®¯¨àãî..."
39
	?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
39
	?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
Line 45... Line 45...
45
	?define T_NEW_FILE "Uus fail"
45
	?define T_NEW_FILE "Uus fail"
46
	?define T_DELETE_FILE "Kas sa tahad tõesti kustutada"
46
	?define T_DELETE_FILE "Kas sa tahad tõesti kustutada"
47
	?define T_YES "Jah"
47
	?define T_YES "Jah"
48
	?define T_NO "Ei"
48
	?define T_NO "Ei"
49
	?define T_DEL_ERROR_1 "Viga. Kataloog ei ole tühi."
49
	?define T_DEL_ERROR_1 "Viga. Kataloog ei ole tühi."
50
	?define T_DEL_ERROR_2 "Viga. Failisüsteem ainult loetav."
50
	?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
51
	?define NOT_CREATE_FOLDER "Kataloogi ei saa luua."
51
	?define NOT_CREATE_FOLDER "Kataloogi ei saa luua."
52
	?define NOT_CREATE_FILE "Faili ei saa luua."
52
	?define NOT_CREATE_FILE "Faili ei saa luua."
53
	?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
53
	?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
54
	?define T_PASTE_WINDOW "Kopeerin..."
54
	?define T_PASTE_WINDOW "Kopeerin..."
55
	?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
55
	?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
Line 61... Line 61...
61
	?define T_NEW_FILE "New file"
61
	?define T_NEW_FILE "New file"
62
	?define T_DELETE_FILE "Do you really want to delete"
62
	?define T_DELETE_FILE "Do you really want to delete"
63
	?define T_YES "Yes"
63
	?define T_YES "Yes"
64
	?define T_NO "No"
64
	?define T_NO "No"
65
	?define T_DEL_ERROR_1 "Error. Folder isn't empty."
65
	?define T_DEL_ERROR_1 "Error. Folder isn't empty."
66
	?define T_DEL_ERROR_2 "Error. Filesystem read-only."
66
	?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
67
	?define NOT_CREATE_FOLDER "Folder can not be created."
67
	?define NOT_CREATE_FOLDER "Folder can not be created."
68
	?define NOT_CREATE_FILE "File can not be created."
68
	?define NOT_CREATE_FILE "File can not be created."
69
	?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
69
	?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
70
	?define T_PASTE_WINDOW "Copying..."
70
	?define T_PASTE_WINDOW "Copying..."
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.2"
76
#define TITLE "Eolite File Manager v1.97.7"
77
#define ABOUT_TITLE "Eolite v1.97.2"
77
#define ABOUT_TITLE "Eolite v1.97.7"
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 638... Line 638...
638
}
638
}
Line 639... Line 639...
639
 
639
 
640
 
640
 
641
void Del_Form()
641
void Del_Form()
642
{
642
{
643
	int dform_x = files.w - 200 / 2 + files.x-3;
643
	int dform_x = Form.width/2-13;
644
	if (!files.count) return;
644
	if (!files.count) return;
645
	DrawPopup(dform_x,160,213,80,1,col_work,col_border);
645
	DrawPopup(dform_x,160,220,80,1,col_work,col_border);
646
	WriteText(-strlen(T_DELETE_FILE)*3+107+dform_x,175,0x80,0,T_DELETE_FILE);
646
	WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,0,T_DELETE_FILE);
647
	IF (strlen(#file_name)<28) 
647
	IF (strlen(#file_name)<28) 
648
	{
648
	{
649
		WriteText(strlen(#file_name)*3+107+dform_x+2,190,0x80,0,"?");
649
		WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,0,"?");
650
		WriteText(-strlen(#file_name)*3+107+dform_x,190,0x80,0,#file_name);
650
		WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,0,#file_name);
651
	}
651
	}
652
	else
652
	else
653
	{
653
	{
654
		WriteText(164+dform_x,190,0x80,0,"...?");
654
		WriteText(164+dform_x,190,0x80,0,"...?");
655
		ESI = 24;
655
		ESI = 24;
656
		WriteText(dform_x+20,190,0,0,#file_name);
656
		WriteText(dform_x+20,190,0,0,#file_name);
657
	}
657
	}
658
	DrawFlatButton(dform_x+26,208,70,20,301,0xFFB6B5,T_YES);
658
	DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
659
	DrawFlatButton(dform_x+119,208,70,20,302,0xC6DFC6,T_NO);
659
	DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);
Line 660... Line 660...
660
	del_active=1;
660
	del_active=1;
661
}
661
}
662
 
-
 
663
	
662
 
664
void Del_File2(dword way)
663
	
665
{    
664
void Del_File2(dword way)
666
	int del_rezult;
-
 
667
	dword dirbuf, fcount, i, filename;
665
{    
668
	char del_from[4096], error;
666
	dword dirbuf, fcount, i, filename;
669
	del_rezult = DeleteFile(way);
667
	char del_from[4096], error;
670
		if (del_rezult)
668
	if (DeleteFile(way))
-
 
669
	{
-
 
670
		error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
-
 
671
		for (i=0; i
-
 
672
		{
671
		{
673
			//need redraw window during this process
672
			error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
674
			//like this:
673
			for (i=0; i
675
			//if CheckEvent()==Redraw DrawWindow();
674
			{
676
			//i'm too tired to code now...
675
				filename = i*304+dirbuf+72;
677
			filename = i*304+dirbuf+72;
Line 686... Line 688...
686
}
688
}
Line 687... Line 689...
687
 
689
 
688
 
690
 
689
void Del_File(byte dodel)
-
 
690
{    
691
void Del_File(byte dodel)
691
	int del_rezult;
692
{    
-
 
693
	if (dodel==true)
-
 
694
	{
692
	if (dodel==true)
695
		List_ReDraw();
693
	{
696
		if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
694
		Del_File2(#file_path);
697
		Del_File2(#file_path);
-
 
698
 	}
695
 	}
699
	del_active=0;
696
	del_active=0;
700
	DeleteButton(301);
697
	DeleteButton(301); DeleteButton(302);
701
	DeleteButton(302);
Line 698... Line 702...
698
	Open_Dir(#path,WITH_REDRAW);
702
	Open_Dir(#path,WITH_REDRAW);
Line 715... Line 719...
715
		{
719
		{
716
			del_rezult = DeleteFile(#file_path);
720
			del_rezult = DeleteFile(#file_path);
717
			if (del_rezult!=0)
721
			if (del_rezult!=0)
718
			{
722
			{
719
				Write_Error(del_rezult);
723
				Write_Error(del_rezult);
720
				ShowMessage(T_DEL_ERROR_1);
724
				ShowMessage(T_DEL_ERROR_1, 150);
721
				return;
725
				return;
722
			}
726
			}
723
			ELSE CreateDir(#temp);
727
			ELSE CreateDir(#temp);
724
			Open_Dir(#path,WITH_REDRAW);
728
			Open_Dir(#path,WITH_REDRAW);
725
		}
729
		}
Line 826... Line 830...
826
				FnProcess(2);
830
				FnProcess(2);
827
			}
831
			}
828
			else
832
			else
829
			{
833
			{
830
				Write_Error(EAX);
834
				Write_Error(EAX);
831
				ShowMessage(NOT_CREATE_FOLDER);
835
				ShowMessage(NOT_CREATE_FOLDER, 150);
832
			}
836
			}
833
			break;
837
			break;
834
		case 7:
838
		case 7:
835
			strcpy(#temp, #path);
839
			strcpy(#temp, #path);
836
			strcat(#temp, T_NEW_FILE);
840
			strcat(#temp, T_NEW_FILE);
Line 840... Line 844...
840
				FnProcess(2);
844
				FnProcess(2);
841
			}
845
			}
842
			else
846
			else
843
			{
847
			{
844
				Write_Error(EAX);
848
				Write_Error(EAX);
845
				ShowMessage(NOT_CREATE_FILE);
849
				ShowMessage(NOT_CREATE_FILE, 150);
846
			}
850
			}
847
			break;
851
			break;
848
		case 10: //F10
852
		case 10: //F10
849
			RunProgram(EDITOR_PATH, abspath("Eolite.ini"));
853
			RunProgram(EDITOR_PATH, abspath("Eolite.ini"));
850
			break;
854
			break;