edje: call edje_object_message_signal_process also on GROUP part Edje object.
authorcedric <cedric>
Mon, 6 Aug 2012 09:22:42 +0000 (09:22 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 6 Aug 2012 09:22:42 +0000 (09:22 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@74916 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/lib/edje_calc.c
src/lib/edje_message_queue.c
src/lib/edje_util.c

index f015eef..38512ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2012-07-29  Cedric Bail
 
        * Reduce potential reentrant issue when using edje_object_signal_emit.
+
+2012-08-06  Cedric Bail
+
+       * Call edje_object_message_signal_process also on GROUP part Edje object.
diff --git a/NEWS b/NEWS
index ecda60a..8d3403d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Fixes:
     * [entry] display preedit string even though there is no attribute
     * Fix shutdown of Edje_Multisense.
     * Reduce potential reentrant issue when using edje_object_signal_emit.
+    * Call edje_object_message_signal_process also on GROUP part Edje object.
 
 Edje 1.2.0
 
index 79e5438..78780d1 100644 (file)
@@ -2421,6 +2421,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
           {
              edje_object_update_hints_set(ep->swallowed_object, ep->param1.description->min.limit);
           }
+       if (edje_object_update_hints_get(ep->swallowed_object))
+         {
+             Edje *ted;
+
+             ted = _edje_fetch(ep->swallowed_object);
+             _edje_recalc_do(ted);
+         }
      }
 
 #ifdef EDJE_CALC_CACHE
index 5628ccc..d6479b2 100644 (file)
@@ -48,37 +48,47 @@ edje_object_message_handler_set(Evas_Object *obj, Edje_Message_Handler_Cb func,
    _edje_message_cb_set(ed, func, data);
 }
 
-
 EAPI void
 edje_object_message_signal_process(Evas_Object *obj)
 {
    Eina_List *l, *ln, *tmpq = NULL;
    Edje *ed;
+   Edje *lookup_ed;
+   Eina_List *lg;
    Edje_Message *em;
+   Eina_List *groups = NULL;
    int gotos = 0;
+   unsigned int i;
 
    ed = _edje_fetch(obj);
    if (!ed) return;
 
-   for (l = msgq; l; )
+   groups = eina_list_append(groups, ed);
+   for (i = 0; i < ed->table_parts_size; i++)
      {
-        ln = l->next;
-        em = l->data;
-        if (em->edje == ed)
-          {
-             tmpq = eina_list_append(tmpq, em);
-             msgq = eina_list_remove_list(msgq, l);
-          }
-        l = ln;
+        Edje_Real_Part *rp;
+
+        rp = ed->table_parts[i];
+        if (rp->part->type == EDJE_PART_TYPE_GROUP && rp->swallowed_object)
+          groups = eina_list_append(groups,
+                                    _edje_fetch(rp->swallowed_object));
+     }
+
+   EINA_LIST_FOREACH_SAFE(msgq, l, ln, em)
+     {
+        EINA_LIST_FOREACH(groups, lg, lookup_ed)
+          if (em->edje == lookup_ed)
+            {
+               tmpq = eina_list_append(tmpq, em);
+               msgq = eina_list_remove_list(msgq, l);
+               break;
+            }
      }
    /* a temporary message queue */
    if (tmp_msgq)
      {
-       while (tmpq)
-         {
-            tmp_msgq = eina_list_append(tmp_msgq, tmpq->data);
-            tmpq = eina_list_remove_list(tmpq, tmpq);
-         }
+        EINA_LIST_FREE(tmpq, em)
+          tmp_msgq = eina_list_append(tmp_msgq, em);
      }
    else
      {
@@ -90,20 +100,23 @@ edje_object_message_signal_process(Evas_Object *obj)
 again:
    EINA_LIST_FOREACH_SAFE(tmp_msgq, l, ln, em)
      {
-        if (em->edje != ed) continue;
+        EINA_LIST_FOREACH(groups, lg, lookup_ed)
+          if (em->edje == lookup_ed)
+            break;
+        if (em->edje != lookup_ed) continue;
        tmp_msgq = eina_list_remove_list(tmp_msgq, l);
-        if (!ed->delete_me)
+        if (!lookup_ed->delete_me)
           {
-             ed->processing_messages++;
+             lookup_ed->processing_messages++;
              _edje_message_process(em);
              _edje_message_free(em);
-             ed->processing_messages--;
+             lookup_ed->processing_messages--;
           }
         else
            _edje_message_free(em);
-        if (ed->processing_messages == 0)
+        if (lookup_ed->processing_messages == 0)
           {
-             if (ed->delete_me) _edje_del(ed);
+             if (lookup_ed->delete_me) _edje_del(lookup_ed);
           }
         // if some child callback in _edje_message_process called
         // edje_object_message_signal_process() or
@@ -133,7 +146,6 @@ end:
       tmp_msgq_restart = 1;
 }
 
-
 EAPI void
 edje_message_signal_process(void)
 {
index 989ba79..8fab256 100644 (file)
@@ -1149,6 +1149,10 @@ edje_object_part_text_style_user_push(Evas_Object *obj, const char *part,
    evas_object_textblock_style_user_push(rp->object, ts);
    evas_textblock_style_free(ts);
    ed->recalc_hints = 1;
+#ifdef EDJE_CALC_CACHE
+   rp->invalidate = 1;
+#endif
+   _edje_recalc(ed);
 }
 
 EAPI void
@@ -1165,6 +1169,10 @@ edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part)
 
    evas_object_textblock_style_user_pop(rp->object);
    ed->recalc_hints = 1;
+#ifdef EDJE_CALC_CACHE
+   rp->invalidate = 1;
+#endif
+   _edje_recalc(ed);
 }
 
 EAPI const char *
@@ -4462,7 +4470,11 @@ edje_object_update_hints_set(Evas_Object *obj, Eina_Bool update)
    if (ed->update_hints == !!update) return ;
 
    ed->update_hints = !!update;
-   if (update) ed->recalc_hints = 1;
+   if (update)
+     {
+        ed->recalc_hints = 1;
+        _edje_recalc(ed);
+     }
 }
 
 EAPI Eina_Bool