Subversion Repositories Kolibri OS

Rev

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

Rev 6564 Rev 6570
Line 74... Line 74...
74
	DefaultPath[4096],
74
	DefaultPath[4096],
75
	file_path[4096],
75
	file_path[4096],
76
	file_name[256],
76
	file_name[256],
77
	new_element_name[256],
77
	new_element_name[256],
78
	temp[4096],
78
	temp[4096],
79
	status_bar_str[50],
-
 
80
	itdir;
79
	itdir;
Line 81... Line 80...
81
 
80
 
Line 82... Line 81...
82
char active_path[4096], inactive_path[4096];
81
char active_path[4096], inactive_path[4096];
Line 590... Line 589...
590
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph);	
589
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph);	
591
}
590
}
Line 592... Line 591...
592
 
591
 
593
void DrawStatusBar()
592
void DrawStatusBar()
-
 
593
{
-
 
594
	char status_bar_str[50];
594
{
595
	int go_up_folder_exists=0;
-
 
596
	if (!show_status_bar) return;
595
	if (!show_status_bar) return;
597
	if (files.count>0) && (strcmp(file_mas[0]*304+buf+72,"..")==0) go_up_folder_exists=1;;
596
	DrawBar(1, Form.cheight - status_bar_h-1, Form.cwidth-2,  status_bar_h, system.color.work);
598
	DrawBar(1, Form.cheight - status_bar_h-1, Form.cwidth-2,  status_bar_h, system.color.work);
597
	sprintf(#status_bar_str, STATUS_STR, files.count-1, count_dir-1, files.count-count_dir, selected_count);
599
	sprintf(#status_bar_str, STATUS_STR, files.count-go_up_folder_exists, count_dir-go_up_folder_exists, files.count-count_dir, selected_count);
598
	WriteText(6,Form.cheight - 13,0x80,0x000000,#status_bar_str);
600
	WriteText(6,Form.cheight - 13,0x80,0x000000,#status_bar_str);
Line 599... Line 601...
599
}
601
}
600
 
602
 
Line 758... Line 760...
758
}
760
}
Line 759... Line 761...
759
 
761
 
760
 
762
 
761
void Open_Dir(dword dir_path, redraw){
-
 
762
	int errornum, maxcount, i;
763
void Open_Dir(dword dir_path, redraw){
763
	count_dir = 0;
764
	int errornum, maxcount, i;
764
	if (redraw!=ONLY_SHOW)
765
	if (redraw!=ONLY_SHOW)
765
	{
766
	{
766
		if (ESBYTE[dir_path+1]!='\0') ESBYTE[dir_path+strlen(dir_path)-1] = '\0';
767
		if (ESBYTE[dir_path+1]!='\0') ESBYTE[dir_path+strlen(dir_path)-1] = '\0';
Line 776... Line 777...
776
		}
777
		}
777
		maxcount = sizeof(file_mas)/sizeof(dword)-1;
778
		maxcount = sizeof(file_mas)/sizeof(dword)-1;
778
		if (files.count>maxcount) files.count = maxcount;
779
		if (files.count>maxcount) files.count = maxcount;
779
		if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
780
		if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
780
	}
781
	}
781
	for (i=0; i
-
 
782
	{
-
 
783
		if (TestBit(ESDWORD[i*304+buf+32], 4) ) count_dir++;
-
 
784
	}
-
 
785
	if (files.count!=-1)
782
	if (files.count!=-1)
786
	{
783
	{
787
		if(!_not_draw) if (show_breadcrumb) DrawBreadCrumbs(); else DrawPathBar();
784
		if(!_not_draw) if (show_breadcrumb) DrawBreadCrumbs(); else DrawPathBar();
788
		history.add(#path);
785
		history.add(#path);
789
		SystemDiscs.Draw();
786
		SystemDiscs.Draw();
790
		files.visible = files.h / files.item_h;
787
		files.visible = files.h / files.item_h;
791
		if (files.count < files.visible) files.visible = files.count;
788
		if (files.count < files.visible) files.visible = files.count;
792
		if (redraw!=ONLY_SHOW) Sorting();
789
		if (redraw!=ONLY_SHOW) Sorting();
793
		list_full_redraw = true;
790
		list_full_redraw = true;
794
		if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
791
		if (redraw!=ONLY_OPEN)&&(!_not_draw) {DrawStatusBar(); List_ReDraw();}
-
 
792
		SetCurDir(dir_path);
795
	}
793
	}
796
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
794
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
797
	{
795
	{
798
		files.KeyHome();
796
		files.KeyHome();
799
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
797
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
800
	}
798
	}
801
	SetCurDir(dir_path);
-
 
802
}
799
}
Line 803... Line 800...
803
 
800
 
804
 
801
 
Line 823... Line 820...
823
		{
820
		{
824
			file_mas[files.count-l]=j;
821
			file_mas[files.count-l]=j;
825
			l++;
822
			l++;
826
		}
823
		}
827
	}
824
	}
-
 
825
	count_dir = k;
828
	//sorting: files first, then folders
826
	//sorting: files first, then folders
829
	Sort_by_Name(0,k-1);
827
	Sort_by_Name(0,k-1);
830
	if (sort_num==1) Sort_by_Name(k,files.count-1);
828
	if (sort_num==1) Sort_by_Name(k,files.count-1);
831
	if (sort_num==2) Sort_by_Type(k,files.count-1);
829
	if (sort_num==2) Sort_by_Type(k,files.count-1);
832
	if (sort_num==3) Sort_by_Size(k,files.count-1);
830
	if (sort_num==3) Sort_by_Size(k,files.count-1);
Line 883... Line 881...
883
	Open_Dir(#path,ONLY_OPEN);
881
	Open_Dir(#path,ONLY_OPEN);
884
	if (!real_files_names_case) strttl(that_file);
882
	if (!real_files_names_case) strttl(that_file);
885
	for (ind=files.count-1; ind>=0; ind--;) { if (!strcmp(file_mas[ind]*304+buf+72,that_file)) break; }
883
	for (ind=files.count-1; ind>=0; ind--;) { if (!strcmp(file_mas[ind]*304+buf+72,that_file)) break; }
886
	files.cur_y = ind - 1;
884
	files.cur_y = ind - 1;
887
	files.KeyDown();
885
	files.KeyDown();
-
 
886
	DrawStatusBar();
888
	List_ReDraw();
887
	List_ReDraw();
889
}
888
}
Line 890... Line 889...
890
 
889