diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2014-05-08 15:59:32 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2014-05-08 17:00:15 -0400 |
commit | 61c12820156f50b6d14ac12b468e6162fc3d700b (patch) | |
tree | 90fbb7e9516d296cdf0a838dfcd10e06d7c7b1bb | |
parent | 275e20b2bcc2602642813d88c227a61e66042fd2 (diff) | |
download | enlightenment-61c12820156f50b6d14ac12b468e6162fc3d700b.tar.gz |
bugfix: fix systray appindicator icon loading
fix T811
-rw-r--r-- | src/modules/systray/e_mod_notifier_host.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/modules/systray/e_mod_notifier_host.c b/src/modules/systray/e_mod_notifier_host.c index 195dd9f298..95b4938903 100644 --- a/src/modules/systray/e_mod_notifier_host.c +++ b/src/modules/systray/e_mod_notifier_host.c @@ -66,13 +66,27 @@ systray_notifier_item_free(Notifier_Item *item) static void image_load(const char *name, const char *path, Evas_Object *image) { - if (path && strlen(path)) + const char *exts[] = + { + ".png", + ".jpg", + NULL + }; + if (path && path[0]) { - char buf[1024]; - sprintf(buf, "%s/%s", path, name); + char buf[PATH_MAX]; + + snprintf(buf, sizeof(buf), "%s/%s", path, name); if (!e_icon_file_set(image, buf)) - e_util_icon_theme_set(image, "dialog-error"); - return; + { + const char **ext; + + for (ext = exts; *ext; ext++) + { + snprintf(buf, sizeof(buf), "%s/%s%s", path, name, *ext); + if (e_icon_file_set(image, buf)) return; + } + } } if (!e_util_icon_theme_set(image, name)) e_util_icon_theme_set(image, "dialog-error"); |