[gnome-control-center/gnome-3-8] user-accounts: Check the password mode in password authenticate callback
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] user-accounts: Check the password mode in password authenticate callback
- Date: Tue, 11 Jun 2013 14:38:58 +0000 (UTC)
commit 45afe7aecda0ec3d2528661ef686933f17697a91
Author: Jean-Benoit MARTIN <jean-benoit martin eurogiciel fr>
Date: Fri May 3 17:24:10 2013 +0200
user-accounts: Check the password mode in password authenticate callback
The password callback updates the sensitivity of the "Change" button in
the password dialog even if the password mode has changed, so check the
password mode before updating the button sensitivity
https://bugzilla.gnome.org/show_bug.cgi?id=699483
panels/user-accounts/um-password-dialog.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/um-password-dialog.c b/panels/user-accounts/um-password-dialog.c
index 62efdb0..36b9ae4 100644
--- a/panels/user-accounts/um-password-dialog.c
+++ b/panels/user-accounts/um-password-dialog.c
@@ -435,6 +435,14 @@ auth_cb (PasswdHandler *handler,
GError *error,
UmPasswordDialog *um)
{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gint mode;
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (um->action_combo));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (um->action_combo), &iter);
+ gtk_tree_model_get (model, &iter, 1, &mode, -1);
+
if (error) {
um->old_password_ok = FALSE;
set_entry_validation_error (GTK_ENTRY (um->old_password_entry),
@@ -445,6 +453,11 @@ auth_cb (PasswdHandler *handler,
clear_entry_validation_error (GTK_ENTRY (um->old_password_entry));
}
+ /* Check if we are still in normal mode */
+ if (mode != UM_PASSWORD_DIALOG_MODE_NORMAL){
+ return;
+ }
+
update_sensitivity (um);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]