forked from enlightenment/enlightenment
reorder get_file_icon to get theme icons for mount points
SVN revision: 49048
This commit is contained in:
parent
d57aba55b1
commit
a3e9a1d7eb
|
@ -157,7 +157,7 @@ _thumb_idler(void *data)
|
||||||
if ((CHECK_TYPE(it->item, EVRY_TYPE_FILE)) &&
|
if ((CHECK_TYPE(it->item, EVRY_TYPE_FILE)) &&
|
||||||
((!it->thumb && !(it->have_thumb || it->do_thumb)) &&
|
((!it->thumb && !(it->have_thumb || it->do_thumb)) &&
|
||||||
(it->get_thumb || _check_item(it->item) ||
|
(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;
|
it->get_thumb = EINA_TRUE;
|
||||||
|
|
||||||
|
|
|
@ -422,6 +422,7 @@ _evry_icon_fdo_set(Evas_Object *obj, const char *icon)
|
||||||
|
|
||||||
if ((!icon) || (!icon[0])) return 0;
|
if ((!icon) || (!icon[0])) return 0;
|
||||||
path = efreet_icon_path_find(e_config->icon_theme, icon, 128);
|
path = efreet_icon_path_find(e_config->icon_theme, icon, 128);
|
||||||
|
printf("path %s\n", path);
|
||||||
|
|
||||||
if (!path) return 0;
|
if (!path) return 0;
|
||||||
e_icon_scale_size_set(obj, 128);
|
e_icon_scale_size_set(obj, 128);
|
||||||
|
@ -508,22 +509,25 @@ _file_icon_get(Evry_Item *it, Evas *e)
|
||||||
Evas_Object *o = NULL;
|
Evas_Object *o = NULL;
|
||||||
GET_FILE(file, it);
|
GET_FILE(file, it);
|
||||||
|
|
||||||
if (it->browseable)
|
|
||||||
{
|
|
||||||
return evry_icon_theme_get("folder", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
o = e_icon_add(e);
|
o = e_icon_add(e);
|
||||||
if (!e_icon_file_set(o, it->icon))
|
|
||||||
|
if (it->icon[0] == '/')
|
||||||
{
|
{
|
||||||
evas_object_del(o);
|
if (!e_icon_file_set(o, it->icon))
|
||||||
o = NULL;
|
{
|
||||||
|
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, "image/", 6)) ||
|
||||||
(!strncmp(file->mime, "video/", 6)) ||
|
(!strncmp(file->mime, "video/", 6)) ||
|
||||||
(!strncmp(file->mime, "application/pdf", 15))) &&
|
(!strncmp(file->mime, "application/pdf", 15))) &&
|
||||||
|
@ -542,7 +546,10 @@ _file_icon_get(Evry_Item *it, Evas *e)
|
||||||
it->icon = eina_stringshare_add("");
|
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);
|
o = evry_icon_mime_get(file->mime, e);
|
||||||
|
|
||||||
if (!o)
|
if (!o)
|
||||||
|
@ -556,16 +563,16 @@ evry_util_icon_get(Evry_Item *it, Evas *e)
|
||||||
{
|
{
|
||||||
Evas_Object *o = NULL;
|
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))
|
if (CHECK_TYPE(it, EVRY_TYPE_FILE))
|
||||||
o = _file_icon_get(it, e);
|
o = _file_icon_get(it, e);
|
||||||
else
|
if (o) return o;
|
||||||
{
|
|
||||||
if (!o && it->icon_get)
|
|
||||||
o = it->icon_get(it, e);
|
|
||||||
|
|
||||||
if (!o && it->icon)
|
if (!o && it->icon)
|
||||||
o = evry_icon_theme_get(it->icon, e);
|
o = evry_icon_theme_get(it->icon, e);
|
||||||
}
|
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue