- show theme folder icons again
- remove mime fallback function.this is already handled by efreets mime fallback


SVN revision: 42473
This commit is contained in:
Hannes Janetzek 2009-09-14 00:26:56 +00:00
parent 0f9b3d1b1e
commit f682217fba
2 changed files with 60 additions and 76 deletions

View File

@ -24305,29 +24305,29 @@ BORDERICON("properties","icon_border_properties.png")
// EFM icons // // EFM icons //
#define EFMICON(NAME, FILE, SIZE) \ /* #define EFMICON(NAME, FILE, SIZE) \
group { name: "e/icons/fileman/"NAME; \ * group { name: "e/icons/fileman/"NAME; \
max: SIZE SIZE; \ * max: SIZE SIZE; \
parts { \ * parts { \
part { name: "icon"; \ * part { name: "icon"; \
mouse_events: 0; \ * mouse_events: 0; \
description { state: "default" 0.0; \ * description { state: "default" 0.0; \
aspect: 1.0 1.0; \ * aspect: 1.0 1.0; \
aspect_preference: BOTH; \ * aspect_preference: BOTH; \
image.image: FILE COMP; \ * image.image: FILE COMP; \
image.normal: FILE ; \ * image.normal: FILE ; \
} \ * } \
} \ * } \
} \ * } \
} * } */
//EFMICON("folder","icon_efm_folder.png", 128) //EFMICON("folder","icon_efm_folder.png", 128)
EFMICON("chrdev","icon_efm_file.png", 128) //EFMICON("chrdev","icon_efm_file.png", 128)
EFMICON("blkdev","icon_efm_file.png", 128) //EFMICON("blkdev","icon_efm_file.png", 128)
EFMICON("fifo","icon_efm_file.png", 128) //EFMICON("fifo","icon_efm_file.png", 128)
EFMICON("socket","icon_efm_file.png", 128) //EFMICON("socket","icon_efm_file.png", 128)
EFMICON("executable","icon_efm_file.png", 128) //EFMICON("executable","icon_efm_file.png", 128)
EFMICON("file","icon_efm_file.png", 128)
//EFMICON("home","icon_efm_home.png", 128) //EFMICON("home","icon_efm_home.png", 128)
//EFMICON("root","icon_efm_root.png", 128) //EFMICON("root","icon_efm_root.png", 128)
//EFMICON("tmp","icon_efm_tmp.png", 128) //EFMICON("tmp","icon_efm_tmp.png", 128)
@ -24364,6 +24364,14 @@ MIMEICON("application/x-bzip2-compressed-tar","icon_mime_package.png",128);
MIMEICON("application/x-compressed-tar","icon_mime_package.png",128); MIMEICON("application/x-compressed-tar","icon_mime_package.png",128);
MIMEICON("application/x-tar","icon_mime_package.png", 128); MIMEICON("application/x-tar","icon_mime_package.png", 128);
MIMEICON("application/x-rar","icon_mime_package.png", 128); MIMEICON("application/x-rar","icon_mime_package.png", 128);
MIMEICON("inode/chardevice","icon_efm_file.png", 128);
MIMEICON("inode/blockdevice","icon_efm_file.png", 128);
MIMEICON("inode/fifo","icon_efm_file.png", 128);
MIMEICON("inode/socket","icon_efm_file.png", 128);
MIMEICON("inode/directory","icon_efm_folder.png", 128);
MIMEICON("inode/file","icon_efm_file.png", 128);
MIMEICON("application/octet-stream","icon_efm_file.png", 128);
MIMEICON("application/x-executable","icon_mime_executable_generic.png", 128);
// Dynamic MIME Icons // // Dynamic MIME Icons //

View File

