user-accounts: allow password changing if old password isn't set
https://bugzilla.gnome.org/show_bug.cgi?id=733619
This commit is contained in:
parent
53a339583a
commit
f904756f74
1 changed files with 7 additions and 3 deletions
|
@ -538,6 +538,8 @@ void
|
||||||
um_password_dialog_set_user (UmPasswordDialog *um,
|
um_password_dialog_set_user (UmPasswordDialog *um,
|
||||||
ActUser *user)
|
ActUser *user)
|
||||||
{
|
{
|
||||||
|
gboolean visible;
|
||||||
|
|
||||||
if (um->user) {
|
if (um->user) {
|
||||||
g_object_unref (um->user);
|
g_object_unref (um->user);
|
||||||
um->user = NULL;
|
um->user = NULL;
|
||||||
|
@ -555,9 +557,11 @@ um_password_dialog_set_user (UmPasswordDialog *um,
|
||||||
if (act_user_get_uid (um->user) == getuid ()) {
|
if (act_user_get_uid (um->user) == getuid ()) {
|
||||||
mode_change (um, ACT_USER_PASSWORD_MODE_REGULAR);
|
mode_change (um, ACT_USER_PASSWORD_MODE_REGULAR);
|
||||||
gtk_widget_hide (um->action_radio_box);
|
gtk_widget_hide (um->action_radio_box);
|
||||||
gtk_widget_show (um->old_password_label);
|
|
||||||
gtk_widget_show (um->old_password_entry);
|
visible = (act_user_get_password_mode (user) != ACT_USER_PASSWORD_MODE_NONE);
|
||||||
um->old_password_ok = FALSE;
|
gtk_widget_set_visible (um->old_password_label, visible);
|
||||||
|
gtk_widget_set_visible (um->old_password_entry, visible);
|
||||||
|
um->old_password_ok = !visible;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mode_change (um, ACT_USER_PASSWORD_MODE_SET_AT_LOGIN);
|
mode_change (um, ACT_USER_PASSWORD_MODE_SET_AT_LOGIN);
|
||||||
|
|
Loading…
Add table
Reference in a new issue