Since the error message label provided at the bottom only says that
the newly provided password is weak, it can be consfusing for the
users as they might not understand why they can't press 'Accept'
button. This could be especially true for color blind people.
Fix it by allowing modification of new password entry only if the old
provided password is correctly entered.
Adding the 'error' css class to icons visually indicates that
there's an issue with the input. This is the same purpose served
by the status icons. Another reason to remove the status icons
is that with the error class added to entries the entries dim
except for the status icons.
Currently, the password_entry_timeout() callback can be called even after
the dialog disposal, which leads to segfaults. This is because the
corresponding source ids can be cleared in some cases without removing
the sources. Let's prevent direct calls of password_entry_timeout()
without destroying the source ids in order to fix this issue.
Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/760
If "Esc" is pressed, the callbacks to handle the `focus-out` signal are
called after the `cc_password_dialog_dispose` function. This leads to
segfaults, because the `user` variable is already cleared. Let's simply
do not continue if `user == NULL` to fix those crashes.
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/563