diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 3690a6b..7dbbf9d 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -93,6 +93,10 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
   container_class->set_child_property = gtk_button_box_set_child_property;
   container_class->get_child_property = gtk_button_box_get_child_property;
 
+  /* FIXME we need to override the "homogeneous" property on GtkBox
+   * and set it to TRUE by default
+   */
+
   /* FIXME we need to override the "spacing" property on GtkBox once
    * libgobject allows that.
    */
@@ -152,6 +156,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
 static void
 gtk_button_box_init (GtkButtonBox *button_box)
 {
+  GTK_BOX (button_box)->homogeneous = TRUE;
   GTK_BOX (button_box)->spacing = 0;
   button_box->child_min_width = GTK_BUTTONBOX_DEFAULT;
   button_box->child_min_height = GTK_BUTTONBOX_DEFAULT;
@@ -394,13 +399,52 @@ gtk_button_box_set_child_secondary (GtkButtonBox *widget,
     gtk_widget_queue_resize (child);
 }
 
-/* Ask children how much space they require and round up 
+void
+_gtk_button_box_child_size_props (GtkButtonBox *bbox,
+                                  gint         *child_min_width,
+                                  gint         *child_min_height,
+                                  gint         *ipad_width,
+                                  gint         *ipad_height)
+{
+  gint width_default;
+  gint height_default;
+  gint ipad_x_default;
+  gint ipad_y_default;
+  gint ipad_x;
+  gint ipad_y;
+
+  gtk_widget_style_get (GTK_WIDGET (bbox),
+                        "child-min-width", &width_default,
+                        "child-min-height", &height_default,
+                        "child-internal-pad-x", &ipad_x_default,
+                        "child-internal-pad-y", &ipad_y_default,
+                        NULL);
+
+  if (child_min_width)
+    *child_min_width = bbox->child_min_width != GTK_BUTTONBOX_DEFAULT
+                       ? bbox->child_min_width : width_default;
+  if (child_min_height)
+    *child_min_height = bbox->child_min_height != GTK_BUTTONBOX_DEFAULT
+                        ? bbox->child_min_height : height_default;
+
+  ipad_x = bbox->child_ipad_x != GTK_BUTTONBOX_DEFAULT
+           ? bbox->child_ipad_x : ipad_x_default;
+  ipad_y = bbox->child_ipad_y != GTK_BUTTONBOX_DEFAULT
+           ? bbox->child_ipad_y : ipad_y_default;
+
+  if (ipad_width)
+    *ipad_width = 2 * ipad_x;
+  if (ipad_height)
+    *ipad_height = 2 * ipad_y;
+}
+
+/* Ask children how much space they require and round up
    to match minimum size and internal padding.
    Returns the size each single child should have. */
 void
 _gtk_button_box_child_requisition (GtkWidget *widget,
                                    int       *nvis_children,
-				   int       *nvis_secondaries,
+                                   int       *nvis_secondaries,
                                    int       *width,
                                    int       *height)
 {
@@ -414,44 +458,22 @@ _gtk_button_box_child_requisition (GtkWidget *widget,
   GtkRequisition child_requisition;
   gint ipad_w;
   gint ipad_h;
-  gint width_default;
-  gint height_default;
-  gint ipad_x_default;
-  gint ipad_y_default;
-  
   gint child_min_width;
   gint child_min_height;
-  gint ipad_x;
-  gint ipad_y;
-  
+
   g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
 
   bbox = GTK_BUTTON_BOX (widget);
 
-  gtk_widget_style_get (widget,
-                        "child-min-width", &width_default,
-                        "child-min-height", &height_default,
-                        "child-internal-pad-x", &ipad_x_default,
-                        "child-internal-pad-y", &ipad_y_default, 
-			NULL);
-  
-  child_min_width = bbox->child_min_width   != GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_min_width : width_default;
-  child_min_height = bbox->child_min_height !=GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_min_height : height_default;
-  ipad_x = bbox->child_ipad_x != GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_ipad_x : ipad_x_default;
-  ipad_y = bbox->child_ipad_y != GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_ipad_y : ipad_y_default;
+  _gtk_button_box_child_size_props (bbox, &child_min_width, &child_min_height,
+                                    &ipad_w, &ipad_h);
 
   nchildren = 0;
   nsecondaries = 0;
-  children = GTK_BOX(bbox)->children;
+  children = GTK_BOX (bbox)->children;
   needed_width = child_min_width;
-  needed_height = child_min_height;  
-  ipad_w = ipad_x * 2;
-  ipad_h = ipad_y * 2;
-  
+  needed_height = child_min_height;
+
   while (children)
     {
       child = children->data;
@@ -498,6 +520,207 @@ gtk_button_box_kludge_get_layout_default (GtkButtonBox *widget)
     return _gtk_vbutton_box_get_layout_default ();
 }
 
+/* The aim is to layout buttons preferrably homogeneous.
+ * If the horizontal space is not enough, make buttons as wide as possible.
+ * - If a homogeneous layout is possible:
+ * + primary_width and secondary_width (primary_height and secondary_height)
+ *   will be the sizes of the primary and secondary groups (basically the
+ *   homogeneous width (height) times the number of items).
+ * + children_sizes will contain the homogeneous width (height) for all items
+ *
+ * - If a homogeneous layout is NOT possible:
+ * + primary_width and secondary_width (primary_height and secondary_height)
+ *   will contain the sum of the widths (heights) for each group
+ * + children_sizes will contain the heterogeneous width (height) of each button,
+ *   i.e. its requisition plus any possible extra width (height)
+ *
+ * All the other parameters come straight from _gtk_button_box_child_requisition
+*/
+static gint*
+gtk_button_box_get_children_sizes (GtkWidget     *widget,
+                                   GtkAllocation *allocation,
+                                   gint          *primary_width,
+                                   gint          *secondary_width,
+                                   gint          *child_height,
+                                   gint          *primary_height,
+                                   gint          *secondary_height,
+                                   gint          *child_width,
+                                   gint          *nvis_children,
+                                   gint          *n_secondaries)
+{
+  gint *children_sizes;
+  gint total_width;
+  gint total_height;
+  gint total_spacing;
+  gint i;
+  GList *children;
+  gint extra_space;
+  gint child_min_width, ipad_width;
+  gint child_min_height, ipad_height;
+  GtkBoxChild *child;
+  GtkWidget *child_widget;
+  GtkRequisition req;
+  gint extra;
+  GtkOrientation orientation;
+  gboolean shrunken;
+
+  _gtk_button_box_child_requisition (widget,
+                                     nvis_children, n_secondaries,
+                                     child_width, child_height);
+
+  orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
+
+  if (*nvis_children == 0)
+    {
+      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+        *primary_width = *secondary_width = *n_secondaries = 0;
+      else
+        *primary_height = *secondary_height = *n_secondaries = 0;
+      return NULL;
+    }
+
+  children_sizes = g_slice_alloc (sizeof (gint) * (*nvis_children));
+  total_spacing = *nvis_children * gtk_box_get_spacing (GTK_BOX (widget));
+
+  if (orientation == GTK_ORIENTATION_HORIZONTAL)
+    {
+      total_width = *nvis_children * *child_width;
+      shrunken = (!allocation || !gtk_box_get_homogeneous (GTK_BOX (widget)))
+                 || (total_width + total_spacing > allocation->width);
+    }
+  else
+    {
+      total_height = *nvis_children * *child_height;
+      shrunken = (!allocation || !gtk_box_get_homogeneous (GTK_BOX (widget)))
+                 || (total_height + total_spacing > allocation->height);
+    }
+
+  if (shrunken)
+    {
+      /* Homogeneous buttons would not fit into the allocation,
+       * therefore buttons should be smaller but as wide as possible
+       */
+      _gtk_button_box_child_size_props (GTK_BUTTON_BOX (widget),
+                                        &child_min_width, &child_min_height,
+                                        &ipad_width, &ipad_height);
+
+      *primary_width = *secondary_width = 0;
+      *primary_height = *secondary_height = 0;
+      children = GTK_BOX (widget)->children;
+      i = 0;
+
+      while (children)
+        {
+          child = children->data;
+          child_widget = child->widget;
+          children = children->next;
+
+          if (GTK_WIDGET_VISIBLE (child_widget))
+            {
+              gtk_widget_size_request (child_widget, &req);
+
+              if (orientation == GTK_ORIENTATION_HORIZONTAL)
+                {
+                 req.width = MAX (req.width + ipad_width, child_min_width);
+
+                 if (!child->is_secondary)
+                   *primary_width += req.width;
+                 else
+                   *secondary_width += req.width;
+
+                 children_sizes[i++] = req.width;
+                }
+              else
+                {
+                  req.height = MAX (req.height + ipad_height, child_min_height);
+
+                  if (!child->is_secondary)
+                    *primary_height += req.height;
+                  else
+                    *secondary_height += req.height;
+
+                  children_sizes[i++] = req.height;
+                }
+            }
+        }
+
+      /* Distribute the extra space between children */
+      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+        {
+          total_width = *primary_width + *secondary_width;
+
+          if (allocation && gtk_box_get_homogeneous (GTK_BOX (widget)))
+            extra_space = allocation->width - (total_width + total_spacing);
+          else
+            extra_space = 0;
+        }
+      else
+        {
+          total_height = *primary_height + *secondary_height;
+
+          if (allocation && gtk_box_get_homogeneous (GTK_BOX (widget)))
+            extra_space = allocation->height - (total_height + total_spacing);
+          else
+            extra_space = 0;
+        }
+
+      /* If extra space is available, distribute it evenly to the buttons. */
+      if (extra_space > 0)
+        {
+          extra = extra_space / *nvis_children;
+          children = GTK_BOX (widget)->children;
+          i = 0;
+
+          while (children)
+            {
+              child = children->data;
+              child_widget = child->widget;
+              children = children->next;
+
+              if (GTK_WIDGET_VISIBLE (child_widget))
+                {
+                  children_sizes[i++] += extra;
+
+                  if (orientation == GTK_ORIENTATION_HORIZONTAL)
+                    {
+                      if (!child->is_secondary)
+                        *primary_width += extra;
+                      else
+                        *secondary_width += extra;
+                    }
+                  else
+                    {
+                      if (!child->is_secondary)
+                        *primary_height += extra;
+                      else
+                        *secondary_height += extra;
+                    }
+                }
+            }
+        }
+    }
+  else
+    {
+      /* Homogeneous allocation for all buttons */
+      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+        {
+          *primary_width = *child_width * (*nvis_children - *n_secondaries);
+          *secondary_width = *child_width * *n_secondaries;
+          for (i = 0; i < *nvis_children; i++)
+            children_sizes[i] = *child_width;
+        }
+      else
+        {
+          *primary_height = *child_height * (*nvis_children - *n_secondaries);
+          *secondary_height = *child_height * *n_secondaries;
+          for (i = 0; i < *nvis_children; i++)
+            children_sizes[i] = *child_height;
+        }
+    }
+
+  return children_sizes;
+}
+
 static void
 gtk_button_box_size_request (GtkWidget      *widget,
                              GtkRequisition *requisition)
@@ -505,8 +728,14 @@ gtk_button_box_size_request (GtkWidget      *widget,
   GtkBox *box;
   GtkButtonBox *bbox;
   gint nvis_children;
+  gint primary_width;
+  gint primary_height;
+  gint secondary_width;
+  gint secondary_height;
   gint child_width;
   gint child_height;
+  gint n_secondaries;
+  gint *children_sizes;
   gint spacing;
   GtkButtonBoxStyle layout;
   GtkOrientation orientation;
@@ -519,11 +748,17 @@ gtk_button_box_size_request (GtkWidget      *widget,
   layout = bbox->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE
 	  ? bbox->layout_style : gtk_button_box_kludge_get_layout_default (GTK_BUTTON_BOX (widget));
 
-  _gtk_button_box_child_requisition (widget,
-                                     &nvis_children,
-				     NULL,
-                                     &child_width,
-                                     &child_height);
+  children_sizes = gtk_button_box_get_children_sizes (widget,
+                                                      NULL,
+                                                      &primary_width,
+                                                      &secondary_width,
+                                                      &child_height,
+                                                      &primary_height,
+                                                      &secondary_height,
+                                                      &child_width,
+                                                      &nvis_children,
+                                                      &n_secondaries);
+  g_slice_free1 (sizeof (gint) * nvis_children, children_sizes);
 
   if (nvis_children == 0)
     {
@@ -537,10 +772,10 @@ gtk_button_box_size_request (GtkWidget      *widget,
           case GTK_BUTTONBOX_SPREAD:
             if (orientation == GTK_ORIENTATION_HORIZONTAL)
               requisition->width =
-                      nvis_children*child_width + ((nvis_children+1)*spacing);
+                      primary_width + secondary_width + ((nvis_children + 1) * spacing);
             else
               requisition->height =
-                      nvis_children*child_height + ((nvis_children+1)*spacing);
+                      primary_height + secondary_height + ((nvis_children + 1) * spacing);
 
             break;
           case GTK_BUTTONBOX_EDGE:
@@ -549,10 +784,10 @@ gtk_button_box_size_request (GtkWidget      *widget,
           case GTK_BUTTONBOX_CENTER:
             if (orientation == GTK_ORIENTATION_HORIZONTAL)
               requisition->width =
-                      nvis_children*child_width + ((nvis_children-1)*spacing);
+                      primary_width + secondary_width + ((nvis_children - 1) * spacing);
             else
               requisition->height =
-                      nvis_children*child_height + ((nvis_children-1)*spacing);
+                      primary_height + secondary_height + ((nvis_children - 1) * spacing);
 
             break;
           default:
@@ -579,8 +814,13 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
   GtkBoxChild *child;
   GList *children;
   GtkAllocation child_allocation;
+  gint *children_sizes;
   gint nvis_children;
   gint n_secondaries;
+  gint primary_width;
+  gint primary_height;
+  gint secondary_width;
+  gint secondary_height;
   gint child_width;
   gint child_height;
   gint x = 0;
@@ -591,9 +831,13 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
   gint height = 0;
   gint childspace;
   gint childspacing = 0;
+  gint primary_spacing;
+  gint n_primaries;
+  gint secondary_spacing;
   GtkButtonBoxStyle layout;
   gint spacing;
   GtkOrientation orientation;
+  guint i;
 
   orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
   base_box = GTK_BOX (widget);
@@ -601,13 +845,25 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
   spacing = base_box->spacing;
   layout = box->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE
 	  ? box->layout_style : gtk_button_box_kludge_get_layout_default (GTK_BUTTON_BOX (widget));
-  _gtk_button_box_child_requisition (widget,
-                                     &nvis_children,
-                                     &n_secondaries,
-                                     &child_width,
-                                     &child_height);
   widget->allocation = *allocation;
+  children_sizes = gtk_button_box_get_children_sizes (widget,
+                                                      &widget->allocation,
+                                                      &primary_width,
+                                                      &secondary_width,
+                                                      &child_height,
+                                                      &primary_height,
+                                                      &secondary_height,
+                                                      &child_width,
+                                                      &nvis_children,
+                                                      &n_secondaries);
 
+  if (nvis_children == 0)
+    {
+      g_slice_free1 (sizeof (gint) * nvis_children, children_sizes);
+      return;
+    }
+
+  n_primaries = nvis_children - n_secondaries;
   if (orientation == GTK_ORIENTATION_HORIZONTAL)
     width = allocation->width - GTK_CONTAINER (box)->border_width*2;
   else
@@ -619,21 +875,19 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
 
         if (orientation == GTK_ORIENTATION_HORIZONTAL)
           {
-            childspacing = (width - (nvis_children * child_width))
+            childspacing = (width - (primary_width + secondary_width))
                     / (nvis_children + 1);
-            x = allocation->x + GTK_CONTAINER (box)->border_width
-                    + childspacing;
-            secondary_x = x + ((nvis_children - n_secondaries)
-                            * (child_width + childspacing));
+            primary_spacing = childspacing * (n_primaries - 1);
+            x = allocation->x + GTK_CONTAINER (box)->border_width + childspacing;
+            secondary_x = x + primary_width + primary_spacing + childspacing;
           }
         else
           {
-            childspacing = (height - (nvis_children * child_height))
+            childspacing = (height - (primary_height + secondary_height))
                     / (nvis_children + 1);
-            y = allocation->y + GTK_CONTAINER (box)->border_width
-                    + childspacing;
-            secondary_y = y + ((nvis_children - n_secondaries)
-                            * (child_height + childspacing));
+            primary_spacing = childspacing * (n_primaries - 1);
+            y = allocation->y + GTK_CONTAINER (box)->border_width + childspacing;
+            secondary_y = y + primary_height + primary_spacing + childspacing;
           }
 
         break;
@@ -644,36 +898,34 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
           {
             if (nvis_children >= 2)
               {
-                childspacing = (width - (nvis_children * child_width))
+                childspacing = ((primary_width + secondary_width))
                       / (nvis_children - 1);
+                primary_spacing = childspacing * (n_primaries - 1);
                 x = allocation->x + GTK_CONTAINER (box)->border_width;
-                secondary_x = x + ((nvis_children - n_secondaries)
-                                   * (child_width + childspacing));
+                secondary_x = x + primary_width + primary_spacing + childspacing;
               }
             else
               {
                 /* one or zero children, just center */
                 childspacing = width;
-                x = secondary_x = allocation->x
-                      + (allocation->width - child_width) / 2;
+                x = secondary_x = allocation->x + (allocation->width - primary_width) / 2;
               }
           }
         else
           {
             if (nvis_children >= 2)
               {
-                childspacing = (height - (nvis_children*child_height))
-                        / (nvis_children-1);
+                childspacing = (height - (primary_height + secondary_height))
+                      / (nvis_children - 1);
+                primary_spacing = childspacing * (n_primaries - 1);
                 y = allocation->y + GTK_CONTAINER (box)->border_width;
-                secondary_y = y + ((nvis_children - n_secondaries)
-                                * (child_height + childspacing));
+                secondary_y = y + primary_height + primary_spacing + childspacing;
               }
             else
               {
                 /* one or zero children, just center */
                 childspacing = height;
-                y = secondary_y = allocation->y
-                        + (allocation->height - child_height) / 2;
+                y = secondary_y = allocation->y + (allocation->height - primary_height) / 2;
               }
           }
 
@@ -684,19 +936,19 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
         if (orientation == GTK_ORIENTATION_HORIZONTAL)
           {
             childspacing = spacing;
+            secondary_spacing = childspacing * (n_secondaries - 1);
             x = allocation->x + GTK_CONTAINER (box)->border_width;
             secondary_x = allocation->x + allocation->width
-              - child_width * n_secondaries
-              - spacing * (n_secondaries - 1)
+              - secondary_width - secondary_spacing
               - GTK_CONTAINER (box)->border_width;
           }
         else
           {
             childspacing = spacing;
+            secondary_spacing = childspacing * (n_secondaries - 1);
             y = allocation->y + GTK_CONTAINER (box)->border_width;
             secondary_y = allocation->y + allocation->height
-              - child_height * n_secondaries
-              - spacing * (n_secondaries - 1)
+              - secondary_height - secondary_spacing
               - GTK_CONTAINER (box)->border_width;
           }
 
@@ -707,18 +959,18 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
         if (orientation == GTK_ORIENTATION_HORIZONTAL)
           {
             childspacing = spacing;
+            primary_spacing = childspacing * (n_primaries - 1);
             x = allocation->x + allocation->width
-              - child_width * (nvis_children - n_secondaries)
-              - spacing * (nvis_children - n_secondaries - 1)
+              - primary_width - primary_spacing
               - GTK_CONTAINER (box)->border_width;
             secondary_x = allocation->x + GTK_CONTAINER (box)->border_width;
           }
         else
           {
             childspacing = spacing;
+            primary_spacing = childspacing * (n_primaries - 1);
             y = allocation->y + allocation->height
-              - child_height * (nvis_children - n_secondaries)
-              - spacing * (nvis_children - n_secondaries - 1)
+              - primary_height - primary_spacing
               - GTK_CONTAINER (box)->border_width;
             secondary_y = allocation->y + GTK_CONTAINER (box)->border_width;
           }
@@ -730,21 +982,21 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
         if (orientation == GTK_ORIENTATION_HORIZONTAL)
           {
             childspacing = spacing;
-            x = allocation->x +
-              (allocation->width
-               - (child_width * (nvis_children - n_secondaries)
-               + spacing * (nvis_children - n_secondaries - 1))) / 2
-              + (n_secondaries * child_width + n_secondaries * spacing) / 2;
+            primary_spacing = childspacing * (n_primaries - 1);
+            secondary_spacing = childspacing * (n_secondaries - 1);
+            x = allocation->x + (allocation->width
+               - (primary_width + primary_spacing)) / 2
+               + (secondary_width + secondary_spacing + childspacing) / 2;
             secondary_x = allocation->x + GTK_CONTAINER (box)->border_width;
           }
         else
           {
             childspacing = spacing;
-            y = allocation->y +
-              (allocation->height
-               - (child_height * (nvis_children - n_secondaries)
-                  + spacing * (nvis_children - n_secondaries - 1))) / 2
-              + (n_secondaries * child_height + n_secondaries * spacing) / 2;
+            primary_spacing = childspacing * (n_primaries - 1);
+            secondary_spacing = childspacing * (n_secondaries - 1);
+            y = allocation->y + (allocation->height
+              - (primary_height + primary_spacing)) / 2
+              + (secondary_height + secondary_spacing + childspacing) / 2;
             secondary_y = allocation->y + GTK_CONTAINER (box)->border_width;
           }
 
@@ -767,7 +1019,7 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
       }
 
   children = GTK_BOX (box)->children;
-
+  i = 0;
   while (children)
     {
       child = children->data;
@@ -775,6 +1027,10 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
 
       if (GTK_WIDGET_VISIBLE (child->widget))
         {
+          if (orientation == GTK_ORIENTATION_HORIZONTAL)
+            child_width = children_sizes[i++];
+          else
+            child_height = children_sizes[i++];
           child_allocation.width = child_width;
           child_allocation.height = child_height;
 
@@ -785,17 +1041,17 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
               if (child->is_secondary)
                 {
                   child_allocation.x = secondary_x;
-                  secondary_x += childspace;
+                  secondary_x += child_width + childspacing;
                 }
               else
                 {
                   child_allocation.x = x;
-                  x += childspace;
+                  x += child_width + childspacing;
                 }
 
               if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
                   child_allocation.x = (allocation->x + allocation->width)
-                          - (child_allocation.x + child_width - allocation->x);
+                    - (child_allocation.x + child_width - allocation->x);
             }
           else
             {
@@ -804,18 +1060,19 @@ gtk_button_box_size_allocate (GtkWidget     *widget,
               if (child->is_secondary)
                 {
                   child_allocation.y = secondary_y;
-                  secondary_y += childspace;
+                  secondary_y += child_height + childspacing;
                 }
               else
                 {
                   child_allocation.y = y;
-                  y += childspace;
+                  y += child_height + childspacing;
                 }
             }
 
           gtk_widget_size_allocate (child->widget, &child_allocation);
         }
     }
+  g_slice_free1 (sizeof (gint) * nvis_children, children_sizes);
 }
 
 #define __GTK_BUTTON_BOX_C__
