const gchar *
empathy_contact_selector_dialog_get_selected (
EmpathyContactSelectorDialog *self,
- TpConnection **connection)
+ TpConnection **connection,
+ TpAccount **account)
{
EmpathyContactSelectorDialogPriv *priv;
const char *id;
priv = GET_PRIV (self);
- if (connection)
+ if (connection != NULL)
{
if (priv->show_account_chooser)
*connection = empathy_account_chooser_get_connection (
*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;
}
GType empathy_contact_selector_dialog_get_type (void);
const gchar *empathy_contact_selector_dialog_get_selected (
EmpathyContactSelectorDialog *self,
- TpConnection **connection);
+ TpConnection **connection,
+ TpAccount **account);
void empathy_contact_selector_dialog_set_show_account_chooser (
EmpathyContactSelectorDialog *self,
gboolean show_account_chooser);
if (response_id != GTK_RESPONSE_ACCEPT) goto out;
contact_id = empathy_contact_selector_dialog_get_selected (
- EMPATHY_CONTACT_SELECTOR_DIALOG (dialog), &connection);
+ EMPATHY_CONTACT_SELECTOR_DIALOG (dialog), &connection, NULL);
if (EMP_STR_EMPTY (contact_id) || connection == NULL) goto out;
if (response_id != GTK_RESPONSE_ACCEPT) goto out;
contact_id = empathy_contact_selector_dialog_get_selected (
- EMPATHY_CONTACT_SELECTOR_DIALOG (dialog), &connection);
+ EMPATHY_CONTACT_SELECTOR_DIALOG (dialog), &connection, NULL);
if (EMP_STR_EMPTY (contact_id) || connection == NULL) goto out;
const char *id;
id = empathy_contact_selector_dialog_get_selected (
- EMPATHY_CONTACT_SELECTOR_DIALOG (dialog), NULL);
+ EMPATHY_CONTACT_SELECTOR_DIALOG (dialog), NULL, NULL);
if (EMP_STR_EMPTY (id)) goto out;
connection = tp_channel_borrow_connection (channel);