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 | |
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')
-rw-r--r-- | widgets/misc/ChangeLog | 16 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 13 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.h | 2 | ||||
-rw-r--r-- | widgets/misc/e-attachment.c | 3 |
4 files changed, 27 insertions, 7 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 0627b44161..0ed87f0266 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,19 @@ +2005-08-22 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. + +2005-08-22 Srinivasa Ragavan <sragavan@novell.com> + + * 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 + 2005-08-23 Not Zed <NotZed@Ximian.com> * e-send-options.c (get_widgets): cast warning away. 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 diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h index d3896015be..638bc5cd3c 100644 --- a/widgets/misc/e-attachment-bar.h +++ b/widgets/misc/e-attachment-bar.h @@ -81,7 +81,7 @@ void e_attachment_bar_remove_selected (EAttachmentBar *bar); GtkWidget ** e_attachment_bar_get_selector(EAttachmentBar *bar); GSList *e_attachment_bar_get_parts (EAttachmentBar *bar); GSList *e_attachment_bar_get_selected (EAttachmentBar *bar); -void e_attachment_bar_refresh (EAttachmentBar *bar); +void e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 54579ccfa6..e5a37bcdc4 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -477,7 +477,6 @@ e_attachment_build_remote_file (const char *file_name, filename = g_path_get_basename (attachment->file_name); camel_mime_part_set_filename (part, filename); - g_free (filename); if (attachment->description) { camel_mime_part_set_description (part, attachment->description); @@ -490,7 +489,7 @@ e_attachment_build_remote_file (const char *file_name, attachment->size = statbuf.st_size; attachment->guessed_type = TRUE; g_free (attachment->file_name); - attachment->file_name = g_strdup (filename); + attachment->file_name = filename; curl = camel_url_new ("file:", NULL); camel_url_set_path (curl, file_name); |