Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_box.c
Log Message:
- make sure the box has children before attempting to set their spacing in the
box
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- ewl_box.c 1 Oct 2004 19:44:46 -0000 1.72
+++ ewl_box.c 8 Dec 2004 21:17:27 -0000 1.73
@@ -151,7 +151,7 @@
*/
void ewl_box_orientation_set(Ewl_Box * b, Ewl_Orientation o)
{
- Ewl_Widget *w;
+ Ewl_Widget *w, *c;
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("b", b);
@@ -166,14 +166,17 @@
DRETURN(DLEVEL_STABLE);
b->orientation = o;
- if (b->homogeneous)
- ewl_box_child_homogeneous_show_cb(EWL_CONTAINER(b),
+
+ /* only try this if we have children */
+ c = ecore_list_goto_first(EWL_CONTAINER(b)->children);
+ if (c) {
+ if (b->homogeneous)
+ ewl_box_child_homogeneous_show_cb(EWL_CONTAINER(b),
ecore_list_goto_first(EWL_CONTAINER(b)->children));
- else
- ewl_box_child_show_cb(EWL_CONTAINER(b),
+ else
+ ewl_box_child_show_cb(EWL_CONTAINER(b),
ecore_list_goto_first(EWL_CONTAINER(b)->children));
-
-
+ }
ewl_widget_configure(w);
DLEAVE_FUNCTION(DLEVEL_STABLE);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs