Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_container.c 


Log Message:
Fix up showing and hiding the container clip box.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- ewl_container.c     25 Aug 2004 03:39:11 -0000      1.78
+++ ewl_container.c     5 Oct 2004 01:18:20 -0000       1.79
@@ -171,9 +171,6 @@
        while (pc->redirect)
                pc = pc->redirect;
 
-       if (ecore_list_is_empty(pc->children) && pc->clip_box)
-               evas_object_show(pc->clip_box);
-
        ecore_list_append(pc->children, child);
        ewl_widget_parent_set(child, EWL_WIDGET(pc));
        ewl_container_child_add_call(pc, child);
@@ -204,9 +201,6 @@
        while (pc->redirect)
                pc = pc->redirect;
 
-       if (ecore_list_is_empty(pc->children) && pc->clip_box)
-               evas_object_show(pc->clip_box);
-
        ecore_list_prepend(pc->children, child);
        ewl_widget_parent_set(child, EWL_WIDGET(pc));
        ewl_container_child_add_call(pc, child);
@@ -240,9 +234,6 @@
        while (pc->redirect)
                pc = pc->redirect;
 
-       if (ecore_list_is_empty(pc->children) && pc->clip_box)
-               evas_object_show(pc->clip_box);
-
        ecore_list_goto_index(pc->children, index);
        ecore_list_insert(pc->children, child);
        ewl_widget_parent_set(child, EWL_WIDGET(pc));
@@ -304,9 +295,6 @@
                ewl_container_child_hide_call(pc, child);
        ewl_container_child_remove_call(pc, child);
 
-       if (ecore_list_is_empty(pc->children) && pc->clip_box)
-               evas_object_hide(pc->clip_box);
-
        ewl_widget_configure(EWL_WIDGET(pc));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -776,6 +764,12 @@
        if (c->child_show && VISIBLE(w) && REALIZED(w))
                c->child_show(c, w);
 
+       /*
+        * Only show it if there are visible children.
+        */
+       if (c->clip_box)
+               evas_object_show(c->clip_box);
+
        ewl_widget_configure(EWL_WIDGET(c));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -789,11 +783,24 @@
  */
 void ewl_container_child_hide_call(Ewl_Container *c, Ewl_Widget *w)
 {
+       int hide = 1;
+
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        if (c->child_hide && VISIBLE(w) && REALIZED(w))
                c->child_hide(c, w);
 
+       ecore_list_goto_first(c->children);
+       while ((w = ecore_list_next(c->children))) {
+               if (VISIBLE(w)) {
+                       hide = 0;
+                       break;
+               }
+       }
+
+       if (hide && c->clip_box)
+               evas_object_hide(c->clip_box);
+
        ewl_widget_configure(EWL_WIDGET(c));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -964,12 +971,6 @@
                i++;
        }
 
-       /*
-        * Only show it if there are children, otherwise we get a colored box.
-        */
-       if (c->clip_box)
-               evas_object_show(c->clip_box);
-
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to