diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-16 00:13:24 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-18 19:01:06 +0800 |
commit | f82cf307e75f0446b4e590b0036a179b64862939 (patch) | |
tree | 7b790fcf6f958eccf7b7f17d0462247f3c170be6 /libempathy-gtk/empathy-account-widget.c | |
parent | 3d2438bfc48b2858c2800feb9ca96fda3634a089 (diff) | |
download | gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.tar gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.tar.gz gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.tar.bz2 gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.tar.lz gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.tar.xz gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.tar.zst gsoc2013-empathy-f82cf307e75f0446b4e590b0036a179b64862939.zip |
account-widget: add empathy_account_widget_set_{account,password}_param
This will be used to restore the account and password params when switching
widgets.
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 32 |
1 files changed, 32 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); +} |