edje: unswallow object that are about to be swallowed.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jan 2012 10:07:45 +0000 (10:07 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jan 2012 10:07:45 +0000 (10:07 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@66934 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/lib/edje_util.c

index b042d09..ef648ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2012-01-05  Cedric Bail
 
        * Reduce call to stat during edje_object_file_set.
+
+2012-01-06  Cedric Bail
+
+       * Unswallow object that are about to be swallowed if necessary.
diff --git a/NEWS b/NEWS
index 40f14cc..c73e711 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Improvements:
     * speedup load time of Edje file.
     * check existence of group at compile time also.
     * reduce number of call to stat during edje_object_file_set.
+    * unswallow object about to be swallowed if necessary.
 
 Changes since Edje 1.0.0:
 -------------------------
index 6e0da6a..0e2aa8f 100644 (file)
@@ -1908,6 +1908,13 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
    // XXX: by Sachiel, January 21th 2009, 19:30 UTC
    _edje_recalc_do(ed);
 
+   rp = evas_object_data_get(obj_swallow, "\377 edje.swallowing_part");
+   if (rp)
+     {
+        /* The object is already swallowed somewhere, unswallow it first */
+        edje_object_part_unswallow(rp->edje->obj, obj_swallow);
+     }
+
    rp = _edje_real_part_recursive_get(ed, (char *)part);
    if (!rp) return EINA_FALSE;
    if (rp->part->type != EDJE_PART_TYPE_SWALLOW)