aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-chooser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-account-chooser.c')
-rw-r--r--libempathy-gtk/empathy-account-chooser.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 8c402c07a..ea3d6e513 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -241,6 +241,24 @@ empathy_account_chooser_get_account (EmpathyAccountChooser *chooser)
return account;
}
+TpConnection *
+empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
+{
+ EmpathyAccountChooserPriv *priv;
+ McAccount *account;
+ TpConnection *connection;
+
+ g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), NULL);
+
+ priv = GET_PRIV (chooser);
+
+ account = empathy_account_chooser_get_account (chooser);
+ connection = empathy_account_manager_get_connection (priv->manager, account);
+ g_object_unref (account);
+
+ return connection;
+}
+
gboolean
empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
McAccount *account)