diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2005-08-24 12:22:14 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2005-08-24 12:22:14 +0800 |
commit | d851c3525b60b858136f42a343a938fd6e864e7f (patch) | |
tree | 31c05436a7b3678fe07839be6640c7f7441cb4ad /widgets/misc/e-attachment-bar.c | |
parent | 26da038f6d966c12c899f4c5b26413ccd0083347 (diff) | |
download | gsoc2013-evolution-d851c3525b60b858136f42a343a938fd6e864e7f.tar.gz gsoc2013-evolution-d851c3525b60b858136f42a343a938fd6e864e7f.tar.zst gsoc2013-evolution-d851c3525b60b858136f42a343a938fd6e864e7f.zip |
Fix for bug #314136. Shows filename in the remote download in composer.
2005-08-24 Srinivasa Ragavan <sragavan@novell.com>
* 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
Diffstat (limited to 'widgets/misc/e-attachment-bar.c')
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 13 |
1 files changed, 9 insertions, 4 deletions
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 |