Eolite 3.35: autodetect apps, show app icons
git-svn-id: svn://kolibrios.org@6757 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
69d1122a04
commit
ae17e1bd38
@ -666,6 +666,7 @@ void Line_ReDraw(dword bgcol, filenum){
|
|||||||
y=filenum*files.item_h+files.y,
|
y=filenum*files.item_h+files.y,
|
||||||
icon_y = files.item_h/2-7+y;
|
icon_y = files.item_h/2-7+y;
|
||||||
BDVK file;
|
BDVK file;
|
||||||
|
char temp_path[sizeof(file_path)];
|
||||||
char label_file_name[4096];
|
char label_file_name[4096];
|
||||||
if (filenum==-1) return;
|
if (filenum==-1) return;
|
||||||
DrawBar(files.x,y,3,files.item_h,bgcol);
|
DrawBar(files.x,y,3,files.item_h,bgcol);
|
||||||
@ -693,7 +694,8 @@ void Line_ReDraw(dword bgcol, filenum){
|
|||||||
WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1);
|
WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DrawIconByExtension(ext1, files.x+3, icon_y, bgcol);
|
sprintf(#temp_path,"%s/%s",#path,file_name_off);
|
||||||
|
DrawIconByExtension(#temp_path, ext1, files.x+3, icon_y, bgcol);
|
||||||
|
|
||||||
if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden?
|
if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden?
|
||||||
if (bgcol!=0xFFFfff)
|
if (bgcol!=0xFFFfff)
|
||||||
|
@ -27,8 +27,9 @@ char *ext[]={
|
|||||||
"grf", 25,
|
"grf", 25,
|
||||||
0,0};
|
0,0};
|
||||||
|
|
||||||
void DrawIconByExtension(dword extension, xx, yy, fairing_color)
|
void DrawIconByExtension(dword file_path, extension, xx, yy, fairing_color)
|
||||||
{
|
{
|
||||||
|
char BYTE_HEAD_FILE[4];
|
||||||
int i;
|
int i;
|
||||||
dword icon_n=0;
|
dword icon_n=0;
|
||||||
if (extension) for (i=0; ext[i]!=0; i+=2;)
|
if (extension) for (i=0; ext[i]!=0; i+=2;)
|
||||||
@ -39,6 +40,13 @@ void DrawIconByExtension(dword extension, xx, yy, fairing_color)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (file_path)
|
||||||
|
{
|
||||||
|
//if (!strncmp(file_path, "/rd/1",5)) || (!strncmp(file_path, "/tmp",4)) {
|
||||||
|
ReadFile(0,4,#BYTE_HEAD_FILE,file_path);
|
||||||
|
IF(DSDWORD[#BYTE_HEAD_FILE]=='KCPK')||(DSDWORD[#BYTE_HEAD_FILE]=='UNEM') icon_n = 6;
|
||||||
|
//}
|
||||||
|
}
|
||||||
ficons_pal[0] = fairing_color;
|
ficons_pal[0] = fairing_color;
|
||||||
PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
|
PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal);
|
||||||
if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
|
if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color);
|
||||||
|
@ -57,7 +57,7 @@ void Operation_Draw_Progress(dword filename) {
|
|||||||
}
|
}
|
||||||
copy_bar.width = Dialog_Form.cwidth-32 - 100;
|
copy_bar.width = Dialog_Form.cwidth-32 - 100;
|
||||||
DisplayOperationForm();
|
DisplayOperationForm();
|
||||||
DrawIconByExtension(filename+strrchr(filename,'.'), 16, 19, system.color.work);
|
DrawIconByExtension(filename, filename+strrchr(filename,'.'), 16, 19, system.color.work);
|
||||||
DrawBar(45, 32, Dialog_Form.cwidth-45, 15, system.color.work);
|
DrawBar(45, 32, Dialog_Form.cwidth-45, 15, system.color.work);
|
||||||
WriteText(45, 32, 0x90, 0x000000, filename);
|
WriteText(45, 32, 0x90, 0x000000, filename);
|
||||||
progressbar_draw stdcall (#copy_bar);
|
progressbar_draw stdcall (#copy_bar);
|
||||||
|
@ -345,6 +345,8 @@ void properties_dialog()
|
|||||||
|
|
||||||
void DrawPropertiesWindow()
|
void DrawPropertiesWindow()
|
||||||
{
|
{
|
||||||
|
dword ext1;
|
||||||
|
char temp_path[sizeof(file_path)];
|
||||||
DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0);
|
DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0);
|
||||||
if ( !asm test path_to_file_ed.flags, 2)
|
if ( !asm test path_to_file_ed.flags, 2)
|
||||||
{
|
{
|
||||||
@ -381,7 +383,7 @@ void DrawPropertiesWindow()
|
|||||||
|
|
||||||
if (selected_count)
|
if (selected_count)
|
||||||
{
|
{
|
||||||
DrawIconByExtension(NULL, 18, 49, system.color.work);
|
DrawIconByExtension(NULL, NULL, 18, 49, system.color.work);
|
||||||
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
|
sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count);
|
||||||
WriteText(50, 49, 0x90, system.color.work_text, #folder_info);
|
WriteText(50, 49, 0x90, system.color.work_text, #folder_info);
|
||||||
sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG);
|
sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG);
|
||||||
@ -390,10 +392,14 @@ void DrawPropertiesWindow()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( file_info_general.isfolder )
|
if ( file_info_general.isfolder )
|
||||||
DrawIconByExtension("<DIR>", 18, 49, system.color.work);
|
DrawIconByExtension(NULL, "<DIR>", 18, 49, system.color.work);
|
||||||
else
|
else {
|
||||||
DrawIconByExtension(#file_name2+strrchr(#file_name2,'.'), 18, 49, system.color.work);
|
sprintf(#temp_path,"%s/%s",#path,#file_name2);
|
||||||
|
debugln(#temp_path);
|
||||||
|
ext1 = strrchr(#file_name2,'.');
|
||||||
|
if (ext1) ext1 += #file_name2;
|
||||||
|
DrawIconByExtension(#temp_path, ext1, 18, 49, system.color.work);
|
||||||
|
}
|
||||||
WriteText(50, 40, 0x90, system.color.work_text, PR_T_NAME);
|
WriteText(50, 40, 0x90, system.color.work_text, PR_T_NAME);
|
||||||
edit_box_draw stdcall (#file_name_ed);
|
edit_box_draw stdcall (#file_name_ed);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define TITLE "Eolite File Manager v3.72"
|
#define TITLE "Eolite File Manager v3.75"
|
||||||
#define ABOUT_TITLE "EOLITE 3.72"
|
#define ABOUT_TITLE "EOLITE 3.75"
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
?define T_FILE "” ©«"
|
||||||
|
Loading…
Reference in New Issue
Block a user