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
*
* @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.
*
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);
free(s);
s = NULL;
s = NULL;
+ return EINA_TRUE;
}
-
EAPI Eina_List *
edje_edit_style_tags_list_get(Evas_Object * obj, const char* style)
{