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
This commit is contained in:
Mike Blumenkrantz 2018-06-19 11:58:24 -04:00 committed by Chris Michael
parent 49459b6b72
commit bc9bccb2b6
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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);