From d851c3525b60b858136f42a343a938fd6e864e7f Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Wed, 24 Aug 2005 04:22:14 +0000 Subject: Fix for bug #314136. Shows filename in the remote download in composer. 2005-08-24 Srinivasa Ragavan * e-attachment.c (e_attachment_build_remote_file): Fix for bug #314136. Shows filename in the remote download in composer. * e-attachment-bar.c (update): Better space management. Kills one extra row that happens some times. (e_attachment_bar_set_width): Just adjusts the size instead of rebuild of the bar, which is the cause for the freeze. Fixes the bug #313799. Remove the function e_attachment_bar_refresh * e-attachment-bar.h: Remove the function e_attachment_bar_refresh svn path=/trunk/; revision=30234 --- widgets/misc/e-attachment-bar.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'widgets/misc/e-attachment-bar.c') diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index 67ce7f9dde..bf951ca699 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -409,8 +409,8 @@ update (EAttachmentBar *bar) calculate_height_width(bar, &width, &height); per_col = bar_width / width; - rows = bar->priv->num_attachments / per_col; - gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, (rows+1) * height); + rows = (bar->priv->num_attachments + per_col -1 )/ per_col; + gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, rows * height); } } } @@ -493,9 +493,14 @@ e_attachment_bar_remove_selected (EAttachmentBar *bar) } void -e_attachment_bar_refresh (EAttachmentBar *bar) +e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width) { - update (bar); + int per_col, rows, height, width; + + calculate_height_width(bar, &width, &height); + per_col = bar_width / width; + rows = (bar->priv->num_attachments + per_col - 1) / per_col; + gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, rows * height); } void -- cgit v1.2.3