Subversion Repositories Kolibri OS

Rev

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

Rev 6504 Rev 6505
Line 95... Line 95...
95
byte CMD_REFRESH;
95
byte CMD_REFRESH;
Line 96... Line 96...
96
 
96
 
97
//struct t_settings {
97
//struct t_settings {
98
char sort_num=2;
98
char sort_num=2;
99
bool show_dev_name=true,
99
bool show_dev_name=true,
100
	real_files_names_case=false,
100
	real_files_names_case=true,
101
	info_after_copy=false,
101
	info_after_copy=false,
102
	two_panels=false,
102
	two_panels=false,
-
 
103
	show_breadcrumb=false,
103
	show_breadcrumb=false,
104
	show_status_bar=true,
104
	active_panel=1;
105
	active_panel=1;
Line 105... Line 106...
105
//} settings;
106
//} settings;
106
 
107
 
Line 423... Line 424...
423
									if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory
424
									if (!i) if (!strncmp(selected_offset+33, "..", 2)) continue; //do not selec ".." directory
424
									ESBYTE[selected_offset] = 1;
425
									ESBYTE[selected_offset] = 1;
425
									selected_count++;
426
									selected_count++;
426
								}
427
								}
427
								List_ReDraw();
428
								List_ReDraw();
428
								DrawStatusBar();
429
								if (show_status_bar) DrawStatusBar();
429
								break;
430
								break;
430
						case 022: //Ctrl+U - unselect all files
431
						case 022: //Ctrl+U - unselect all files
431
								for (i=0; i
432
								for (i=0; i
432
								{
433
								{
433
									selected_offset = file_mas[i]*304 + buf+32 + 7;
434
									selected_offset = file_mas[i]*304 + buf+32 + 7;
434
									ESBYTE[selected_offset] = 0;
435
									ESBYTE[selected_offset] = 0;
435
								}
436
								}
436
								selected_count = 0;
437
								selected_count = 0;
437
								List_ReDraw();
438
								List_ReDraw();
438
								DrawStatusBar();
439
								if (show_status_bar) DrawStatusBar();
439
								break;
440
								break;
440
					}
441
					}
441
					break;
442
					break;
442
				}
443
				}
Line 452... Line 453...
452
								break; 
453
								break; 
453
						case SCAN_CODE_TAB:
454
						case SCAN_CODE_TAB:
454
								if (!two_panels) break;
455
								if (!two_panels) break;
455
								if (active_panel==1) active_panel=2; else active_panel=1;
456
								if (active_panel==1) active_panel=2; else active_panel=1;
456
								ChangeActivePanel();
457
								ChangeActivePanel();
457
								DrawStatusBar();
458
								if (show_status_bar) DrawStatusBar();
458
								break;
459
								break;
459
						case 093: //menu
460
						case 093: //menu
460
								menu_call_mouse=0;
461
								menu_call_mouse=0;
461
								menu_stak = malloc(4096);
462
								menu_stak = malloc(4096);
462
								CreateThread(#FileMenu,menu_stak+4092);
463
								CreateThread(#FileMenu,menu_stak+4092);
Line 478... Line 479...
478
									selected_count++;
479
									selected_count++;
479
								}
480
								}
480
								_INSERT_END:
481
								_INSERT_END:
481
								files.KeyDown();
482
								files.KeyDown();
482
								List_ReDraw();
483
								List_ReDraw();
483
								DrawStatusBar();
484
								if (show_status_bar) DrawStatusBar();
484
								break;
485
								break;
485
						case 059...068: //F1-F10
486
						case 059...068: //F1-F10
486
								FnProcess(key_scancode-58);
487
								FnProcess(key_scancode-58);
487
								break; 
488
								break; 
488
						default:
489
						default:
Line 561... Line 562...
561
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,col_graph);
562
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,col_graph);
562
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
563
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
563
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
564
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
564
	llist_copy(#files_active, #files);
565
	llist_copy(#files_active, #files);
565
	strcpy(#active_path, #path);
566
	strcpy(#active_path, #path);
566
	DrawStatusBar();
567
	if (show_status_bar) DrawStatusBar();
567
	DrawFilePanels();
568
	DrawFilePanels();
568
	if (del_active) Del_Form();
569
	if (del_active) Del_Form();
569
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
570
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
570
}
571
}
Line 596... Line 597...
596
{
597
{
597
	int files_y;
598
	int files_y;
598
	if (!two_panels)
599
	if (!two_panels)
599
	{
600
	{
600
		DrawDeviceAndActionsLeftPanel();
601
		DrawDeviceAndActionsLeftPanel();
-
 
602
		if (show_status_bar) files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h);
601
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 75, files.item_h);
603
		else files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.item_h);
602
		DrawList();
604
		DrawList();
603
		Open_Dir(#path,ONLY_SHOW);
605
		Open_Dir(#path,ONLY_SHOW);
604
	}
606
	}
605
	else
607
	else
606
	{
608
	{
Line 614... Line 616...
614
		if (active_panel==1)
616
		if (active_panel==1)
615
		{
617
		{
616
			llist_copy(#files, #files_inactive);
618
			llist_copy(#files, #files_inactive);
617
			strcpy(#path, #inactive_path);
619
			strcpy(#path, #inactive_path);
618
			col_selec = 0xCCCccc;
620
			col_selec = 0xCCCccc;
-
 
621
			if (show_status_bar) files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
619
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
622
			else files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h);
620
			DrawList();
623
			DrawList();
621
			Open_Dir(#path,WITH_REDRAW);
624
			Open_Dir(#path,WITH_REDRAW);
622
			llist_copy(#files, #files_active);
625
			llist_copy(#files, #files_active);
623
			strcpy(#path, #active_path);
626
			strcpy(#path, #active_path);
624
			col_selec = 0x94AECE;
627
			col_selec = 0x94AECE;
-
 
628
			if (show_status_bar) files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
625
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
629
			else files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h);
626
			DrawList();
630
			DrawList();
627
			Open_Dir(#path,WITH_REDRAW);
631
			Open_Dir(#path,WITH_REDRAW);
628
		}
632
		}
629
		if (active_panel==2)
633
		if (active_panel==2)
630
		{
634
		{
-
 
635
			if (show_status_bar) files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
631
			files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2-16, files.item_h);
636
			else files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2, files.item_h);
632
			DrawList();
637
			DrawList();
633
			Open_Dir(#path,WITH_REDRAW);
638
			Open_Dir(#path,WITH_REDRAW);
634
			llist_copy(#files, #files_active);
639
			llist_copy(#files, #files_active);
635
			strcpy(#path, #active_path);
640
			strcpy(#path, #active_path);
636
			col_selec = 0x94AECE;
641
			col_selec = 0x94AECE;
-
 
642
			if (show_status_bar) files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
637
			files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2-16, files.item_h);
643
			else files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2, files.item_h);
638
			DrawList();
644
			DrawList();
639
			Open_Dir(#path,WITH_REDRAW);
645
			Open_Dir(#path,WITH_REDRAW);
640
		}
646
		}
641
	}
647
	}
642
}
648
}
Line 783... Line 789...
783
		SystemDiscs.Draw();
789
		SystemDiscs.Draw();
784
		files.visible = files.h / files.item_h;
790
		files.visible = files.h / files.item_h;
785
		if (files.count < files.visible) files.visible = files.count;
791
		if (files.count < files.visible) files.visible = files.count;
786
		if (redraw!=ONLY_SHOW) Sorting();
792
		if (redraw!=ONLY_SHOW) Sorting();
787
		list_full_redraw = true;
793
		list_full_redraw = true;
788
		if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
794
		if (redraw!=ONLY_OPEN)&&(!_not_draw) {if (show_status_bar) DrawStatusBar(); List_ReDraw();}
789
	}
795
	}
790
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
796
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
791
	{
797
	{
792
		files.KeyHome();
798
		files.KeyHome();
793
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
799
		if(!_not_draw) { list_full_redraw=true; if (show_status_bar) DrawStatusBar(); List_ReDraw(); }
794
	}
800
	}
795
	SetCurDir(dir_path);
801
	SetCurDir(dir_path);
796
}
802
}