aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-26 01:10:14 +0800
committerMilan Crha <mcrha@redhat.com>2010-11-26 01:10:14 +0800
commite39dd931bcff0dfd6964a75c5b23c8e89f75d297 (patch)
treebb5b75e8e18d8be0a07829d220151196bd55dd0f /mail/mail-send-recv.c
parenteeec90235abe465e9cc49194b55ee2635faf023f (diff)
downloadgsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.gz
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.tar.zst
gsoc2013-evolution-e39dd931bcff0dfd6964a75c5b23c8e89f75d297.zip
Bug #207580 - Allow new mail check on individual accounts
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index ff3eb6363f..cdcce0455d 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -409,7 +409,8 @@ build_dialog (GtkWindow *parent,
EMailSession *session,
EAccountList *accounts,
CamelFolder *outbox,
- const gchar *destination)
+ const gchar *destination,
+ gboolean allow_send)
{
GtkDialog *gd;
GtkWidget *table;
@@ -534,7 +535,7 @@ build_dialog (GtkWindow *parent,
info->uri = g_strdup (source->url);
info->keep_on_server = source->keep_on_server;
info->cancellable = camel_operation_new ();
- info->state = SEND_ACTIVE;
+ info->state = allow_send ? SEND_ACTIVE : SEND_COMPLETE;
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
g_signal_connect (
@@ -612,7 +613,7 @@ build_dialog (GtkWindow *parent,
(EEventTarget *) target);
/* Skip displaying the SMTP row if we've got no outbox, destination or unsent mails */
- if (outbox && destination
+ if (allow_send && 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);
@@ -1009,9 +1010,8 @@ receive_update_got_store (gchar *uri, CamelStore *store, gpointer data)
}
}
-GtkWidget *
-mail_send_receive (GtkWindow *parent,
- EMailSession *session)
+static GtkWidget *
+send_receive (GtkWindow *parent, EMailSession *session, gboolean allow_send)
{
CamelFolder *local_outbox;
struct _send_data *data;
@@ -1038,7 +1038,7 @@ mail_send_receive (GtkWindow *parent,
local_outbox = e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_OUTBOX);
data = build_dialog (
parent, session, accounts,
- local_outbox, account->transport->url);
+ local_outbox, account->transport->url, allow_send);
scan = data->infos;
while (scan) {
struct _send_info *info = scan->data;
@@ -1078,6 +1078,18 @@ mail_send_receive (GtkWindow *parent,
return send_recv_dialog;
}
+GtkWidget *
+mail_send_receive (GtkWindow *parent, EMailSession *session)
+{
+ return send_receive (parent, session, TRUE);
+}
+
+GtkWidget *
+mail_receive (GtkWindow *parent, EMailSession *session)
+{
+ return send_receive (parent, session, FALSE);
+}
+
struct _auto_data {
EAccount *account;
EMailSession *session;