Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_misc.c ewl_widget.c ewl_widget.h 


Log Message:
Fixup for various orderings of displaying widgets, also some simple debugging
printf's for widgets.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- ewl_misc.c  23 Oct 2003 00:36:21 -0000      1.46
+++ ewl_misc.c  28 Oct 2003 05:05:19 -0000      1.47
@@ -466,8 +466,10 @@
 {
        Ewl_Widget *search;
 
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
        if (ewl_object_has_queued(EWL_OBJECT(w), EWL_FLAG_QUEUED_RSCHEDULED))
-               return;
+               DRETURN(DLEVEL_STABLE);
 
        ewl_object_add_queued(EWL_OBJECT(w), EWL_FLAG_QUEUED_RSCHEDULED);
 
@@ -482,7 +484,7 @@
                while ((parent = parent->parent)) {
                        if (parent == w) {
                                ewd_list_insert(realize_list, w);
-                               return;
+                               DRETURN(DLEVEL_STABLE);
                        }
                }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- ewl_widget.c        22 Oct 2003 07:43:18 -0000      1.81
+++ ewl_widget.c        28 Oct 2003 05:05:20 -0000      1.82
@@ -176,19 +176,28 @@
 void ewl_widget_show(Ewl_Widget * w)
 {
        Ewl_Container *pc;
+       unsigned int flags = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
        pc = EWL_CONTAINER(w->parent);
-       if (HIDDEN(w)) {
+       if (HIDDEN(w))
                ewl_object_add_visible(EWL_OBJECT(w), EWL_FLAG_VISIBLE_SHOWN);
-       }
 
        if (REALIZED(w)) {
                ewl_callback_call(w, EWL_CALLBACK_SHOW);
        }
-       else
+       else if (pc) {
+               flags = ewl_object_get_flags(EWL_OBJECT(pc),
+                                            EWL_FLAG_QUEUED_RSCHEDULED);
+       }
+       else {
+               flags = ewl_object_get_flags(EWL_OBJECT(w),
+                                            EWL_FLAG_PROPERTY_TOPLEVEL);
+       }
+
+       if (flags)
                ewl_realize_request(w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -673,6 +682,44 @@
        w->appearance = strdup(path);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param w: the widget to display ancestry tree
+ * @return Returns no value.
+ * @brief Prints to stdout the tree of widgets that are parents of a widget.
+ */
+void ewl_widget_print_tree(Ewl_Widget *w)
+{
+       int i = 0;
+
+       while (w) {
+               int j;
+               for (j = 0; j < i; j++)
+                       printf("\t");
+
+               ewl_widget_print(w);
+
+               w = w->parent;
+               i++;
+       }
+}
+
+/**
+ * @param w: the widget to print info
+ * @return Returs no value.
+ * @brief Prints info for debugging a widget's state information.
+ */
+void ewl_widget_print(Ewl_Widget *w)
+{
+       printf("%p:%s geometry (%d, %d) %d x %d, %s, %s\n",
+                       w, w->appearance,
+                       ewl_object_get_current_x(EWL_OBJECT(w)),
+                       ewl_object_get_current_y(EWL_OBJECT(w)),
+                       ewl_object_get_current_w(EWL_OBJECT(w)),
+                       ewl_object_get_current_h(EWL_OBJECT(w)),
+                       (VISIBLE(w) ? "visible" : "not visible"),
+                       (REALIZED(w) ? "realized" : "not realized"));
 }
 
 /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- ewl_widget.h        16 Oct 2003 20:54:25 -0000      1.35
+++ ewl_widget.h        28 Oct 2003 05:05:20 -0000      1.36
@@ -137,6 +137,8 @@
  * Notify a widget to rebuild it's appearance string.
  */
 void            ewl_widget_rebuild_appearance(Ewl_Widget *w);
+void            ewl_widget_print_tree(Ewl_Widget *w);
+void            ewl_widget_print(Ewl_Widget *w);
 
 int             ewl_widget_get_layer_sum(Ewl_Widget *w);
 void            ewl_widget_set_layer(Ewl_Widget *w, int layer);




-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to