Subversion Repositories Kolibri OS

Rev

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

Rev 6021 Rev 6034
Line 78... Line 78...
78
int action_buf;
78
int action_buf;
79
int rand_n;
79
int rand_n;
80
byte CMD_REFRESH;
80
byte CMD_REFRESH;
Line 81... Line 81...
81
 
81
 
82
//struct t_settings {
82
//struct t_settings {
83
byte sort_num=2,
83
int sort_num=2,
84
	show_dev_name=true,
84
	show_dev_name=true,
85
	real_files_names_case=false,
85
	real_files_names_case=false,
86
	info_after_copy=false,
86
	info_after_copy=false,
87
	two_panels=false,
87
	two_panels=false,
Line 125... Line 125...
125
 
125
 
126
	eolite_ini_path = abspath("Eolite.ini");
126
	eolite_ini_path = abspath("Eolite.ini");
Line 127... Line 127...
127
	fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
127
	fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
128
	
128
	
129
	LoadIniSettings();
129
	LoadIniSettings();
130
	GetSystemDiscs();
130
	SystemDiscs.Get();
131
	SetAppColors();
131
	SetAppColors();
132
	if (param)
132
	if (param)
133
	{
133
	{
Line 350... Line 350...
350
							break;
350
							break;
351
					case 50...60: //Actions
351
					case 50...60: //Actions
352
							FnProcess(id-50);
352
							FnProcess(id-50);
353
							break;
353
							break;
354
					case 100...120:
354
					case 100...120:
355
						ClickOnDisk(id-100);
355
						SystemDiscs.Click(id-100);
356
						break;
356
						break;
357
				}
357
				}
358
				break;
358
				break;
359
	//Key pressed-----------------------------------------------------------------------------
359
	//Key pressed-----------------------------------------------------------------------------
360
			case evKey:
360
			case evKey:
Line 385... Line 385...
385
				{
385
				{
386
					switch(key_scancode)
386
					switch(key_scancode)
387
					{
387
					{
388
						case 059...068:
388
						case 059...068:
389
								key_scancode -= 59;
389
								key_scancode -= 59;
390
								if (key_scancode
390
								if (key_scancode < SystemDiscs.list.count)
391
								{
391
								{
392
									if (!two_panels)
392
									if (!two_panels)
393
									{
393
									{
394
										DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
394
										DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
395
										pause(7);										
395
										pause(7);										
396
									}
396
									}
397
									ClickOnDisk(key_scancode);
397
									SystemDiscs.Click(key_scancode);
398
								}
398
								}
399
								break;
399
								break;
400
						case 45:  //Ctrl+X
400
						case 45:  //Ctrl+X
401
								Copy(#file_path, CUT);
401
								Copy(#file_path, CUT);
402
								break;						
402
								break;						
Line 579... Line 579...
579
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);	
579
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);	
580
}
580
}
Line 581... Line 581...
581
 
581
 
582
void DrawFilePanels()
582
void DrawFilePanels()
-
 
583
{
583
{
584
	int files_y;
584
	if (!two_panels)
585
	if (!two_panels)
585
	{
586
	{
586
		DrawDeviceAndActionsLeftPanel();
587
		DrawDeviceAndActionsLeftPanel();
587
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h);
588
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h);
Line 591... Line 592...
591
	else
592
	else
592
	{
593
	{
593
		llist_copy(#files, #files_inactive);
594
		llist_copy(#files, #files_inactive);
594
		strcpy(#path, #inactive_path);
595
		strcpy(#path, #inactive_path);
595
		col_selec = 0xCCCccc;
596
		col_selec = 0xCCCccc;
-
 
597
		SystemDiscs.Draw();
-
 
598
		files_y = files.y;
Line 596... Line 599...
596
 
599
 
597
		if (active_panel==1)
600
		if (active_panel==1)
598
		{
601
		{
599
			llist_copy(#files, #files_inactive);
602
			llist_copy(#files, #files_inactive);
600
			strcpy(#path, #inactive_path);
603
			strcpy(#path, #inactive_path);
601
			col_selec = 0xCCCccc;
604
			col_selec = 0xCCCccc;
602
			files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.item_h);
605
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y, files.item_h);
603
			DrawList();
606
			DrawList();
604
			Open_Dir(#path,WITH_REDRAW);
607
			Open_Dir(#path,WITH_REDRAW);
605
			llist_copy(#files, #files_active);
608
			llist_copy(#files, #files_active);
606
			strcpy(#path, #active_path);
609
			strcpy(#path, #active_path);
607
			col_selec = 0x94AECE;
610
			col_selec = 0x94AECE;
608
			files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.item_h);
611
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y, files.item_h);
609
			DrawList();
612
			DrawList();
610
			Open_Dir(#path,WITH_REDRAW);
613
			Open_Dir(#path,WITH_REDRAW);
611
		}
614
		}
612
		if (active_panel==2)
615
		if (active_panel==2)
613
		{
616
		{
614
			files.SetSizes(2, 57+22, Form.cwidth/2-2-17, Form.cheight-59-22, files.item_h);
617
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y, files.item_h);
615
			DrawList();
618
			DrawList();
616
			Open_Dir(#path,WITH_REDRAW);
619
			Open_Dir(#path,WITH_REDRAW);
617
			llist_copy(#files, #files_active);
620
			llist_copy(#files, #files_active);
618
			strcpy(#path, #active_path);
621
			strcpy(#path, #active_path);
619
			col_selec = 0x94AECE;
622
			col_selec = 0x94AECE;
620
			files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.item_h);
623
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y, files.item_h);
621
			DrawList();
624
			DrawList();
622
			Open_Dir(#path,WITH_REDRAW);
625
			Open_Dir(#path,WITH_REDRAW);
623
		}
626
		}
624
	}
627
	}
Line 760... Line 763...
760
			DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff);
763
			DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff);
761
			PathShow_prepare stdcall(#PathShow);
764
			PathShow_prepare stdcall(#PathShow);
762
			PathShow_draw stdcall(#PathShow);
765
			PathShow_draw stdcall(#PathShow);
763
		}
766
		}
764
		history.add(#path);
767
		history.add(#path);
-
 
768
		SystemDiscs.Draw();
765
		files.visible = files.h / files.item_h;
769
		files.visible = files.h / files.item_h;
766
		if (files.count < files.visible) files.visible = files.count;
770
		if (files.count < files.visible) files.visible = files.count;
767
		if (redraw!=ONLY_SHOW) Sorting();
771
		if (redraw!=ONLY_SHOW) Sorting();
768
		list_full_redraw = true;
772
		list_full_redraw = true;
769
		if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
773
		if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw();
770
		DrawSystemDiscs();
-
 
771
	}
774
	}
772
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
775
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
773
	{
776
	{
774
		files.KeyHome();
777
		files.KeyHome();
775
		if(!_not_draw) { list_full_redraw=true; List_ReDraw(); }
778
		if(!_not_draw) { list_full_redraw=true; List_ReDraw(); }
Line 1143... Line 1146...
1143
			else 
1146
			else 
1144
			{
1147
			{
1145
				Tip(56, T_DEVICES, 55, "-");
1148
				Tip(56, T_DEVICES, 55, "-");
1146
				Open_Dir(#path,WITH_REDRAW);
1149
				Open_Dir(#path,WITH_REDRAW);
1147
				pause(10);
1150
				pause(10);
1148
				GetSystemDiscs();
1151
				SystemDiscs.Get();
1149
				Open_Dir(#path,WITH_REDRAW);
1152
				Open_Dir(#path,WITH_REDRAW);
1150
				DrawDeviceAndActionsLeftPanel();				
1153
				DrawDeviceAndActionsLeftPanel();				
1151
			}
1154
			}
1152
			break;
1155
			break;
1153
		case 6:
1156
		case 6: