From 1b802b0e3a62cabb03f41754596675c61938a682 Mon Sep 17 00:00:00 2001 From: "m.biliavskyi" Date: Wed, 30 Oct 2013 08:40:11 +0900 Subject: [PATCH] Return Eina_Bool value for method which deleting style from edje_edit object. Summary: This patch start returning Eina_Bool for deleting style from edje edit object to catch those error. Reviewers: cedric CC: reutskiy.v.v, seoz Differential Revision: https://phab.enlightenment.org/D290 --- src/lib/edje/Edje_Edit.h | 4 +++- src/lib/edje/edje_edit.c | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index 40626dbd91..1a6d037ffe 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -572,8 +572,10 @@ EAPI Eina_Bool edje_edit_style_add(Evas_Object *obj, const char *style); * * @param obj Object being edited. * @param style Style to delete. + * + * @return EINA_TRUE if successful, EINA_FALSE otherwise. */ -EAPI void edje_edit_style_del(Evas_Object *obj, const char *style); +EAPI Eina_Bool edje_edit_style_del(Evas_Object *obj, const char *style); /** Get the list of all the tags name in the given text style. * diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 1999f49ef8..90cb4cf70c 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -1590,16 +1590,15 @@ edje_edit_style_add(Evas_Object * obj, const char* style) return EINA_TRUE; } -EAPI void +EAPI Eina_Bool edje_edit_style_del(Evas_Object * obj, const char* style) { Edje_Style *s; - GET_ED_OR_RETURN(); - //printf("DEL STYLE '%s'\n", style); + GET_ED_OR_RETURN(EINA_FALSE); s = _edje_edit_style_get(ed, style); - if (!s) return; + if (!s) return EINA_FALSE; ed->file->styles = eina_list_remove(ed->file->styles, s); @@ -1622,9 +1621,9 @@ edje_edit_style_del(Evas_Object * obj, const char* style) free(s); s = NULL; s = NULL; + return EINA_TRUE; } - EAPI Eina_List * edje_edit_style_tags_list_get(Evas_Object * obj, const char* style) {