From 5f90792f29e4a474e37dffc2deafcb3e8e310831 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 12 Apr 2010 11:32:18 +0200 Subject: add empathy_account_chooser_get_account --- libempathy-gtk/empathy-account-chooser.c | 14 ++++++++++++++ libempathy-gtk/empathy-account-chooser.h | 1 + 2 files changed, 15 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index 14ab5ebe1..5e261ebdb 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -901,3 +901,17 @@ empathy_account_chooser_is_ready (EmpathyAccountChooser *self) return priv->ready; } + +TpAccount * +empathy_account_chooser_get_account (EmpathyAccountChooser *chooser) +{ + TpAccount *account; + + account = empathy_account_chooser_dup_account (chooser); + if (account == NULL) + return NULL; + + g_object_unref (account); + + return account; +} diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h index 042321ec2..f80d7003c 100644 --- a/libempathy-gtk/empathy-account-chooser.h +++ b/libempathy-gtk/empathy-account-chooser.h @@ -59,6 +59,7 @@ struct _EmpathyAccountChooserClass { GType empathy_account_chooser_get_type (void) G_GNUC_CONST; GtkWidget * empathy_account_chooser_new (void); TpAccount * empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser); +TpAccount * empathy_account_chooser_get_account (EmpathyAccountChooser *chooser); TpConnection * empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser); gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser, TpAccount *account); -- cgit v1.2.3