diff --git a/data/themes/default.edc b/data/themes/default.edc index 5770b729f..78d345209 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -22701,7 +22701,7 @@ ICON("enlightenment/background","icon_wallpaper.png",64) ICON("enlightenment/picture","icon_wallpaper.png",64) ICON("enlightenment/gradient","icon_gradient.png",64) ICON("enlightenment/e","logo_white_128.png",64) -ICON("enlightenment/about","logo_black_128.png",64) +//ICON("enlightenment/about","logo_black_128.png",64) ICON("enlightenment/reset","icon_reset.png",128) ICON("enlightenment/exit","icon_logout.png",64) ICON("enlightenment/logout","icon_logout.png",128) diff --git a/src/bin/e_about.c b/src/bin/e_about.c index c8d8597ce..1dcd884af 100644 --- a/src/bin/e_about.c +++ b/src/bin/e_about.c @@ -98,5 +98,5 @@ EAPI void e_about_show(E_About *about) { e_obj_dialog_show((E_Obj_Dialog *)about); - e_obj_dialog_icon_set((E_Obj_Dialog *)about, "enlightenment/about"); + e_obj_dialog_icon_set((E_Obj_Dialog *)about, "help-about"); } diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 7c31acc6d..6a4c15a07 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -3120,10 +3120,12 @@ e_border_icon_add(E_Border *bd, Evas *evas) o = e_icon_add(evas); e_icon_file_set(o, bd->internal_icon); } - else + else { - if (!e_util_edje_icon_set(o, bd->internal_icon)) - e_util_edje_icon_set(o, "enlightenment/e"); + evas_object_del(o); + o = e_icon_add(evas); + if (!e_util_icon_theme_set(o, bd->internal_icon)) + e_util_icon_theme_set(o, "enlightenment/e"); } } else diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c index ccc2fa7fc..27a97cb8c 100644 --- a/src/bin/e_utils.c +++ b/src/bin/e_utils.c @@ -363,6 +363,10 @@ e_util_edje_icon_check(const char *name) return 0; } + +/* WARNING This function is deprecated,. must be made static. + * You should use e_util_theme_icon_set instead + */ EAPI int e_util_edje_icon_set(Evas_Object *obj, const char *name) { @@ -380,6 +384,55 @@ e_util_edje_icon_set(Evas_Object *obj, const char *name) return 0; } +static int +_e_util_icon_theme_set(Evas_Object *obj, const char *icon) +{ + const char *file; + char buf[4096]; + + if ((!icon) || (!icon[0])) return 0; + snprintf(buf, sizeof(buf), "e/icons/%s", icon); + file = e_theme_edje_file_get("base/theme/icons", buf); + if (file[0]) + { + e_icon_file_edje_set(obj, file, buf); + return 1; + } + return 0; +} + +static int +_e_util_icon_fdo_set(Evas_Object *obj, const char *icon) +{ + char *path = NULL; + unsigned int size; + + if ((!icon) || (!icon[0])) return 0; + size = e_util_icon_size_normalize(16 * e_scale); + path = efreet_icon_path_find(e_config->icon_theme, icon, 48); + if (!path) return 0; + e_icon_file_set(obj, path); + E_FREE(path); + return 1; +} + +EAPI int +e_util_icon_theme_set(Evas_Object *obj, const char *icon) +{ + if (e_config->icon_theme_overrides) + { + if (_e_util_icon_fdo_set(obj, icon)) + return 1; + return _e_util_icon_theme_set(obj, icon); + } + else + { + if (_e_util_icon_theme_set(obj, icon)) + return 1; + return _e_util_icon_fdo_set(obj, icon); + } +} + /* WARNING This function is deprecated, You should * use e_util_menu_item_theme_icon_set() instead. * It provide fallback (e theme <-> fdo theme) in both direction */ diff --git a/src/bin/e_utils.h b/src/bin/e_utils.h index 37736ea50..79ddc2142 100644 --- a/src/bin/e_utils.h +++ b/src/bin/e_utils.h @@ -32,6 +32,7 @@ EAPI int e_util_edje_icon_list_set(Evas_Object *obj, const char *list); EAPI int e_util_menu_item_edje_icon_list_set(E_Menu_Item *mi, const char *list); EAPI int e_util_edje_icon_check(const char *name); EAPI int e_util_edje_icon_set(Evas_Object *obj, const char *name); +EAPI int e_util_icon_theme_set(Evas_Object *obj, const char *icon); EAPI int e_util_menu_item_edje_icon_set(E_Menu_Item *mi, const char *name); EAPI unsigned int e_util_icon_size_normalize(unsigned int desired); EAPI int e_util_menu_item_theme_icon_set(E_Menu_Item *mi, const char *icon);