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)
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,
260 260
261static Eina_Bool 261static Eina_Bool
262_icon_freedesktop_set(Evas_Object *obj, 262_icon_freedesktop_set(Evas_Object *obj,
263 const char *theme,
263 const char *name, 264 const char *name,
264 int size) 265 int size)
265{ 266{
@@ -268,8 +269,10 @@ _icon_freedesktop_set(Evas_Object *obj,
268 ELM_ICON_DATA_GET(obj, sd); 269 ELM_ICON_DATA_GET(obj, sd);
269 270
270 elm_need_efreet(); 271 elm_need_efreet();
272 if (!theme)
273 theme = elm_config_icon_theme_get();
271 274
272 path = efreet_icon_path_find(elm_config_icon_theme_get(), name, size); 275 path = efreet_icon_path_find(theme, name, size);
273 sd->freedesktop.use = !!path; 276 sd->freedesktop.use = !!path;
274 if (sd->freedesktop.use) 277 if (sd->freedesktop.use)
275 { 278 {
@@ -422,10 +425,16 @@ _internal_elm_icon_standard_set(Evas_Object *obj,
422 { 425 {
423 ret = _icon_standard_set(obj, name); 426 ret = _icon_standard_set(obj, name);
424 if (ret && fdo) *fdo = EINA_FALSE; 427 if (ret && fdo) *fdo = EINA_FALSE;
428
429 if (!ret)
430 {
431 ret = _icon_freedesktop_set(obj, "hicolor", name, _icon_size_min_get(obj));
432 if (ret && fdo) *fdo = EINA_TRUE;
433 }
425 } 434 }
426 else 435 else
427 { 436 {
428 ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj)); 437 ret = _icon_freedesktop_set(obj, NULL, name, _icon_size_min_get(obj));
429 if (ret && fdo) *fdo = EINA_TRUE; 438 if (ret && fdo) *fdo = EINA_TRUE;
430 } 439 }
431 440