diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-10 22:58:45 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-10 23:02:54 +0800 |
commit | 9db18eddff2b697256b6fcde7bbcb57bcef5c48d (patch) | |
tree | eff2ece34f59ef10b00e9cd6ab4e05d5c184dbf1 /libempathy-gtk/empathy-contact-selector-dialog.c | |
parent | e3e5ad3b663cd9c4c7df7fbfe4a4bdaf171f6063 (diff) | |
download | gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.tar gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.tar.gz gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.tar.bz2 gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.tar.lz gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.tar.xz gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.tar.zst gsoc2013-empathy-9db18eddff2b697256b6fcde7bbcb57bcef5c48d.zip |
empathy_contact_selector_dialog_get_selected: allow to get the account as well
Diffstat (limited to 'libempathy-gtk/empathy-contact-selector-dialog.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-selector-dialog.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-selector-dialog.c b/libempathy-gtk/empathy-contact-selector-dialog.c index b04e56daa..47a840240 100644 --- a/libempathy-gtk/empathy-contact-selector-dialog.c +++ b/libempathy-gtk/empathy-contact-selector-dialog.c @@ -492,7 +492,8 @@ empathy_contact_selector_dialog_class_init ( const gchar * empathy_contact_selector_dialog_get_selected ( EmpathyContactSelectorDialog *self, - TpConnection **connection) + TpConnection **connection, + TpAccount **account) { EmpathyContactSelectorDialogPriv *priv; const char *id; @@ -501,7 +502,7 @@ empathy_contact_selector_dialog_get_selected ( priv = GET_PRIV (self); - if (connection) + if (connection != NULL) { if (priv->show_account_chooser) *connection = empathy_account_chooser_get_connection ( @@ -510,6 +511,16 @@ empathy_contact_selector_dialog_get_selected ( *connection = NULL; } + if (account != NULL) + { + if (priv->show_account_chooser) + *account = empathy_account_chooser_get_account ( + EMPATHY_ACCOUNT_CHOOSER (priv->account_chooser)); + else + *account = NULL; + } + + id = gtk_entry_get_text (GTK_ENTRY (priv->entry_id)); return id; } |