From 26da038f6d966c12c899f4c5b26413ccd0083347 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Wed, 24 Aug 2005 04:19:01 +0000 Subject: Show the bar depending on the number of attachments. 2005-08-22 Srinivasa Ragavan * e-msg-composer.c (drop_action): Show the bar depending on the number of attachments. * e-msg-composer-select-file.c (select_attach_response): Show the bar depending on the number of attachments. ** Fixes the bug #313083 svn path=/trunk/; revision=30233 --- composer/ChangeLog | 10 ++++++++++ composer/e-msg-composer-select-file.c | 7 +++++-- composer/e-msg-composer.c | 7 ++++--- 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index e37640c29e..f10d479fe4 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,13 @@ +2005-08-22 Srinivasa Ragavan + + * e-msg-composer.c (drop_action): Show the bar depending on the + number of attachments. + + * e-msg-composer-select-file.c (select_attach_response): Show the bar + depending on the number of attachments. + + ** Fixes the bug #313083 + 2005-08-23 Not Zed * e-msg-composer.c (build_message): only define skip_content: if diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c index 7a4b917f24..3f46abd160 100644 --- a/composer/e-msg-composer-select-file.c +++ b/composer/e-msg-composer-select-file.c @@ -46,6 +46,7 @@ #include "e-msg-composer-select-file.h" #include #include "e-msg-composer.h" +#include "e-attachment-bar.h" enum { SELECTOR_MODE_MULTI = (1 << 0), @@ -218,8 +219,10 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer func(composer, names, gtk_toggle_button_get_active(showinline)); - gtk_widget_show (composer->attachment_expander); - gtk_widget_show (composer->attachment_scrolled_window); + if (e_attachment_bar_get_num_attachments(E_ATTACHMENT_BAR(composer->attachment_bar))) { + gtk_widget_show (composer->attachment_expander); + gtk_widget_show (composer->attachment_scrolled_window); + } g_slist_foreach(names, (GFunc)g_free, NULL); g_slist_free(names); diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index d8257155d2..bce1c3de91 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2877,10 +2877,11 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk d(printf ("dropping an unknown\n")); break; } - gtk_widget_show (composer->attachment_expander); - gtk_widget_show (composer->attachment_scrolled_window); - printf("Drag finished, success %d delete %d\n", success, delete); + if (e_attachment_bar_get_num_attachments(E_ATTACHMENT_BAR(composer->attachment_bar))) { + gtk_widget_show (composer->attachment_expander); + gtk_widget_show (composer->attachment_scrolled_window); + } gtk_drag_finish(context, success, delete, time); } -- cgit v1.2.3