Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_paned.c Log Message: use ewl_container_child_count_visible_get() =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_paned.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -3 -r1.52 -r1.53 --- ewl_paned.c 1 Apr 2007 21:48:06 -0000 1.52 +++ ewl_paned.c 9 Jul 2007 19:43:25 -0000 1.53 @@ -37,7 +37,6 @@ static void ewl_paned_grabbers_update(Ewl_Paned *p); static void ewl_paned_layout_setup(void); static Ewl_Widget *ewl_paned_grabber_next(Ewl_Paned *p); -static int ewl_paned_visible_panes(Ewl_Paned *p); static int ewl_paned_widgets_place(Ewl_Paned *p, Ewl_Paned_Layout *layout); /** @@ -422,7 +421,8 @@ /* we need to now the number of panes * minus one because we cannot change the size of the * last pane directly*/ - resizable = pane_num = ewl_paned_visible_panes(p) - 1; + pane_num = (ewl_container_child_count_visible_get(c) + 1)/2 - 1; + resizable = pane_num; /* We now resize the pane areas so that they fit into the new size * therefor we have to first calculate, how many space is available * for giving or taking it from the panes */ @@ -1067,29 +1067,6 @@ } DRETURN_INT(child, DLEVEL_STABLE); -} - -static int -ewl_paned_visible_panes(Ewl_Paned *p) -{ - Ewl_Container *c; - Ewl_Widget *child; - int i = 0; - - DENTER_FUNCTION(DLEVEL_STABLE); - DCHECK_PARAM_PTR_RET("p", p, 0); - DCHECK_TYPE_RET("p", p, EWL_PANED_TYPE, 0); - - c = EWL_CONTAINER(p); - - ecore_dlist_goto_first(c->children); - while ((child = ecore_dlist_next(c->children))) - { - if (VISIBLE(child) && !EWL_PANED_GRABBER_IS(child)) - i++; - } - - DRETURN_INT(i, DLEVEL_STABLE); } static void ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs