diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-07 18:18:17 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-07 20:11:23 +0800 |
commit | 689c34ab5fec2ad965e934a532b6fca4008c06ef (patch) | |
tree | e8eb7370e2cbb695272a57542f282afd4b90e195 | |
parent | 39505b161f8034a1377488492e063db08ce54f2d (diff) | |
download | gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.tar gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.tar.gz gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.tar.bz2 gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.tar.lz gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.tar.xz gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.tar.zst gsoc2013-empathy-689c34ab5fec2ad965e934a532b6fca4008c06ef.zip |
consider account widget has changed if the remember checkbox is changed
https://bugzilla.gnome.org/show_bug.cgi?id=683397
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index aea76cf9f..aa1cc097c 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1866,6 +1866,9 @@ remember_password_toggled_cb (GtkToggleButton *button, { empathy_account_settings_set_remember_password (self->priv->settings, gtk_toggle_button_get_active (button)); + + if (!self->priv->automatic_change) + empathy_account_widget_changed (self); } static void @@ -1878,21 +1881,23 @@ account_settings_password_retrieved_cb (GObject *object, password = empathy_account_settings_dup_string ( self->priv->settings, "password"); + /* We have to do this so that when we call gtk_entry_set_text, + * the ::changed callback doesn't think the user made the + * change. This is also used in remember_password_toggled_cb. */ + self->priv->automatic_change = TRUE; + if (password != NULL) { - /* We have to do this so that when we call gtk_entry_set_text, - * the ::changed callback doesn't think the user made the - * change. */ - self->priv->automatic_change = TRUE; gtk_entry_set_text (GTK_ENTRY (self->priv->param_password_widget), password); - self->priv->automatic_change = FALSE; } gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (self->priv->remember_password_widget), !EMP_STR_EMPTY (password)); + self->priv->automatic_change = FALSE; + g_free (password); } @@ -2000,8 +2005,10 @@ do_constructed (GObject *obj) g_signal_connect (self->priv->remember_password_widget, "toggled", G_CALLBACK (remember_password_toggled_cb), self); + self->priv->automatic_change = TRUE; remember_password_toggled_cb ( GTK_TOGGLE_BUTTON (self->priv->remember_password_widget), self); + self->priv->automatic_change = FALSE; } else if (self->priv->remember_password_widget != NULL && !empathy_account_settings_supports_sasl (self->priv->settings)) |