]> git.0d.be Git - empathy.git/commitdiff
Add empathy_account_chooser_get_connection()
authorXavier Claessens <xclaesse@gmail.com>
Sun, 15 Feb 2009 22:36:51 +0000 (23:36 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:21:09 +0000 (12:21 +0200)
libempathy-gtk/empathy-account-chooser.c
libempathy-gtk/empathy-account-chooser.h

index 8c402c07a0c1e672b188e20a437141d23f675867..ea3d6e513745b978d014c06d134abd8c1abb9e9b 100644 (file)
@@ -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)
index c15923bc3ac76a04fe9bf34b0b214007ed3c3403..4dfdc632ec60330746a96d7367ae02914b2c0738 100644 (file)
@@ -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);