Subversion Repositories Kolibri OS

Rev

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

Rev 8861 Rev 8868
Line 1... Line 1...
1
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2021
1
//Leency, Veliant, Punk_Joker, PavelYakov & KolibriOS Team 2008-2021
2
//GNU GPL license.
2
//GNU GPL license.
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
// 70.5 - get volume info and label
4
// 70.5 - get volume info and label
5
 
5
 
6
#define ABOUT_TITLE "EOLITE 5 Beta2"
6
#define ABOUT_TITLE "EOLITE 5 Beta3"
Line 7... Line 7...
7
#define TITLE_EOLITE "Eolite File Manager 5 Beta2"
7
#define TITLE_EOLITE "Eolite File Manager 5 Beta3"
8
#define TITLE_KFM "Kolibri File Manager 2 Beta2";
8
#define TITLE_KFM "Kolibri File Manager 2 Beta3";
9
 
9
 
Line 90... Line 90...
90
int toolbar_buttons_x[7]={9,46,85,134,167,203};
90
int toolbar_buttons_x[7]={9,46,85,134,167,203};
Line 91... Line 91...
91
 
91
 
92
bool active_about = false;
92
bool active_about = false;
93
bool active_settings = false;
93
bool active_settings = false;
94
bool _not_draw = false;
-
 
95
bool exif_load = false;
94
bool _not_draw = false;
Line 96... Line 95...
96
bool dir_at_fat16 = NULL;
95
bool dir_at_fat16 = NULL;
Line 97... Line 96...
97
 
96
 
Line 144... Line 143...
144
libimg_image icons32_selected;
143
libimg_image icons32_selected;
Line 145... Line 144...
145
 
144
 
146
#define STATUS_BAR_H 16;
145
#define STATUS_BAR_H 16;
Line 147... Line 146...
147
int status_bar_h = 0;
146
int status_bar_h = 0;
Line 148... Line 147...
148
 
147
 
149
int icon_size = 16;
148
int icon_size = 18;
150
 
149
 
