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);
((GObjectClass *) empathy_app_plugin_widget_parent_class)->constructed;
GtkWidget *top;
TpAccountManager *manager;
- TpSimpleClientFactory *factory;
if (chain_up != NULL)
chain_up (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);
}
#include "empathy-app-plugin.h"
+#include <libempathy/empathy-client-factory.h>
+
#include "empathy-app-plugin-widget.h"
G_DEFINE_TYPE (EmpathyAppPlugin, empathy_app_plugin, AP_TYPE_APPLICATION_PLUGIN)
static void
empathy_app_plugin_init (EmpathyAppPlugin *self)
{
+ if (tp_account_manager_can_set_default ())
+ {
+ EmpathyClientFactory *factory;
+ TpAccountManager *am;
+
+ factory = empathy_client_factory_dup ();
+ am = tp_account_manager_new_with_factory (
+ TP_SIMPLE_CLIENT_FACTORY (factory));
+ tp_account_manager_set_default (am);
+
+ g_object_unref (factory);
+ g_object_unref (am);
+ }
}
GType
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);
if (self->priv->account->id != 0)
{
TpAccountManager *manager;
- TpSimpleClientFactory *factory;
/* 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,
- 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);
return;
#include "empathy-accounts-plugin.h"
+#include <libempathy/empathy-client-factory.h>
+
#include "empathy-accounts-plugin-widget.h"
G_DEFINE_TYPE (EmpathyAccountsPlugin, empathy_accounts_plugin, AP_TYPE_PLUGIN)
static void
empathy_accounts_plugin_init (EmpathyAccountsPlugin *self)
{
+ if (tp_account_manager_can_set_default ())
+ {
+ EmpathyClientFactory *factory;
+ TpAccountManager *am;
+
+ factory = empathy_client_factory_dup ();
+ am = tp_account_manager_new_with_factory (
+ TP_SIMPLE_CLIENT_FACTORY (factory));
+ tp_account_manager_set_default (am);
+
+ g_object_unref (factory);
+ g_object_unref (am);
+ }
+
}
GType