From 9d88fd3adeafe4249f3d6b54452b98b8c471f1bc Mon Sep 17 00:00:00 2001 From: sachiel Date: Tue, 20 Apr 2010 19:57:17 +0000 Subject: [PATCH] Add after_del() function git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@48177 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/Edje_Edit.h | 2 ++ src/lib/edje_edit.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/lib/Edje_Edit.h b/src/lib/Edje_Edit.h index 283ca33..b9802f6 100644 --- a/src/lib/Edje_Edit.h +++ b/src/lib/Edje_Edit.h @@ -2578,6 +2578,8 @@ edje_edit_program_after_add( const char *after ///< The name of another program to add to the afters list ); +EAPI Eina_Bool edje_edit_program_after_del(Evas_Object *obj, const char *prog, const char *after); + /**Clear the 'afters' list of the given program */ EAPI Eina_Bool ///@return 1 on success or 0 on errors edje_edit_program_afters_clear( diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 2675cf8..4e34b5f 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -5672,6 +5672,28 @@ edje_edit_program_after_add(Evas_Object *obj, const char *prog, const char *afte return 1; } +EAPI Eina_Bool +edje_edit_program_after_del(Evas_Object *obj, const char *prog, const char *after) +{ + Edje_Program *af; + Edje_Program_After *a; + const Eina_List *l; + + GET_EPR_OR_RETURN(EINA_FALSE); + + af = _edje_program_get_byname(obj, after); + if (!af) return EINA_FALSE; + + EINA_LIST_FOREACH(epr->after, l, a) + if (a->id == af->id) + { + epr->after = eina_list_remove_list(epr->after, l); + break; + } + + return EINA_TRUE; +} + /*************************/ /* EMBRYO SCRIPTS API */ /*************************/ -- 2.7.4