151
edit_box new_file_ed = {200,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0x10000000,
150
edit_box new_file_ed = {200,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0x10000000,
Line 360... Line 359...
360
 
359
 
361
			if (new_element_active) || (del_active) || (dev_popin_active_on_panel) {
360
			if (new_element_active) || (del_active) || (dev_popin_active_on_panel) {
362
				if (POPUP_BTN1==id) && (del_active) EventDelete();
361
				if (POPUP_BTN1==id) && (del_active) EventDelete();
363
				if (POPUP_BTN1==id) && (new_element_active) NewElement();
362
				if (POPUP_BTN1==id) && (new_element_active) NewElement();
364
				if (POPUP_BTN2==id) EventClosePopinForm();
363
				if (POPUP_BTN2==id) EventClosePopinForm();
-
 
364
				if (dev_popin_active_on_panel) {
-
 
365
					if (id>=100) && (id<=120) EventDriveClick(id);
-
 
366
					else EventClosePopinForm();
365
				if (dev_popin_active_on_panel) EventDriveClick(id);
367
				}
366
				break;					
368
				break;					
Line 367... Line 369...
367
			}
369
			}
368
 
370
 
Line 377... Line 379...
377
						Clipboard__CopyText(#path);
379
						Clipboard__CopyText(#path);
378
						break;
380
						break;
379
				case KFM_DEV_DROPDOWN_1:
381
				case KFM_DEV_DROPDOWN_1:
380
				case KFM_DEV_DROPDOWN_1+1:
382
				case KFM_DEV_DROPDOWN_1+1:
381
						dev_popin_active_on_panel = 1;
383
						dev_popin_active_on_panel = 1;
-
 
384
						DefineHiddenButton(0,0,5000,3000,9999+BT_NOFRAME);
382
						SystemDiscs.DrawOptions(Form.cwidth/2-DDW, 8+DEV_H_HOR+3);
385
						SystemDiscs.DrawOptions(Form.cwidth/2-DDW, 8+DEV_H_HOR+3);
383
						break;
386
						break;
384
				case KFM_DEV_DROPDOWN_2:
387
				case KFM_DEV_DROPDOWN_2:
385
				case KFM_DEV_DROPDOWN_2+1:
388
				case KFM_DEV_DROPDOWN_2+1:
386
						dev_popin_active_on_panel = 2;
389
						dev_popin_active_on_panel = 2;
-
 
390
						DefineHiddenButton(0,0,5000,3000,9999+BT_NOFRAME);
387
						SystemDiscs.DrawOptions(Form.cwidth-DDW-2, 8+DEV_H_HOR+3);
391
						SystemDiscs.DrawOptions(Form.cwidth-DDW-2, 8+DEV_H_HOR+3);
388
						break;
392
						break;
389
				case BACK_BTN...PASTE_BTN:
393
				case BACK_BTN...PASTE_BTN:
390
						if (active_panel==2) {
394
						if (active_panel==2) {
391
							active_panel = 1;
395
							active_panel = 1;
Line 882... Line 886...
882
	DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
886
	DrawIconByExtension(#full_path, ext1, files.x+4, icon_y, bgcol);
883
}
887
}
Line 884... Line 888...
884
 
888
 
885
 
889
 
886
void Open_Dir(dword dir_path, redraw){
890
void Open_Dir(dword dir_path, redraw){
887
	int errornum, maxcount, i;
891
	int errornum;
888
	if (redraw!=ONLY_SHOW)
892
	if (redraw!=ONLY_SHOW)
889
	{
893
	{
890
		selected_count = 0;
894
		selected_count = 0;
Line 904... Line 908...
904
		if(!_not_draw) DrawPathBar();
908
		if(!_not_draw) DrawPathBar();
905
		history.add(#path);
909
		history.add(#path);
906
		SystemDiscs.Draw();
910
		SystemDiscs.Draw();
907
		files.visible = files.h / files.item_h;
911
		files.visible = files.h / files.item_h;
908
		if (files.count < files.visible) files.visible = files.count;
912
		if (files.count < files.visible) files.visible = files.count;
909
		if (!strncmp(dir_path, "/rd/1/",5)) 
913
		if (!strncmp(dir_path, "/rd/1/",5)) || (!strncmp(dir_path, "/sys/",4)) 
910
			dir_at_fat16 = true; else dir_at_fat16 = false; 
914
			dir_at_fat16 = true; else dir_at_fat16 = false; 
911
		if (redraw!=ONLY_SHOW) Sorting();
915
		if (redraw!=ONLY_SHOW) Sorting();
912
		list_full_redraw = true;
916
		list_full_redraw = true;
913
		if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
917
		if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
914
		SetCurDir(dir_path);
918
		SetCurDir(dir_path);
Line 922... Line 926...
922
 
926
 
923
inline Sorting()
927
inline Sorting()
924
{
928
{
925
	dword d=0, f=1;
929
	dword d=0, f=1;
926
	int j=0;
-
 
927
	dword tmp;
930
	int j=0;
Line 928... Line 931...
928
	dword file_off;
931
	dword file_off;
Line 929... Line 932...
929
 
932
 
Line 1028... Line 1031...
1028
}
1031
}
Line 1029... Line 1032...
1029
 
1032
 
1030
void EventOpenSelected()
1033
void EventOpenSelected()
1031
{
1034
{
1032
	int i;
-
 
1033
	dword file_off;
1035
	int i;
1034
	for (i=0; i
1036
	for (i=0; i
1035
		EDX = items.get(i)*304 + buf+32;
1037
		EDX = items.get(i)*304 + buf+32;
1036
		if (TestBit(ESDWORD[EDX], 4)) continue; //is foder
1038
		if (TestBit(ESDWORD[EDX], 4)) continue; //is foder
1037
		sprintf(#param,"%s/%s",#path, EDX+40);
1039
		sprintf(#param,"%s/%s",#path, EDX+40);
Line 1080... Line 1082...
1080
}
1082
}
Line 1081... Line 1083...
1081
 
1083
 
1082
void NewElement()
1084
void NewElement()
1083
{
1085
{
1084
	BDVK element_info;
1086
	BDVK element_info;
Line 1085... Line 1087...
1085
	byte del_result, copy_result, info_result;
1087
	byte copy_result, info_result;
1086
 
1088
 
1087
	sprintf(#temp,"%s/%s",#path,new_file_ed.text);
1089
	sprintf(#temp,"%s/%s",#path,new_file_ed.text);
1088
	info_result = GetFileInfo(#temp, #element_info);
1090
	info_result = GetFileInfo(#temp, #element_info);