Return Eina_Bool value for method which deleting style from edje_edit object.
authorm.biliavskyi <m.biliavskyi@samsung.com>
Tue, 29 Oct 2013 23:40:11 +0000 (08:40 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Tue, 29 Oct 2013 23:40:11 +0000 (08:40 +0900)
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
src/lib/edje/edje_edit.c

index 40626db..1a6d037 100644 (file)
@@ -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.
  *
index 1999f49..90cb4cf 100644 (file)
@@ -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)
 {