aboutsummaryrefslogtreecommitdiffstats
path: root/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-02 21:48:38 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-03 22:13:29 +0800
commit119351a936be47a235b9fd0d7cce1b73fb8e289e (patch)
treed4f883dbd8be291d7c6bb133bc26924f9775a0aa /ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c
parent44982406d7bc6317a7674d21f830ad50ab4f3810 (diff)
downloadgsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.tar
gsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.tar.gz
gsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.tar.bz2
gsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.tar.lz
gsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.tar.xz
gsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.tar.zst
gsoc2013-empathy-119351a936be47a235b9fd0d7cce1b73fb8e289e.zip
Rely on the empathy factory rather than 're-preparing' the AM
tp_account_manager_prepare_all_async() seems to be a bad idea so, instead, let's just rely the empathy factory and set it as default. This makes the code much more symetric with empathy-accounts and shouldn't prepare that much useless features as we are not going to prepare the contact list anyway.
Diffstat (limited to 'ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c')
-rw-r--r--ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c b/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c
index 04cbd7f41..d52b3a360 100644
--- a/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c
+++ b/ubuntu-online-accounts/cc-plugins/app-plugin/empathy-app-plugin-widget.c
@@ -181,7 +181,7 @@ manager_prepared_cb (GObject *source,
GList *accounts;
GError *error = NULL;
- if (!tp_account_manager_prepare_all_finish (manager, result, &error))
+ if (!tp_proxy_prepare_finish (manager, result, &error))
{
g_debug ("Error preparing Account Manager: %s", error->message);
g_clear_error (&error);
@@ -226,7 +226,6 @@ empathy_app_plugin_widget_constructed (GObject *object)
((GObjectClass *) empathy_app_plugin_widget_parent_class)->constructed;
GtkWidget *top;
TpAccountManager *manager;
- TpSimpleClientFactory *factory;
if (chain_up != NULL)
chain_up (object);
@@ -241,22 +240,7 @@ empathy_app_plugin_widget_constructed (GObject *object)
/* Prepare tp's account manager to find the TpAccount corresponding to our
* AgAccount */
manager = tp_account_manager_dup ();
- factory = tp_proxy_get_factory (manager);
- tp_simple_client_factory_add_account_features_varargs (factory,
- TP_ACCOUNT_FEATURE_STORAGE,
- TP_ACCOUNT_FEATURE_CONNECTION,
- 0);
- tp_simple_client_factory_add_connection_features_varargs (factory,
- TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS,
- TP_CONNECTION_FEATURE_CONTACT_INFO,
- 0);
- tp_simple_client_factory_add_contact_features_varargs (factory,
- TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_AVATAR_DATA,
- TP_CONTACT_FEATURE_CONTACT_INFO,
- TP_CONTACT_FEATURE_INVALID,
- 0);
- tp_account_manager_prepare_all_async (manager,
+ tp_proxy_prepare_async (manager, NULL,
manager_prepared_cb, g_object_ref (self));
g_object_unref (manager);
}