diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c index 1a2ac0199..205aa3cbd 100644 --- a/src/bin/e_utils.c +++ b/src/bin/e_utils.c @@ -839,11 +839,19 @@ e_util_desktop_icon_add(Efreet_Desktop *desktop, const char *size, Evas *evas) { if ((!desktop) || (!desktop->icon)) return NULL; - if (desktop->icon[0] == '/') return e_util_icon_add(desktop->icon, evas); + return e_util_icon_theme_icon_add(desktop->icon, size, evas); +} + +EAPI Evas_Object * +e_util_icon_theme_icon_add(const char *icon_name, const char *size, Evas *evas) +{ + if (!icon_name) return NULL; + if (icon_name[0] == '/') return e_util_icon_add(icon_name, evas); else { const char *path; - path = efreet_icon_path_find(e_config->icon_theme, desktop->icon, size); + path = efreet_icon_path_find(e_config->icon_theme, icon_name, size); + printf("path: %s\n", path); if (path) return e_util_icon_add(path, evas); } return NULL; diff --git a/src/bin/e_utils.h b/src/bin/e_utils.h index 94f12a591..91a486e65 100644 --- a/src/bin/e_utils.h +++ b/src/bin/e_utils.h @@ -49,6 +49,7 @@ EAPI void e_util_library_path_strip(void); EAPI void e_util_library_path_restore(void); EAPI Evas_Object *e_util_icon_add(const char *path, Evas *evas); EAPI Evas_Object *e_util_desktop_icon_add(Efreet_Desktop *desktop, const char *size, Evas *evas); +EAPI Evas_Object * e_util_icon_theme_icon_add(const char *icon_name, const char *size, Evas *evas); EAPI void e_util_desktop_menu_item_icon_add(Efreet_Desktop *desktop, const char *size, E_Menu_Item *mi); #endif