Subversion Repositories Kolibri OS

Rev

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

Rev 8943 Rev 8944
Line 829... Line 829...
829
	file.selected = ESBYTE[file_offet+7];
829
	file.selected = ESBYTE[file_offet+7];
830
	file.sizelo   = ESDWORD[file_offet+32];
830
	file.sizelo   = ESDWORD[file_offet+32];
831
	file.sizehi   = ESDWORD[file_offet+36];
831
	file.sizehi   = ESDWORD[file_offet+36];
832
	file_name_off = file_offet+40;
832
	file_name_off = file_offet+40;
Line 833... Line 833...
833
 
833
 
834
	if (! TestBit(attr, 4) ) //file or folder?
834
	if (! attr & ATR_FOLDER) //file or folder?
835
	{	
835
	{	
836
		ext1 = strrchr(file_name_off,'.') + file_name_off;
836
		ext1 = strrchr(file_name_off,'.') + file_name_off;
837
		if (ext1==file_name_off) ext1 = NULL; //if no extension then show nothing
837
		if (ext1==file_name_off) ext1 = NULL; //if no extension then show nothing
838
		file_size = ConvertSize64(file.sizelo, file.sizehi);
838
		file_size = ConvertSize64(file.sizelo, file.sizehi);
Line 847... Line 847...
847
		if (chrnum(#path, '/')==1) && (streq(#path, "/kolibrios")==false) file_size = GetDeviceSizeLabel(#full_path);
847
		if (chrnum(#path, '/')==1) && (streq(#path, "/kolibrios")==false) file_size = GetDeviceSizeLabel(#full_path);
848
	}
848
	}
849
	if (file_size) WriteText(7-strlen(file_size)*6+files.x+files.w-58, 
849
	if (file_size) WriteText(7-strlen(file_size)*6+files.x+files.w-58, 
850
			files.text_y+y+1, files.font_type, col.list_gb_text, file_size);
850
			files.text_y+y+1, files.font_type, col.list_gb_text, file_size);
Line 851... Line 851...
851
 
851
 
852
	if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=col.list_text_hidden; //system or hiden?
852
	if (attr&2) || (attr&4) text_col=col.list_text_hidden; //system or hiden?
853
	if (bgcol==col.selec)
853
	if (bgcol==col.selec)
854
	{
854
	{
855
		file_name_is_8_3(file_name_off);
855
		file_name_is_8_3(file_name_off);
856
		itdir = TestBit(attr, 4);
856
		itdir = attr & ATR_FOLDER;
857
		strcpy(#file_name, file_name_off);
857
		strcpy(#file_name, file_name_off);
858
		if (!strcmp(#path,"/")) sprintf(#file_path,"%s%s",#path,file_name_off);
858
		if (!strcmp(#path,"/")) sprintf(#file_path,"%s%s",#path,file_name_off);
859
			else sprintf(#file_path,"%s/%s",#path,file_name_off);
859
			else sprintf(#file_path,"%s/%s",#path,file_name_off);
860
		if (text_col==col.list_text_hidden) {
860
		if (text_col==col.list_text_hidden) {
Line 946... Line 946...
946
		return;
946
		return;
947
	}
947
	}
948
	for (j=files.count-1, file_off=files.count-1*304+buf+32; j>=0; j--, file_off-=304;)  //files | folders
948
	for (j=files.count-1, file_off=files.count-1*304+buf+32; j>=0; j--, file_off-=304;)  //files | folders
949
	{
949
	{
950
		if (dir_at_fat16) && (file_name_is_8_3(file_off+40)) strttl(file_off+40);
950
		if (dir_at_fat16) && (file_name_is_8_3(file_off+40)) strttl(file_off+40);
951
		if (TestBit(ESDWORD[file_off],4)) //directory?
951
		if (ESDWORD[file_off] & ATR_FOLDER) {
952
		{
-
 
953
			items.set(d, j);
952
			items.set(d, j);
954
			d++;
953
			d++;
955
		}
-
 
956
		else
954
		} else {
957
		{
-
 
958
			items.set(files.count-f, j);
955
			items.set(files.count-f, j);
959
			f++;
956
			f++;
960
		}
957
		}
961
	}
958
	}
962
	count_dir = d;
959
	count_dir = d;
Line 1040... Line 1037...
1040
void EventOpenSelected()
1037
void EventOpenSelected()
1041
{
1038
{
1042
	int i;
1039
	int i;
1043
	for (i=0; i
1040
	for (i=0; i
1044
		EDX = items.get(i)*304 + buf+32;
1041
		EDX = items.get(i)*304 + buf+32;
1045
		if (TestBit(ESDWORD[EDX], 4)) continue; //is foder
1042
		if (ESDWORD[EDX]&ATR_FOLDER) continue; //is foder
1046
		sprintf(#param,"%s/%s",#path, EDX+40);
1043
		sprintf(#param,"%s/%s",#path, EDX+40);
1047
		RunProgram("/sys/@open", #param);
1044
		RunProgram("/sys/@open", #param);
1048
	}
1045
	}
1049
}
1046
}