summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2016-05-21 10:14:45 +0100
committerAndy Williams <andy@andywilliams.me>2016-05-21 10:14:45 +0100
commitdde7aefa69721065942434e69a1709d03579ce48 (patch)
treeecc9a8bf21eb4fde7e57574ef57da5882ceff72e
parent278ec8383ab50f3b471c800da574bdc79ba6947e (diff)
downloadefl-dde7aefa69721065942434e69a1709d03579ce48.tar.gz
elementary: Add correct icon fallback for fdo icons
Fixes missing app icons (and others) when using elementary icon theme. This is required to comply with the fdo icon spec. Now that we have a fuller icon theme in elementary it's not intrusive
-rw-r--r--src/lib/elementary/elm_icon.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index a39a16a0f6..4b3b1a4205 100644
--- a/src/lib/elementary/elm_icon.c
+++ b/src/lib/elementary/elm_icon.c
@@ -260,6 +260,7 @@ _icon_thumb_apply_cb(void *data,
static Eina_Bool
_icon_freedesktop_set(Evas_Object *obj,
+ const char *theme,
const char *name,
int size)
{
@@ -268,8 +269,10 @@ _icon_freedesktop_set(Evas_Object *obj,
ELM_ICON_DATA_GET(obj, sd);
elm_need_efreet();
+ if (!theme)
+ theme = elm_config_icon_theme_get();
- path = efreet_icon_path_find(elm_config_icon_theme_get(), name, size);
+ path = efreet_icon_path_find(theme, name, size);
sd->freedesktop.use = !!path;
if (sd->freedesktop.use)
{
@@ -422,10 +425,16 @@ _internal_elm_icon_standard_set(Evas_Object *obj,
{
ret = _icon_standard_set(obj, name);
if (ret && fdo) *fdo = EINA_FALSE;
+
+ if (!ret)
+ {
+ ret = _icon_freedesktop_set(obj, "hicolor", name, _icon_size_min_get(obj));
+ if (ret && fdo) *fdo = EINA_TRUE;
+ }
}
else
{
- ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
+ ret = _icon_freedesktop_set(obj, NULL, name, _icon_size_min_get(obj));
if (ret && fdo) *fdo = EINA_TRUE;
}