[gnome-online-accounts] tplinker: make sure all the TpAccounts have the features we need
- From: Marco Barisione <mbari src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] tplinker: make sure all the TpAccounts have the features we need
- Date: Thu, 22 Aug 2013 14:19:45 +0000 (UTC)
commit 90a16d13655c3b5182a36296788f8ded6724a886
Author: Marco Barisione <marco barisione collabora co uk>
Date: Wed Aug 21 09:44:19 2013 +0100
tplinker: make sure all the TpAccounts have the features we need
src/daemon/goatpaccountlinker.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/daemon/goatpaccountlinker.c b/src/daemon/goatpaccountlinker.c
index df31c9f..d96592a 100644
--- a/src/daemon/goatpaccountlinker.c
+++ b/src/daemon/goatpaccountlinker.c
@@ -523,6 +523,25 @@ goa_tp_account_linker_dispose (GObject *object)
}
static void
+initialize_client_factory (void)
+{
+ TpSimpleClientFactory *factory;
+ TpAccountManager *account_manager;
+ GQuark features[] = { TP_ACCOUNT_FEATURE_STORAGE, 0 };
+
+ factory = tp_simple_client_factory_new (NULL);
+ /* We want to make sure that new TpAccount instances will have all
+ * the features we need. */
+ tp_simple_client_factory_add_account_features (factory, features);
+
+ account_manager = tp_account_manager_new_with_factory (factory);
+ tp_account_manager_set_default (account_manager);
+
+ g_object_unref (account_manager);
+ g_object_unref (factory);
+}
+
+static void
goa_tp_account_linker_init (GoaTpAccountLinker *self)
{
GoaTpAccountLinkerPrivate *priv;
@@ -553,6 +572,8 @@ goa_tp_account_linker_class_init (GoaTpAccountLinkerClass *klass)
sizeof (GoaTpAccountLinkerPrivate));
gobject_class->dispose = goa_tp_account_linker_dispose;
+
+ initialize_client_factory ();
}
GoaTpAccountLinker *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]