aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-02-16 06:36:51 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-04-22 18:21:09 +0800
commiteef992ef2c1010aa31585629aa6990eda76b3f3d (patch)
tree1d397758e005ffcab1812a3ce93de788991b0494
parent08153d80afd0c88ad5b8d4134266f3cef8078b7b (diff)
downloadgsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.tar
gsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.tar.gz
gsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.tar.bz2
gsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.tar.lz
gsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.tar.xz
gsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.tar.zst
gsoc2013-empathy-eef992ef2c1010aa31585629aa6990eda76b3f3d.zip
Add empathy_account_chooser_get_connection()
-rw-r--r--libempathy-gtk/empathy-account-chooser.c18
-rw-r--r--libempathy-gtk/empathy-account-chooser.h1
2 files changed, 19 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)
diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h
index c15923bc3..4dfdc632e 100644
--- a/libempathy-gtk/empathy-account-chooser.h
+++ b/libempathy-gtk/empathy-account-chooser.h
@@ -57,6 +57,7 @@ struct _EmpathyAccountChooserClass {
GType empathy_account_chooser_get_type (void) G_GNUC_CONST;
GtkWidget * empathy_account_chooser_new (void);
McAccount * empathy_account_chooser_get_account (EmpathyAccountChooser *chooser);
+TpConnection * empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser);
gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
McAccount *account);
gboolean empathy_account_chooser_get_has_all_option (EmpathyAccountChooser *chooser);