* @param obj Object being edited.
* @param alias The font alias
*
- * @return EINA_TRUE if font deleted, EINA_FALSE otherwise.
+ * @return EINA_TRUE if succesful, EINA_FALSE otherwise (including the
+ * case when the alias is not valid).
*/
EAPI Eina_Bool edje_edit_font_del(Evas_Object *obj, const char* alias);
* @param obj Object being edited.
* @param name The name of the image file to include in the edje.
*
- * @return EINA_TRUE if succesful, EINA_FALSE otherwise.
+ * @return EINA_TRUE if succesful, EINA_FALSE otherwise (including the
+ * case when the name is not valid).
*/
EAPI Eina_Bool edje_edit_image_del(Evas_Object *obj, const char *name);
if (!fnt)
{
WRN("Unable to find font entry part \"%s\"", alias);
- return EINA_TRUE;
+ return EINA_FALSE;
}
/* Erase font to edje file */
/* Create Image_Directory if not exist */
if (!ed->file->image_dir)
+ goto invalid_image;
+
return EINA_TRUE;
for (i = 0; i < ed->file->image_dir->entries_count; ++i)
}
if (i == ed->file->image_dir->entries_count)
- {
- WRN("Unable to find image entry part \"%s\"", name);
- return EINA_TRUE;
- }
+ goto invalid_image;
{
char entry[PATH_MAX];
de->entry = NULL;
return EINA_TRUE;
+
+invalid_image:
+ WRN("Unable to find image entry part \"%s\"", name);
+ return EINA_FALSE;
}
EAPI Eina_Bool