From fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 30 Nov 2010 09:30:58 +0100 Subject: Add option "Check for new messages in all active accounts" As a follow-up for bug #633949 --- mail/evolution-mail.schemas.in | 17 +++++++++++++++++ mail/mail-config.ui | 24 ++++++++++++++++++++++++ mail/mail-send-recv.c | 16 ++++++++++++++-- 3 files changed, 55 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in index 4493c22f09..d0222a82e6 100644 --- a/mail/evolution-mail.schemas.in +++ b/mail/evolution-mail.schemas.in @@ -1570,6 +1570,23 @@ + + /schemas/apps/evolution/mail/send_recv_all_on_start + /apps/evolution/mail/send_recv_all_on_start + evolution-mail + bool + false + + Check for new messages in all active accounts + + Whether check for new messages in all active accounts regardless + of the account "Check for new messages every X minutes" option + when Evolution is started. This option is used only together + with 'send_recv_on_start' option. + + + + /schemas/apps/evolution/mail/send_recv_height /apps/evolution/mail/send_recv_height diff --git a/mail/mail-config.ui b/mail/mail-config.ui index 8677b95f15..bfa365ed9a 100644 --- a/mail/mail-config.ui +++ b/mail/mail-config.ui @@ -2468,6 +2468,30 @@ For example: "Work" or "Personal" 0 + + + True + 4 + + + Check for new messa_ges in all active accounts + True + True + False + True + True + + + False + False + 0 + + + + + 1 + + diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index deb38eb24a..fa0b9d2ec7 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -1195,20 +1195,32 @@ auto_online (EShell *shell) EIterator *iter; EAccountList *accounts; struct _auto_data *info; + gboolean can_update_all; if (!e_shell_get_online (shell)) return; + can_update_all = e_shell_settings_get_boolean (e_shell_get_shell_settings (shell), "mail-check-on-start") + && e_shell_settings_get_boolean (e_shell_get_shell_settings (shell), "mail-check-all-on-start"); + accounts = e_get_account_list (); for (iter = e_list_get_iterator ((EList *)accounts); e_iterator_is_valid (iter); e_iterator_next (iter)) { + EAccount *account = (EAccount *) e_iterator_get (iter); + + if (!account || !account->enabled) + continue; + info = g_object_get_data ( - G_OBJECT (e_iterator_get (iter)), + G_OBJECT (account), "mail-autoreceive"); - if (info && info->timeout_id) + if (info && (info->timeout_id || can_update_all)) auto_timeout (info); } + + if (iter) + g_object_unref (iter); } /* call to setup initial, and after changes are made to the config */ -- cgit