[evolution-mapi] Install ESource::changed listener in mapi_backend_constructed()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Install ESource::changed listener in mapi_backend_constructed()
- Date: Thu, 23 Aug 2012 14:33:13 +0000 (UTC)
commit 84d3c1e46b2a652753f7b9b9f00e336c360f46fe
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 23 16:24:44 2012 +0200
Install ESource::changed listener in mapi_backend_constructed()
That way, if user enables MAPI account, the backend will know about
it. The mapi_backend_populate() is not called for disabled accounts,
thus it's not the right place to install the signal listener.
src/collection/e-mapi-backend.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/collection/e-mapi-backend.c b/src/collection/e-mapi-backend.c
index ea6970b..395adc3 100644
--- a/src/collection/e-mapi-backend.c
+++ b/src/collection/e-mapi-backend.c
@@ -319,18 +319,23 @@ mapi_backend_source_changed_cb (ESource *source,
static void
mapi_backend_constructed (GObject *object)
{
+ EBackend *backend = E_BACKEND (object);
ESource *source;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mapi_backend_parent_class)->constructed (object);
- source = e_backend_get_source (E_BACKEND (object));
+ source = e_backend_get_source (backend);
/* XXX Wondering if we ought to delay this until after folders
* are initially populated, just to remove the possibility
* of weird races with clients trying to create folders. */
e_server_side_source_set_remote_creatable (
E_SERVER_SIDE_SOURCE (source), TRUE);
+
+ g_signal_connect (
+ source, "changed",
+ G_CALLBACK (mapi_backend_source_changed_cb), backend);
}
static void
@@ -379,10 +384,6 @@ mapi_backend_populate (ECollectionBackend *backend)
* hierarchy immediately on startup, schedule an authentication
* session first thing. */
mapi_backend_queue_auth_session (mapi_backend);
-
- g_signal_connect (
- source, "changed",
- G_CALLBACK (mapi_backend_source_changed_cb), backend);
}
static gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]