* src/widgets/modest-hbox-cell-renderer.c,
[modest] / src / widgets / modest-hbox-cell-renderer.c
index 0d2b66f..49c984d 100644 (file)
@@ -264,15 +264,11 @@ modest_hbox_cell_renderer_render       (GtkCellRenderer       *cell,
        GList *node = NULL;
        GtkCellRenderer *child;
        gint width, extra;
        GList *node = NULL;
        GtkCellRenderer *child;
        gint width, extra;
-       GtkRequisition req;
        
        direction = gtk_widget_get_direction (widget);
        nvis_children = 0;
        nexpand_children = 0;
 
        
        direction = gtk_widget_get_direction (widget);
        nvis_children = 0;
        nexpand_children = 0;
 
-       /* first, retrieve the requisition of the children cell renderers */
-       modest_hbox_cell_renderer_get_size (cell, widget, NULL, NULL, NULL, &(req.width), &(req.height));
-
        /* Counts visible and expandable children cell renderers */
        for (node = priv->renderers_list; node != NULL; node = g_list_next (node)) {
                gboolean visible, expand;
        /* Counts visible and expandable children cell renderers */
        for (node = priv->renderers_list; node != NULL; node = g_list_next (node)) {
                gboolean visible, expand;
@@ -293,6 +289,10 @@ modest_hbox_cell_renderer_render       (GtkCellRenderer       *cell,
                GdkRectangle child_alloc;
 
                if (nexpand_children > 0) {
                GdkRectangle child_alloc;
 
                if (nexpand_children > 0) {
+                       GtkRequisition req;
+
+                       /* retrieve the requisition of the children cell renderers */
+                       modest_hbox_cell_renderer_get_size (cell, widget, NULL, NULL, NULL, &(req.width), &(req.height));
                        width = cell_area->width - req.width;
                        extra = width / nexpand_children;
                } else {
                        width = cell_area->width - req.width;
                        extra = width / nexpand_children;
                } else {