Subversion Repositories Kolibri OS

Rev

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

Rev 7312 Rev 7313
Line 131... Line 131...
131
#include "include\breadcrumbs.h"
131
#include "include\breadcrumbs.h"
Line 132... Line 132...
132
 
132
 
133
void main() 
133
void main() 
134
{
134
{
-
 
135
	dword files_y = 0;
135
	dword files_y = 0;
136
	dword countDisk = 0;
-
 
137
	dword id;
136
	dword id;
138
	dword devbuf;
137
	byte count_sl = 0;
139
	byte count_sl = 0;
138
	signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
140
	signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
139
	char stats;
141
	char stats;
Line -... Line 142...
-
 
142
	rand_n = random(40);
-
 
143
 
140
	rand_n = random(40);
144
	devbuf = malloc(10000);
141
 
145
	
142
	load_dll(boxlib, #box_lib_init,0);
146
	load_dll(boxlib, #box_lib_init,0);
143
	load_dll(libini, #lib_init,1);
147
	load_dll(libini, #lib_init,1);
Line 528... Line 532...
528
					if (action_buf==110) FnProcess(8);
532
					if (action_buf==110) FnProcess(8);
529
					action_buf=0;
533
					action_buf=0;
530
				}
534
				}
531
			break;
535
			break;
532
			default:
536
			default:
533
			if ( SystemDiscs.Get() )
-
 
534
			{
-
 
535
				if (two_panels.checked)
-
 
536
				{
-
 
537
					//SystemDiscs.Draw();
-
 
538
					//ActionsDraw();
-
 
539
					llist_copy(#files, #files_inactive);
-
 
540
					strcpy(#path, #inactive_path);
-
 
541
					col_selec = 0xCCCccc;
-
 
542
					SystemDiscs.Draw();
-
 
543
					files_y = files.y;
-
 
Line 544... Line -...
544
 
-
 
545
					if (active_panel==1)
-
 
546
					{
-
 
547
						llist_copy(#files, #files_inactive);
-
 
548
						strcpy(#path, #inactive_path);
-
 
549
						col_selec = 0xCCCccc;
-
 
550
						files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2 - status_bar_h, files.item_h);
-
 
551
						DrawList();
537
				
552
						Update_Dir(#path,WITH_REDRAW);
-
 
553
						llist_copy(#files, #files_active);
-
 
554
						strcpy(#path, #active_path);
538
				ReadDir(19, devbuf, "/");
555
						col_selec = 0x94AECE;
-
 
556
						files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2 - status_bar_h, files.item_h);
-
 
557
						DrawList();
-
 
558
						Update_Dir(#path,WITH_REDRAW);
-
 
559
					}
-
 
560
					if (active_panel==2)
539
				IF(countDisk != EBX)
561
					{
-
 
562
						files.SetSizes(2, files_y, Form.cwidth/2-2-17, Form.cheight-files_y-2 - status_bar_h, files.item_h);
-
 
563
						DrawList();
-
 
564
						Update_Dir(#path,WITH_REDRAW);
-
 
565
						llist_copy(#files, #files_active);
-
 
566
						strcpy(#path, #active_path);
540
				{
567
						col_selec = 0x94AECE;
-
 
568
						files.SetSizes(Form.cwidth/2, files_y, Form.cwidth/2 -17, Form.cheight-files_y-2 - status_bar_h, files.item_h);
541
					countDisk = EBX;
569
						DrawList();
-
 
570
						Update_Dir(#path,WITH_REDRAW);
-
 
571
					}
-
 
572
				}
-
 
573
				else DrawDeviceAndActionsLeftPanel();
542
					FnProcess(5);
574
			}
-
 
575
			Update_Dir(#path,WITH_REDRAW);
543
				}
Line 576... Line 544...
576
		}
544
		}
Line 857... Line 825...
857
		files.KeyHome();
825
		files.KeyHome();
858
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
826
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
859
	}
827
	}
860
}
828
}
Line 861... Line -...
861
 
-
 
862
dword __updateDirCount = 0;
-
 
863
void Update_Dir(dword dir_path, redraw){
-
 
864
	int errornum, maxcount, i;
-
 
865
	if (redraw!=ONLY_SHOW)
-
 
866
	{
-
 
867
		selected_count = 0;
-
 
868
		if (buf) free(buf);
-
 
869
		errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT);
-
 
870
		if (errornum)
-
 
871
		{
-
 
872
			history.add(#path);
-
 
873
			GoBack();
-
 
874
			Write_Error(errornum);
-
 
875
			return;
-
 
876
		}
-
 
877
		maxcount = sizeof(file_mas)/sizeof(dword)-1;
-
 
878
		if (files.count>maxcount) files.count = maxcount;
-
 
879
		if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
-
 
880
	}
-
 
881
	if (files.count!=-1)
-
 
882
	{
-
 
883
		if(!_not_draw) if (show_breadcrumb.checked) DrawBreadCrumbs(); else DrawPathBar();
-
 
884
		history.add(#path);
-
 
885
		SystemDiscs.Draw();
-
 
886
		files.visible = files.h / files.item_h;
-
 
887
		if (files.count < files.visible) files.visible = files.count;
-
 
888
		if (redraw!=ONLY_SHOW) Sorting();
-
 
889
		list_full_redraw = true;
-
 
890
		if (redraw!=ONLY_OPEN)&&(!_not_draw) 
-
 
891
		{
-
 
892
			if ( __updateDirCount!=files.count )
-
 
893
			{
-
 
894
				DrawStatusBar();
-
 
895
				List_ReDraw();
-
 
896
				__updateDirCount = files.count;
-
 
897
			}
-
 
898
		}
-
 
899
		SetCurDir(dir_path);
-
 
900
	}
-
 
901
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
-
 
902
	{
-
 
903
		files.KeyHome();
-
 
904
		if(!_not_draw) 
-
 
905
		{ 
-
 
906
			list_full_redraw=true; 
-
 
907
			if ( __updateDirCount!=files.count )
-
 
908
			{
-
 
909
				DrawStatusBar(); 
-
 
910
				List_ReDraw(); 
-
 
911
				__updateDirCount = files.count;
-
 
912
			}
-
 
913
		}
-
 
914
	}
-
 
915
}
-
 
916
 
829
 
917
inline Sorting()
830
inline Sorting()
918
{
831
{
919
	dword k=0, l=1;
832
	dword k=0, l=1;
920
	dword file_off;
833
	dword file_off;