seoz pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1b802b0e3a62cabb03f41754596675c61938a682

commit 1b802b0e3a62cabb03f41754596675c61938a682
Author: m.biliavskyi <[email protected]>
Date:   Wed Oct 30 08:40:11 2013 +0900

    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 40626db..1a6d037 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 1999f49..90cb4cf 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)
 {

-- 


Reply via email to