Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_row.c 


Log Message:
Improved row layout.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_row.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_row.c   16 Feb 2006 21:52:42 -0000      1.16
+++ ewl_row.c   30 Mar 2006 06:32:05 -0000      1.17
@@ -78,26 +78,8 @@
        if (row->header == header)
                DRETURN(DLEVEL_STABLE);
 
-       /*
-       if (row->header) {
-               ewl_callback_del_with_data(EWL_WIDGET(row->header),
-                                          EWL_CALLBACK_CONFIGURE,
-                                          ewl_row_header_configure_cb, row);
-               ewl_callback_del_with_data(EWL_WIDGET(row->header),
-                                          EWL_CALLBACK_DESTROY,
-                                          ewl_row_header_destroy_cb, row);
-       }
-       */
-
        row->header = header;
        if (header) {
-               /*
-               ewl_callback_append(EWL_WIDGET(header), EWL_CALLBACK_CONFIGURE,
-                                       ewl_row_header_configure_cb, row);
-               ewl_callback_prepend(EWL_WIDGET(header), EWL_CALLBACK_DESTROY,
-                                       ewl_row_header_destroy_cb, row);
-                                       */
-
                ewl_object_fill_policy_set(EWL_OBJECT(row),
                                           EWL_FLAG_FILL_HFILL);
 
@@ -150,8 +132,14 @@
        x = CURRENT_X(w);
        remains = CURRENT_W(w);
 
-       nodes = ecore_dlist_nodes(c->children);
-       ecore_dlist_goto_first(c->children);
+       nodes = 0;
+       ewl_container_child_iterate_begin(c);
+       while ((child = ewl_container_child_next(c))) {
+               if (VISIBLE(child))
+                       nodes++;
+       }
+
+       ewl_container_child_iterate_begin(c);
 
        /*
         * This should be the common case, a row bounded by a set of fields,
@@ -175,12 +163,12 @@
                        x = CURRENT_X(w);
 
                /*
-                * Iterate over the children and position the children.
+                * Iterate over the children and position the header children.
                 */
                ewl_container_child_iterate_begin(EWL_CONTAINER(hdr));
-               while ((child = ecore_dlist_next(c->children))) {
+               while ((child = ewl_container_child_next(c))) {
                        align = 
EWL_OBJECT(ewl_container_child_next(EWL_CONTAINER(hdr)));
-                       if (align)
+                       if (align && VISIBLE(align))
                                width = ewl_object_current_x_get(align) + 
ewl_object_current_w_get(align) - x;
                        else if (nodes)
                                width = remains / nodes;
@@ -205,7 +193,7 @@
         */
        else {
                int tx = x;
-               while ((child = ecore_dlist_next(c->children))) {
+               while ((child = ewl_container_child_next(c))) {
                        int portion;
 
                        /*




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to