From 200ff2ee9785a4d887a814003a6056008dff8101 Mon Sep 17 00:00:00 2001 From: Lucian Langa Date: Mon, 15 Dec 2008 06:05:10 +0000 Subject: ** Fixes bug #564519 2008-12-15 Lucian Langa ** Fixes bug #564519 * mail-send-recv.c: (build_dialog): Count also deleted unsent messages when displaying SMTP server svn path=/trunk/; revision=36879 --- mail/ChangeLog | 7 +++++++ mail/mail-send-recv.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 8262d7520f..890fa12189 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2008-12-15 Lucian Langa + + ** Fixes bug #564519 + + * mail-send-recv.c: (build_dialog): + Count also deleted unsent messages when displaying SMTP server + 2008-12-13 Matthew Barnes ** Fixes bug #564351 (patch by Tal Benavidor) diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index d2447d76b7..d957a7d216 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -416,7 +416,8 @@ 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) + if (outbox && destination + && (camel_folder_get_message_count(outbox) - camel_folder_get_deleted_message_count(outbox)) == 0) num_sources--; table = gtk_table_new (num_sources, 4, FALSE); @@ -544,7 +545,8 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati e_event_emit ((EEvent *)em_event_peek (), "mail.sendreceive", (EEventTarget *) target); /* 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) { + if (outbox && destination + && (camel_folder_get_message_count(outbox) - camel_folder_get_deleted_message_count(outbox)) != 0) { info = g_hash_table_lookup (data->active, SEND_URI_KEY); if (info == NULL) { info = g_malloc0 (sizeof (*info)); -- cgit v1.2.3