@ -1860,43 +1860,6 @@ _e_fm2_icon_explicit_get(Evas *evas, const E_Fm2_Icon *ic, const char *icon, con
return NULL; return NULL;
} }
/**
* Find out a good fallback to use for given file.
*
* It will find out if it is a folder, file or like and set it accordingly.
*/
static Evas_Object *
_e_fm2_icon_fallback_get(Evas *evas, const E_Fm2_Icon *ic, const char **type_ret)
{
const char *name;
if (S_ISDIR(ic->info.statinfo.st_mode))
name = "folder";
else if (S_ISCHR(ic->info.statinfo.st_mode))
name = "chrdev";
else if (S_ISBLK(ic->info.statinfo.st_mode))
name = "blkdev";
else if (S_ISFIFO(ic->info.statinfo.st_mode))
name = "fifo";
else if (S_ISSOCK(ic->info.statinfo.st_mode))
name = "socket";
else
{
char buf[PATH_MAX];
if (!_e_fm2_icon_realpath(ic, buf, sizeof(buf)))
name = "file";
else
{
if (ecore_file_can_exec(buf))
name = "executable";
else
name = "file";
}
}
return _e_fm2_icon_explicit_theme_get(evas, ic, name, type_ret);
}
/** /**
* Creates an icon that generates a thumbnail if required. * Creates an icon that generates a thumbnail if required.
* *
@ -2095,10 +2058,21 @@ _e_fm2_icon_mime_get(Evas *evas, const E_Fm2_Icon *ic, void (*gen_func) (void *d
Evas_Object *o; Evas_Object *o;
const char *icon; const char *icon;
if (ic->info.mime == _e_fm2_mime_app_edje) /* create thumbnails for edje files */
return _e_fm2_icon_thumb_edje_get if (_e_fm2_file_is_edje(ic->info.file))
(evas, ic, gen_func, data, force_gen, type_ret); {
o = _e_fm2_icon_thumb_edje_get
(evas, ic, gen_func, data, force_gen, type_ret);
if (o) return o;
}
/* disabled until everyone has edje in mime.types:
* use mimetype to identify edje.
* if (ic->info.mime == _e_fm2_mime_app_edje)
* return _e_fm2_icon_thumb_edje_get
* (evas, ic, gen_func, data, force_gen, type_ret); */
/* check user preferences */
icon = _e_fm2_icon_mime_type_special_match(ic); icon = _e_fm2_icon_mime_type_special_match(ic);
if (icon) if (icon)
{ {
@ -2109,8 +2083,8 @@ _e_fm2_icon_mime_get(Evas *evas, const E_Fm2_Icon *ic, void (*gen_func) (void *d
return _e_fm2_icon_thumb_get return _e_fm2_icon_thumb_get
(evas, ic, NULL, gen_func, data, force_gen, type_ret); (evas, ic, NULL, gen_func, data, force_gen, type_ret);
} }
else if (strncmp(icon, "e/icons/fileman/mime/", 21) == 0) else if (strncmp(icon, "e/icons/fileman/", 16) == 0)
return _e_fm2_icon_explicit_theme_get(evas, ic, icon + 21 - 5, type_ret); return _e_fm2_icon_explicit_theme_get(evas, ic, icon + 16, type_ret);
else else
return _e_fm2_icon_explicit_get(evas, ic, icon, type_ret); return _e_fm2_icon_explicit_get(evas, ic, icon, type_ret);
} }
@ -2128,20 +2102,22 @@ _e_fm2_icon_mime_get(Evas *evas, const E_Fm2_Icon *ic, void (*gen_func) (void *d
o = _e_fm2_icon_mime_theme_get(evas, ic, type_ret); o = _e_fm2_icon_mime_theme_get(evas, ic, type_ret);
if (o) return o; if (o) return o;
return NULL;
/* XXX REMOVE/DEPRECATED below here */ /* XXX REMOVE/DEPRECATED below here */
icon = e_fm_mime_icon_get(ic->info.mime); /* icon = e_fm_mime_icon_get(ic->info.mime);
if (!icon) return NULL; * if (!icon) return NULL;
*
if (icon == _e_fm2_icon_desktop_str) * if (icon == _e_fm2_icon_desktop_str)
return _e_fm2_icon_desktop_get(evas, ic, type_ret); * return _e_fm2_icon_desktop_get(evas, ic, type_ret);
else if (icon == _e_fm2_icon_thumb_str) * else if (icon == _e_fm2_icon_thumb_str)
return _e_fm2_icon_thumb_get(evas, ic, NULL, * return _e_fm2_icon_thumb_get(evas, ic, NULL,
gen_func, data, force_gen, type_ret); * gen_func, data, force_gen, type_ret);
else if (strncmp(icon, "e/icons/fileman/mime/", 21) == 0) * else if (strncmp(icon, "e/icons/fileman/", 16) == 0)
return _e_fm2_icon_explicit_theme_get(evas, ic, icon + 21 - 5, type_ret); * return _e_fm2_icon_explicit_theme_get(evas, ic, icon + 16, type_ret);
else * else
return _e_fm2_icon_explicit_get(evas, ic, icon, type_ret); * return _e_fm2_icon_explicit_get(evas, ic, icon, type_ret); */
} }
/** /**
@ -2282,7 +2258,7 @@ e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic,
} }
fallback: fallback:
return _e_fm2_icon_fallback_get(evas, ic, type_ret); return _e_fm2_icon_explicit_theme_get(evas, ic, "text/plain", type_ret);
} }
EAPI E_Fm2_Icon_Info * EAPI E_Fm2_Icon_Info *