From: Hannes Janetzek Date: Thu, 20 May 2010 04:38:53 +0000 (+0000) Subject: reorder get_file_icon to get theme icons for mount points X-Git-Tag: submit/efl/20131021.015651~7417 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3e9a1d7eb9eb69a79fd4d8751260e2f7eabe514;p=platform%2Fupstream%2Fenlightenment.git reorder get_file_icon to get theme icons for mount points SVN revision: 49048 --- diff --git a/src/modules/everything/evry_plug_view_thumb.c b/src/modules/everything/evry_plug_view_thumb.c index cec8ecc..6831c61 100644 --- a/src/modules/everything/evry_plug_view_thumb.c +++ b/src/modules/everything/evry_plug_view_thumb.c @@ -157,7 +157,7 @@ _thumb_idler(void *data) if ((CHECK_TYPE(it->item, EVRY_TYPE_FILE)) && ((!it->thumb && !(it->have_thumb || it->do_thumb)) && (it->get_thumb || _check_item(it->item) || - (it->item->icon && it->item->icon[0])))) + (it->item->icon && it->item->icon[0] == '/')))) { it->get_thumb = EINA_TRUE; diff --git a/src/modules/everything/evry_util.c b/src/modules/everything/evry_util.c index c57089e..e6756e8 100644 --- a/src/modules/everything/evry_util.c +++ b/src/modules/everything/evry_util.c @@ -422,6 +422,7 @@ _evry_icon_fdo_set(Evas_Object *obj, const char *icon) if ((!icon) || (!icon[0])) return 0; path = efreet_icon_path_find(e_config->icon_theme, icon, 128); + printf("path %s\n", path); if (!path) return 0; e_icon_scale_size_set(obj, 128); @@ -508,22 +509,25 @@ _file_icon_get(Evry_Item *it, Evas *e) Evas_Object *o = NULL; GET_FILE(file, it); - if (it->browseable) - { - return evry_icon_theme_get("folder", e); - } - if (it->icon) { o = e_icon_add(e); - if (!e_icon_file_set(o, it->icon)) + + if (it->icon[0] == '/') { - evas_object_del(o); - o = NULL; + if (!e_icon_file_set(o, it->icon)) + { + evas_object_del(o); + o = NULL; + } + } + else + { + o = evry_icon_theme_get(it->icon, e); } } - if ((!o) && (!it->icon) && file->mime && + if (!(o) && (!it->icon) && file->mime && ((!strncmp(file->mime, "image/", 6)) || (!strncmp(file->mime, "video/", 6)) || (!strncmp(file->mime, "application/pdf", 15))) && @@ -542,7 +546,10 @@ _file_icon_get(Evry_Item *it, Evas *e) it->icon = eina_stringshare_add(""); } - if ((!o) && file->mime) + if (!(o) &&it->browseable) + o = evry_icon_theme_get("folder", e); + + if (!(o) && file->mime) o = evry_icon_mime_get(file->mime, e); if (!o) @@ -556,16 +563,16 @@ evry_util_icon_get(Evry_Item *it, Evas *e) { Evas_Object *o = NULL; + if (!o && it->icon_get) + o = it->icon_get(it, e); + if (o) return o; + if (CHECK_TYPE(it, EVRY_TYPE_FILE)) o = _file_icon_get(it, e); - else - { - if (!o && it->icon_get) - o = it->icon_get(it, e); + if (o) return o; - if (!o && it->icon) - o = evry_icon_theme_get(it->icon, e); - } + if (!o && it->icon) + o = evry_icon_theme_get(it->icon, e); return o; }