diff options
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 32 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget.h | 6 |
2 files changed, 38 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 99af21322..52efbce01 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -81,6 +81,9 @@ typedef struct { TpAccountManager *account_manager; + GtkWidget *param_account_widget; + GtkWidget *param_password_widget; + gboolean dispose_run; } EmpathyAccountWidgetPriv; @@ -397,6 +400,11 @@ empathy_account_widget_setup_widget (EmpathyAccountWidget *self, str = empathy_account_settings_get_string (priv->settings, param_name); gtk_entry_set_text (GTK_ENTRY (widget), str ? str : ""); + if (!tp_strdiff (param_name, "account")) + priv->param_account_widget = widget; + else if (!tp_strdiff (param_name, "password")) + priv->param_password_widget = widget; + if (strstr (param_name, "password")) { gtk_entry_set_visibility (GTK_ENTRY (widget), FALSE); @@ -1872,3 +1880,27 @@ empathy_account_widget_changed (EmpathyAccountWidget *self) account_widget_handle_control_buttons_sensitivity (self); priv->contains_pending_changes = TRUE; } + +void +empathy_account_widget_set_account_param (EmpathyAccountWidget *self, + const gchar *account) +{ + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + if (priv->param_account_widget == NULL) + return; + + gtk_entry_set_text (GTK_ENTRY (priv->param_account_widget), account); +} + +void +empathy_account_widget_set_password_param (EmpathyAccountWidget *self, + const gchar *account) +{ + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + if (priv->param_password_widget == NULL) + return; + + gtk_entry_set_text (GTK_ENTRY (priv->param_password_widget), account); +} diff --git a/libempathy-gtk/empathy-account-widget.h b/libempathy-gtk/empathy-account-widget.h index 5b994c277..9ed989434 100644 --- a/libempathy-gtk/empathy-account-widget.h +++ b/libempathy-gtk/empathy-account-widget.h @@ -73,6 +73,12 @@ void empathy_account_widget_discard_pending_changes gchar * empathy_account_widget_get_default_display_name ( EmpathyAccountWidget *widget); +void empathy_account_widget_set_account_param (EmpathyAccountWidget *widget, + const gchar *account); + +void empathy_account_widget_set_password_param (EmpathyAccountWidget *self, + const gchar *password); + /* protected methods */ void empathy_account_widget_changed (EmpathyAccountWidget *widget); |