aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2008-10-01 03:38:49 +0800
committerPhilip Withnall <pwithnall@src.gnome.org>2008-10-01 03:38:49 +0800
commitd5699b66585d3c278b635e0b99d5a66c86698555 (patch)
tree7772feb2353fac198fbca21637e6d2d6be32f720 /mail
parent9e84862c07adebd828d4a02b248ca622e343553a (diff)
downloadgsoc2013-evolution-d5699b66585d3c278b635e0b99d5a66c86698555.tar.gz
gsoc2013-evolution-d5699b66585d3c278b635e0b99d5a66c86698555.tar.zst
gsoc2013-evolution-d5699b66585d3c278b635e0b99d5a66c86698555.zip
** Fix for bug #545045
2008-09-30 Philip Withnall <philip@tecnocode.co.uk> ** Fix for bug #545045 * mail-send-recv.c (build_dialog): Don't show SMTP in the Send/Receive dialogue if there are no unsent mails. svn path=/trunk/; revision=36505
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-send-recv.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6675438231..e2ec45b256 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-30 Philip Withnall <philip@tecnocode.co.uk>
+
+ ** Fix for bug #545045
+
+ * mail-send-recv.c (build_dialog): Don't show SMTP in the
+ Send/Receive dialogue if there are no unsent mails.
+
2008-09-30 Sankar P <psankar@novell.com>
License Changes
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index df45ffb814..29cbb57322 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -415,6 +415,10 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
g_object_unref (iter);
+ /* Check to see if we have to send any mails --- if we don't, don't display the SMTP row in the table */
+ if (outbox && destination && camel_folder_get_message_count (outbox) == 0)
+ num_sources--;
+
table = gtk_table_new (num_sources, 4, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
@@ -539,7 +543,8 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
target = em_event_target_new_send_receive (em_event_peek(), table, data, row, EM_EVENT_SEND_RECEIVE);
e_event_emit ((EEvent *)em_event_peek (), "mail.sendreceive", (EEventTarget *) target);
- if (outbox && destination) {
+ /* Skip displaying the SMTP row if we've got no outbox, destination or unsent mails */
+ if (outbox && destination && camel_folder_get_message_count (outbox) != 0) {
info = g_hash_table_lookup (data->active, SEND_URI_KEY);
if (info == NULL) {
info = g_malloc0 (sizeof (*info));
@@ -601,9 +606,9 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
g_signal_connect (
cancel_button, "clicked",
G_CALLBACK (receive_cancel), info);
- gtk_widget_show_all (table);
}
+ gtk_widget_show_all (table);
gtk_widget_show (GTK_WIDGET (gd));
g_signal_connect (gd, "response", G_CALLBACK (dialog_response), data);