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
This commit is contained in:
m.biliavskyi 2013-10-30 08:40:11 +09:00 committed by Daniel Juyung Seo
parent 6b130d8b18
commit 1b802b0e3a
2 changed files with 7 additions and 6 deletions

View File

@ -572,8 +572,10 @@ EAPI Eina_Bool edje_edit_style_add(Evas_Object *obj, const char *style);
* *
* @param obj Object being edited. * @param obj Object being edited.
* @param style Style to delete. * @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. /** Get the list of all the tags name in the given text style.
* *

View File

@ -1590,16 +1590,15 @@ edje_edit_style_add(Evas_Object * obj, const char* style)
return EINA_TRUE; return EINA_TRUE;
} }
EAPI void EAPI Eina_Bool
edje_edit_style_del(Evas_Object * obj, const char* style) edje_edit_style_del(Evas_Object * obj, const char* style)
{ {
Edje_Style *s; Edje_Style *s;
GET_ED_OR_RETURN(); GET_ED_OR_RETURN(EINA_FALSE);
//printf("DEL STYLE '%s'\n", style);
s = _edje_edit_style_get(ed, style); 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); 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); free(s);
s = NULL; s = NULL;
s = NULL; s = NULL;
return EINA_TRUE;
} }
EAPI Eina_List * EAPI Eina_List *
edje_edit_style_tags_list_get(Evas_Object * obj, const char* style) edje_edit_style_tags_list_get(Evas_Object * obj, const char* style)
{ {