Switch from GtkBuilder to using GtkTemplate.
Rename .[ch] and .ui files to standard names.
Rename widget IDs to be more readable.
Drop widget IDs that are not used.
Move code into the .ui file that can be.
Connect signals in swapped form.
The UmUserManager object could last longer than the panel. Use
g_signal_connect_object to do this automatically. Remove manual old method.
Connect signals in swapped form.
Users panel crashes with g_error() if some of libpwquality calls fails,
e.g. when pwquality.conf is broken. The default values should be used
instead of crash. Let's use g_warning() instead of g_error() in that
case.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/171
um_password_dialog_set_user() is called from on_permission_changed()
respective show_user(), which more or less means on every change in
the panel. It it pretty enough to call this before opening the password
dialog, which is already done over change_password() callback. Let's
remove the redundant call which may lead to unwanted failures among
others.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/171
"warning: passing argument 1 of ‘gtk_widget_destroy’ from incompatible
pointer type" is printed from g_clear_pointer, because it is more
type-safe now. See https://gitlab.gnome.org/GNOME/glib/issues/1425 for
more info. Add the necessary casts to suppress the warnings.
The commit targets to remove the behavior of implicit set of the language
when the user panel is clicked in g-c-c.
The behavior looks like introduced to partly resolve the bug [0] when the
gnome-initial-setup somehow did not set the language correctly. However the
gnome-initial-setup is able to handle the language nicely now.
Furthermore, the current user could not see its own language chooser in the
g-c-c User panel, instead the Region&Language panel is supposed to do the
task. And the Region&Language panel has already got a default locale set [1]
[2]. So even if the language is not set in the key file, it is less an issue
nowadays than when the issue was originally described in [0].
[0] https://bugzilla.gnome.org/show_bug.cgi?id=737216
[1] https://bugzilla.gnome.org/show_bug.cgi?id=767065
[2] https://gitlab.gnome.org/GNOME/gnome-control-center/commit/5e2ed8ehttps://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/161
The Password dialog uses "Verify New Password" and Add User dialog
"Confirm". Let's use "Confirm New Password" as it is on mockups to
be consistent in terminology.
The logic for the password mismatch warnings didn't handle the case where
you deleted both the passwords - it would still show them as not
matching.
Fix this by handling the three cases:
- Passwords are different
- Passwords are the same
- No passwords entered