aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-02 04:56:04 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-02 04:56:04 +0800
commitb2cda1d0c6d44f53f71bad9e256f41188677dfba (patch)
tree65bd7560e802baf1740482ae48b952dc5c5957fc /mail/mail-send-recv.c
parente52986f4225cbe8496043da74ca250521d244705 (diff)
downloadgsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.gz
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.zst
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.zip
Merge revisions 36016:36533 from trunk.
svn path=/branches/kill-bonobo/; revision=36534
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 139bc2dc25..29cbb57322 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -1,22 +1,22 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors: Michael Zucchi <NotZed@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
*
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ *
+ * Authors:
+ * Michael Zucchi <NotZed@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
*/
@@ -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);