* src/widgets/modest-hbox-cell-renderer.c,
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 21 Dec 2007 19:29:19 +0000 (19:29 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 21 Dec 2007 19:29:19 +0000 (19:29 +0000)
  src/widgets/modest-vbox-cell-renderer.c:
        * Only get the children full requested size if we have any
          expanded item.

pmo-trunk-r3966

src/modest-mail-operation.c
src/widgets/modest-hbox-cell-renderer.c
src/widgets/modest-vbox-cell-renderer.c

index 64e3d92..9186d21 100644 (file)
@@ -2649,7 +2649,6 @@ transfer_msgs_cb (TnyFolder *folder, gboolean cancelled, GError *err, gpointer u
 
                        tny_iterator_next (iter);
                }
-
        }
                
 
index 0d2b66f..49c984d 100644 (file)
@@ -264,15 +264,11 @@ modest_hbox_cell_renderer_render       (GtkCellRenderer       *cell,
        GList *node = NULL;
        GtkCellRenderer *child;
        gint width, extra;
-       GtkRequisition req;
        
        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;
@@ -293,6 +289,10 @@ modest_hbox_cell_renderer_render       (GtkCellRenderer       *cell,
                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 {
index 88c625e..af26450 100644 (file)
@@ -265,14 +265,11 @@ modest_vbox_cell_renderer_render       (GtkCellRenderer       *cell,
        GList *node = NULL;
        GtkCellRenderer *child;
        gint height, extra;
-       GtkRequisition req;
        
        direction = gtk_widget_get_direction (widget);
        nvis_children = 0;
        nexpand_children = 0;
 
-       /* first, retrieve the requisition of the children cell renderers */
-       modest_vbox_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)) {
@@ -294,6 +291,9 @@ modest_vbox_cell_renderer_render       (GtkCellRenderer       *cell,
                GdkRectangle child_alloc;
 
                if (nexpand_children > 0) {
+                       GtkRequisition req;
+                       
+                       modest_vbox_cell_renderer_get_size (cell, widget, NULL, NULL, NULL, &(req.width), &(req.height));
                        height = cell_area->height - req.height;
                        extra = height / nexpand_children;
                } else {