summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-02-23 17:22:51 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-02-23 17:22:51 -0500
commitf6b3c1533ee7fe93898fca90d8e1fc571eecd810 (patch)
tree5c6f828d953ffbbf5db56ba9ef4c0815e3037f81
parenta4477e16e47b11aefcb1ab93ba8e6afbe30bec7c (diff)
downloadenlightenment-f6b3c1533ee7fe93898fca90d8e1fc571eecd810.tar.gz
fix appindicator icon loading when using IconThemePath key
fix T1888
-rw-r--r--src/modules/systray/e_mod_notifier_host.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/modules/systray/e_mod_notifier_host.c b/src/modules/systray/e_mod_notifier_host.c
index 95b4938903..89a3d54014 100644
--- a/src/modules/systray/e_mod_notifier_host.c
+++ b/src/modules/systray/e_mod_notifier_host.c
@@ -66,7 +66,7 @@ systray_notifier_item_free(Notifier_Item *item)
static void
image_load(const char *name, const char *path, Evas_Object *image)
{
- const char *exts[] =
+ const char **ext, *exts[] =
{
".png",
".jpg",
@@ -75,16 +75,24 @@ image_load(const char *name, const char *path, Evas_Object *image)
if (path && path[0])
{
char buf[PATH_MAX];
+ const char **theme, *themes[] = { e_config->icon_theme, "hicolor", NULL };
- snprintf(buf, sizeof(buf), "%s/%s", path, name);
- if (!e_icon_file_set(image, buf))
+ for (theme = themes; *theme; theme++)
{
- const char **ext;
+ struct stat st;
+ unsigned int *i, sizes[] = { 24, 32, 48, 64, 128, 256, 0 };
- for (ext = exts; *ext; ext++)
+ snprintf(buf, sizeof(buf), "%s/%s", path, *theme);
+ if (stat(buf, &st)) continue;
+ for (i = sizes; *i; i++)
{
- snprintf(buf, sizeof(buf), "%s/%s%s", path, name, *ext);
- if (e_icon_file_set(image, buf)) return;
+ snprintf(buf, sizeof(buf), "%s/%s/%ux%u", path, *theme, *i, *i);
+ if (stat(buf, &st)) continue;
+ for (ext = exts; *ext; ext++)
+ {
+ snprintf(buf, sizeof(buf), "%s/%s/%ux%u/apps/%s%s", path, *theme, *i, *i, name, *ext);
+ if (e_icon_file_set(image, buf)) return;
+ }
}
}
}