aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-30 16:30:58 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:05 +0800
commitfc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a (patch)
tree53a3dcd94de897c4e51799405461a0b546afda8e /mail/mail-send-recv.c
parent18b6c327835c614ab427d753247f9ffcb542b0cd (diff)
downloadgsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.tar
gsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.tar.gz
gsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.tar.bz2
gsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.tar.lz
gsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.tar.xz
gsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.tar.zst
gsoc2013-evolution-fc91bfc86e3a58d97d7819dbbbda74a33d3f1c2a.zip
Add option "Check for new messages in all active accounts"
As a follow-up for bug #633949
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c16
1 files changed, 14 insertions, 2 deletions
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 */