devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=bc9bccb2b652f927d1205f6a04454bf6888da06a
commit bc9bccb2b652f927d1205f6a04454bf6888da06a Author: Mike Blumenkrantz <[email protected]> Date: Tue Jun 19 11:58:24 2018 -0400 make e_comp_object_frame_icon_update() have a bool return for success Reviewers: ManMower, devilhorns Reviewed By: devilhorns Subscribers: cedric Tags: #enlightenment-git Differential Revision: https://phab.enlightenment.org/D6315 --- src/bin/e_comp_object.c | 10 ++++++---- src/bin/e_comp_object.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 4e5c0cd4f..5671fdae4 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3446,18 +3446,20 @@ e_comp_object_frame_exists(Evas_Object *obj) return !!cw->frame_object; } -E_API void +E_API Eina_Bool e_comp_object_frame_icon_update(Evas_Object *obj) { - API_ENTRY; + API_ENTRY EINA_FALSE; E_FREE_FUNC(cw->frame_icon, evas_object_del); + if (!cw->frame_object) return EINA_FALSE; if (!edje_object_part_exists(cw->frame_object, "e.swallow.icon")) - return; + return EINA_TRUE; cw->frame_icon = e_client_icon_add(cw->ec, e_comp->evas); - if (!cw->frame_icon) return; + if (!cw->frame_icon) return EINA_TRUE; if (!edje_object_part_swallow(cw->frame_object, "e.swallow.icon", cw->frame_icon)) E_FREE_FUNC(cw->frame_icon, evas_object_del); + return EINA_TRUE; } static void diff --git a/src/bin/e_comp_object.h b/src/bin/e_comp_object.h index 7cd170103..06273cfcf 100644 --- a/src/bin/e_comp_object.h +++ b/src/bin/e_comp_object.h @@ -64,7 +64,7 @@ E_API void e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int E_API void e_comp_object_frame_icon_geometry_get(Evas_Object *obj, int *x, int *y, int *w, int *h); E_API Eina_Bool e_comp_object_frame_title_set(Evas_Object *obj, const char *name); E_API Eina_Bool e_comp_object_frame_exists(Evas_Object *obj); -E_API void e_comp_object_frame_icon_update(Evas_Object *obj); +E_API Eina_Bool e_comp_object_frame_icon_update(Evas_Object *obj); E_API Eina_Bool e_comp_object_frame_theme_set(Evas_Object *obj, const char *name); E_API void e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src); E_API void e_comp_object_signal_callback_add(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb, const void *data); --
