diff options
Diffstat (limited to 'ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c')
-rw-r--r-- | ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c b/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c index 858ef65e1..7431abc08 100644 --- a/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c +++ b/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c @@ -22,6 +22,8 @@ #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) @@ -101,6 +103,20 @@ empathy_accounts_plugin_class_init ( 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 |