aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-04-24 04:48:05 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-04-24 04:48:05 +0800
commit9b73ae5c7d2c016a3b1f07b1040355063b32814b (patch)
treea48d54626fcfcf00e9f96be00dce495c83514637 /mail/mail-send-recv.c
parentca691310d85f7a266d070cb004d3534215ac47d0 (diff)
downloadgsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.tar
gsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.tar.gz
gsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.tar.bz2
gsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.tar.lz
gsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.tar.xz
gsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.tar.zst
gsoc2013-evolution-9b73ae5c7d2c016a3b1f07b1040355063b32814b.zip
Miscellaneous bug fixes.
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 6e2ace004b..9fe40a5fbc 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -46,6 +46,7 @@
#include "mail-folder-cache.h"
#include "em-event.h"
+#include "shell/e-shell.h"
#include "e-util/e-account-utils.h"
#include "e-util/gconf-bridge.h"
@@ -1069,13 +1070,13 @@ auto_account_changed(EAccountList *eal, EAccount *ea, void *dummy)
}
static void
-auto_online(CamelObject *o, void *ed, void *d)
+auto_online (EShell *shell)
{
EIterator *iter;
EAccountList *accounts;
struct _auto_data *info;
- if (!GPOINTER_TO_INT(ed))
+ if (!e_shell_get_online (shell))
return;
accounts = e_get_account_list ();
@@ -1089,10 +1090,15 @@ auto_online(CamelObject *o, void *ed, void *d)
/* call to setup initial, and after changes are made to the config */
/* FIXME: Need a cleanup funciton for when object is deactivated */
void
-mail_autoreceive_init (CamelSession *session)
+mail_autoreceive_init (EShellModule *shell_module,
+ CamelSession *session)
{
EAccountList *accounts;
EIterator *iter;
+ EShell *shell;
+
+ g_return_if_fail (E_IS_SHELL_MODULE (shell_module));
+ g_return_if_fail (CAMEL_IS_SESSION (session));
if (auto_active)
return;
@@ -1107,7 +1113,13 @@ mail_autoreceive_init (CamelSession *session)
for (iter = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(iter);e_iterator_next(iter))
auto_account_added(accounts, (EAccount *)e_iterator_get(iter), NULL);
- camel_object_hook_event (session, "online", auto_online, NULL);
+ shell = e_shell_module_get_shell (shell_module);
+
+ auto_online (shell);
+
+ g_signal_connect (
+ shell, "notify::online",
+ G_CALLBACK (auto_online), NULL);
}
/* we setup the download info's in a hashtable, if we later need to build the gui, we insert