diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-06 09:47:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-08 06:32:16 +0800 |
commit | 8ad0c51edff9677ca22c46257f4a596dc23d2055 (patch) | |
tree | 44a10f1bb10506aba1c373aeae55deea6f3bef15 /mail/e-mail-backend.c | |
parent | 27eb820ea13c49af3d4f67c4c483aa0d3bbc1a94 (diff) | |
download | gsoc2013-evolution-8ad0c51edff9677ca22c46257f4a596dc23d2055.tar.gz gsoc2013-evolution-8ad0c51edff9677ca22c46257f4a596dc23d2055.tar.zst gsoc2013-evolution-8ad0c51edff9677ca22c46257f4a596dc23d2055.zip |
Adapt to Camel API changes.
This also removes the boxed CamelObject GType, since CamelObject is an
honest-to-goodness GObject now.
Diffstat (limited to 'mail/e-mail-backend.c')
-rw-r--r-- | mail/e-mail-backend.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index c10a0eb61b..67c732d352 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -26,6 +26,7 @@ #include "e-util/e-account-utils.h" #include "e-util/e-alert-dialog.h" +#include "e-util/e-binding.h" #include "misc/e-account-combo-box.h" @@ -79,17 +80,6 @@ mail_backend_store_operation_done_cb (CamelStore *store, g_object_unref (E_ACTIVITY (user_data)); } -static void -mail_backend_notify_online_cb (EShell *shell, - GParamSpec *pspec, - EMailBackend *backend) -{ - gboolean online; - - online = e_shell_get_online (shell); - camel_session_set_online (session, online); -} - /* Helper for mail_backend_prepare_for_offline_cb() */ static void mail_store_prepare_for_offline_cb (CamelService *service, @@ -119,7 +109,7 @@ mail_backend_prepare_for_offline_cb (EShell *shell, if (!synchronize) { mail_cancel_all (); - camel_session_set_network_state (session, FALSE); + camel_session_set_network_available (session, FALSE); } e_mail_store_foreach ( @@ -374,7 +364,6 @@ mail_backend_constructed (GObject *object) EShellBackend *shell_backend; MailFolderCache *folder_cache; const gchar *data_dir; - gboolean online; shell_backend = E_SHELL_BACKEND (object); shell = e_shell_backend_get_shell (shell_backend); @@ -382,18 +371,12 @@ mail_backend_constructed (GObject *object) /* This also initializes Camel, so it needs to happen early. */ mail_session_start (); - online = e_shell_get_online (shell); - camel_session_set_online (CAMEL_SESSION (session), online); + e_binding_new (shell, "online", session, "online"); e_account_combo_box_set_session (session); /* XXX Don't ask... */ folder_cache = mail_folder_cache_get_default (); g_signal_connect ( - shell, "notify::online", - G_CALLBACK (mail_backend_notify_online_cb), - shell_backend); - - g_signal_connect ( shell, "prepare-for-offline", G_CALLBACK (mail_backend_prepare_for_offline_cb), shell_backend); |