aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2010-12-08 20:58:54 +0800
committerJonny Lamb <jonnylamb@gnome.org>2010-12-10 00:35:24 +0800
commitc98f95bcef9336d82d303fc10b4c60ff90270885 (patch)
tree0f5acb3bedb326e67a1b8b3bb51987b02eeac83b /libempathy-gtk/empathy-account-widget.c
parent373bf0d7ca7373a45a71e46f161695cc951a7316 (diff)
downloadgsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.tar
gsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.tar.gz
gsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.tar.bz2
gsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.tar.lz
gsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.tar.xz
gsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.tar.zst
gsoc2013-empathy-c98f95bcef9336d82d303fc10b4c60ff90270885.zip
account-widget: handle the remember password widget with the simple widget
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 5035ea7dd..27cb882bb 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -109,6 +109,8 @@ typedef struct {
GtkWidget *param_account_widget;
GtkWidget *param_password_widget;
+ GtkWidget *remember_password_widget;
+
/* Used only for IRC accounts */
EmpathyIrcNetworkChooser *irc_network_chooser;
@@ -1603,6 +1605,9 @@ account_widget_build_yahoo (EmpathyAccountWidget *self,
NULL);
self->ui_details->default_focus = g_strdup ("entry_id_simple");
+
+ priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+ self->ui_details->gui, "remember_password_simple"));
}
else
{
@@ -1622,6 +1627,9 @@ account_widget_build_yahoo (EmpathyAccountWidget *self,
NULL);
self->ui_details->default_focus = g_strdup ("entry_id");
+
+ priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+ self->ui_details->gui, "remember_password"));
}
}
@@ -2093,23 +2101,27 @@ do_constructed (GObject *obj)
}
/* remember password */
- if (priv->param_password_widget != NULL)
+ if (priv->param_password_widget != NULL
+ && priv->remember_password_widget != NULL)
{
- GObject *button;
-
- button = gtk_builder_get_object (
- self->ui_details->gui, "remember_password");
-
- if (button != NULL)
+ if (priv->simple)
{
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (priv->remember_password_widget), TRUE);
+ }
+ else
+ {
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (priv->remember_password_widget),
!EMP_STR_EMPTY (empathy_account_settings_get_string (
priv->settings, "password")));
-
- g_signal_connect (button, "toggled",
- G_CALLBACK (remember_password_toggled_cb), self);
- remember_password_toggled_cb (GTK_TOGGLE_BUTTON (button), self);
}
+
+ g_signal_connect (priv->remember_password_widget, "toggled",
+ G_CALLBACK (remember_password_toggled_cb), self);
+
+ remember_password_toggled_cb (
+ GTK_TOGGLE_BUTTON (priv->remember_password_widget), self);
}
/* dup and init the account-manager */