Revert "user-accounts: Don't disable the verify password entry"

This reverts commit 7b3746af23.

This is needed to make obvious that password is not yet strong
enough.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/38
This commit is contained in:
Ondrej Holy 2018-04-11 10:05:30 +02:00
parent 92af703634
commit ae16a8e7a0
2 changed files with 12 additions and 0 deletions

View file

@ -268,6 +268,7 @@ update_password_strength (UmAccountDialog *self)
const gchar *password;
const gchar *username;
const gchar *hint;
const gchar *verify;
gint strength_level;
password = gtk_entry_get_text (GTK_ENTRY (self->local_password));
@ -286,6 +287,11 @@ update_password_strength (UmAccountDialog *self)
clear_entry_validation_error (GTK_ENTRY (self->local_password));
}
verify = gtk_entry_get_text (GTK_ENTRY (self->local_verify));
if (strlen (verify) == 0) {
gtk_widget_set_sensitive (self->local_verify, strength_level > 1);
}
return strength_level;
}

View file

@ -69,6 +69,7 @@ update_password_strength (UmPasswordDialog *um)
const gchar *username;
gint strength_level;
const gchar *hint;
const gchar *verify;
if (um->user == NULL) {
return 0;
@ -92,6 +93,11 @@ update_password_strength (UmPasswordDialog *um)
clear_entry_validation_error (GTK_ENTRY (um->password_entry));
}
verify = gtk_entry_get_text (GTK_ENTRY (um->verify_entry));
if (strlen (verify) == 0) {
gtk_widget_set_sensitive (um->verify_entry, strength_level > 1);
}
return strength_level;
}