Subversion Repositories Kolibri OS

Rev

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

Rev 7278 Rev 7310
Line 178... Line 178...
178
	Open_Dir(#path,ONLY_OPEN);
178
	Open_Dir(#path,ONLY_OPEN);
179
	strcpy(#inactive_path, #path);
179
	strcpy(#inactive_path, #path);
180
	llist_copy(#files_inactive, #files);
180
	llist_copy(#files_inactive, #files);
181
	SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
181
	SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
182
	loop(){
182
	loop(){
183
		switch(WaitEvent())
183
		switch(WaitEventTimeout(50))
184
		{
184
		{
185
			case evMouse:
185
			case evMouse:
186
				if (del_active) || (Form.status_window>2) break;
186
				if (del_active) || (Form.status_window>2) break;
187
				if (new_element_active) 
187
				if (new_element_active) 
188
				{
188
				{
Line 525... Line 525...
525
					if (action_buf==108) Del_Form();
525
					if (action_buf==108) Del_Form();
526
					if (action_buf==109) FnProcess(5);
526
					if (action_buf==109) FnProcess(5);
527
					if (action_buf==110) FnProcess(8);
527
					if (action_buf==110) FnProcess(8);
528
					action_buf=0;
528
					action_buf=0;
529
				}
529
				}
-
 
530
			break;
-
 
531
			default:
-
 
532
				IF( SystemDiscs.Get() ) DrawDeviceAndActionsLeftPanel();
-
 
533
				Update_Dir(#path,WITH_REDRAW);
530
		}
534
		}
-
 
535
		
-
 
536
		
-
 
537
		
531
		if(cmd_free)
538
		if(cmd_free)
532
		{
539
		{
533
			if(cmd_free==1)      menu_stak=free(menu_stak);
540
			if(cmd_free==1)      menu_stak=free(menu_stak);
534
			else if(cmd_free==2) about_stak=free(about_stak);
541
			else if(cmd_free==2) about_stak=free(about_stak);
535
			else if(cmd_free==3) properties_stak=free(properties_stak);
542
			else if(cmd_free==3) properties_stak=free(properties_stak);
Line 808... Line 815...
808
		files.KeyHome();
815
		files.KeyHome();
809
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
816
		if(!_not_draw) { list_full_redraw=true; DrawStatusBar(); List_ReDraw(); }
810
	}
817
	}
811
}
818
}
Line -... Line 819...
-
 
819
 
-
 
820
dword __updateDirCount = 0;
-
 
821
void Update_Dir(dword dir_path, redraw){
-
 
822
	int errornum, maxcount, i;
-
 
823
	if (redraw!=ONLY_SHOW)
-
 
824
	{
-
 
825
		selected_count = 0;
-
 
826
		if (buf) free(buf);
-
 
827
		errornum = GetDir(#buf, #files.count, dir_path, DIRS_NOROOT);
-
 
828
		if (errornum)
-
 
829
		{
-
 
830
			history.add(#path);
-
 
831
			GoBack();
-
 
832
			Write_Error(errornum);
-
 
833
			return;
-
 
834
		}
-
 
835
		maxcount = sizeof(file_mas)/sizeof(dword)-1;
-
 
836
		if (files.count>maxcount) files.count = maxcount;
-
 
837
		if (files.count>0) && (files.cur_y-files.first==-1) files.cur_y=0;
-
 
838
	}
-
 
839
	if (files.count!=-1)
-
 
840
	{
-
 
841
		if(!_not_draw) if (show_breadcrumb.checked) DrawBreadCrumbs(); else DrawPathBar();
-
 
842
		history.add(#path);
-
 
843
		SystemDiscs.Draw();
-
 
844
		files.visible = files.h / files.item_h;
-
 
845
		if (files.count < files.visible) files.visible = files.count;
-
 
846
		if (redraw!=ONLY_SHOW) Sorting();
-
 
847
		list_full_redraw = true;
-
 
848
		if (redraw!=ONLY_OPEN)&&(!_not_draw) 
-
 
849
		{
-
 
850
			if ( __updateDirCount!=files.count )
-
 
851
			{
-
 
852
				DrawStatusBar();
-
 
853
				List_ReDraw();
-
 
854
				__updateDirCount = files.count;
-
 
855
			}
-
 
856
		}
-
 
857
		SetCurDir(dir_path);
-
 
858
	}
-
 
859
	if (files.count==-1) && (redraw!=ONLY_OPEN) 
-
 
860
	{
-
 
861
		files.KeyHome();
-
 
862
		if(!_not_draw) 
-
 
863
		{ 
-
 
864
			list_full_redraw=true; 
-
 
865
			if ( __updateDirCount!=files.count )
-
 
866
			{
-
 
867
				DrawStatusBar(); 
-
 
868
				List_ReDraw(); 
-
 
869
				__updateDirCount = files.count;
-
 
870
			}
-
 
871
		}
-
 
872
	}
Line 812... Line 873...
812
 
873
}
813
 
874
 
814
inline Sorting()
875
inline Sorting()
815
{
876
{