Commit graph

758 commits

Author SHA1 Message Date
Robert Ancell
c092f8b89e user-accounts: Fix alignment of function parameters 2018-11-14 10:10:15 +13:00
Robert Ancell
a41780267b user-accounts: Move non-shared function
The generate_username_choices function is only used in CcAddUserDialog
2018-11-14 10:10:15 +13:00
Robert Ancell
ffa54acdb9 user-accounts: Move non-shared function
The set_user_icon_data function is only use in CcAvatarChooser
2018-11-14 10:10:15 +13:00
Robert Ancell
60ffc24c30 user-accounts: Move non-shared function
The render_user_icon function is only used in CcUserImage
2018-11-14 10:10:15 +13:00
Robert Ancell
288ef61515 user-accounts: Move non-shared function
The would_demote_only_admin function is only used in CcUserPanel
2018-11-14 10:10:15 +13:00
Robert Ancell
4e31c3face user-accounts: Remove unused popup_menu_below_button function 2018-11-14 10:10:15 +13:00
Robert Ancell
96b6ae98d0 user-accounts: Remove unused icon style code 2018-11-14 10:10:15 +13:00
Robert Ancell
feaa29bfc0 user-accounts: Rename UmRealmManager to CcRealmManager
Um is a naming hangover from before this was part of g-c-c.
2018-11-14 10:10:14 +13:00
Robert Ancell
eb7bbae2cd user-accounts: Rename UmPhotoDialog to CcAvatarChooser
Um is a naming hangover from before this was part of g-c-c.
2018-11-14 10:06:15 +13:00
Robert Ancell
262baed6a1 user-accounts: Rename UmCarousel to CcCarousel
Um is a naming hangover from before this was part of g-c-c.
2018-11-14 10:06:15 +13:00
Robert Ancell
4767a094bd user-accounts: Rename UmUserImage to CcUserImage
Um is a naming hangover from before this was part of g-c-c.
2018-11-14 10:06:15 +13:00
Robert Ancell
faaece85d2 user-accounts: Replace gtk_stack_set_visible_child with gtk_stack_set_visible 2018-11-10 09:39:09 +13:00
Robert Ancell
aac990aa83 user-accounts: Re-align fields in class structure 2018-11-10 09:28:23 +13:00
Robert Ancell
ad76438817 user-accounts: Focus domain entry when selecting enterprise login
And return focus correctly when switching back to local login
2018-11-10 09:24:34 +13:00
Robert Ancell
e41506798a Replace tabs with whitespace 2018-11-10 09:24:34 +13:00
Robert Ancell
3456269215 user-accounts: Remove debugging program for testing a dialog
This is not used by anyone.
2018-11-10 09:24:34 +13:00
Robert Ancell
26b0720200 user-accounts: Use gtk_dialog_run for CcAddUserDialog 2018-11-10 09:24:34 +13:00
Robert Ancell
96c2c4d62c user-accounts: Simplify how models are accessed 2018-11-10 09:24:34 +13:00
Robert Ancell
d77e3423d1 user-accounts: Use consistent naming for widgets
Remove widget IDs that are unused.
2018-11-10 09:24:33 +13:00
Robert Ancell
74cf3bcda1 user-accounts: Consolidate now simpler init functions 2018-11-10 09:24:33 +13:00
Robert Ancell
043b6dc907 user-accounts: Move CcAddUserDialog signals into .ui file 2018-11-10 09:24:33 +13:00
Robert Ancell
a4b76204ff user-accounts: Move default widget visibility and sensitivity into .ui file 2018-11-10 09:24:33 +13:00
Robert Ancell
1691cd74fc user-accounts: Move realm model into .ui file 2018-11-10 09:24:33 +13:00
Robert Ancell
550cbc2367 user-accounts: Use actual widget types in CcAddUserDialog
Instead of using GtkWidget and casting everywhere
2018-11-10 09:24:33 +13:00
Robert Ancell
112b61c0ff user-accounts: Rename UmAccountDialog to CcAddUserDialog
Um is a naming hangover from before this was part of g-c-c.
2018-11-10 09:24:33 +13:00
Robert Ancell
0d754295ce user-accounts: Rename um-resources to cc-user-accounts-resources
um- is a naming hangover from before this was part of g-c-c.
2018-11-09 09:08:27 +13:00
Robert Ancell
3eaf71065e user-accounts: Rename UmHistoryDialog to CcLoginHistoryDialog
Um is a naming hangover from before this was part of g-c-c.
2018-11-08 13:17:13 +00:00
Robert Ancell
5eec53c52c user-accounts: Use g_auto in UmHistoryDialog 2018-11-08 13:17:13 +00:00
Robert Ancell
c2940dd426 user-accounts: Convert UmHistoryDialog to GtkTemplate 2018-11-08 13:17:12 +00:00
Robert Ancell
94b218a486 user-accounts: Remove unused UmAccountType enum 2018-11-08 10:48:33 +13:00
Robert Ancell
8029b3e7be user-accounts: Rename UmPasswordDialog to CcPasswordDialog
Um is a naming hangover from before this was part of g-c-c.
2018-11-07 12:37:51 +13:00
Robert Ancell
2f68113950 user-accounts: Refactor password change handlers
Split the signal handler into two to remove quirky behaviour of clearing
the validation ticks depending on which GtkEntry generated the event.
2018-11-07 12:37:02 +13:00
Robert Ancell
c95f90b830 user-accounts: Use gchar consistently instead of char 2018-11-07 09:30:25 +13:00
Robert Ancell
cedbbd8eac user-accounts: Use g_auto in UmPasswordDialog 2018-11-07 09:30:25 +13:00
Robert Ancell
ad44ad4367 user-accounts: Convert UmPasswordDialog to GtkTemplate 2018-11-07 09:30:25 +13:00
Robert Ancell
ae90438bc8 user-accounts: Fix namespace of CcUserPanel
It wasn't correctly moved from the UM namespace when renamed in ec529e8.
This hasn't caused a problem, it's just a little confusing.
2018-11-06 16:00:36 +13:00
Robert Ancell
ec529e8566 user-accounts: Use GtkTemplate
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.
2018-10-25 11:28:53 +00:00
Robert Ancell
71eefdd8f6 user-accounts: Fix user carousel not showing
This bug was introduced in 02559b0f69
2018-10-24 04:57:35 +00:00
Robert Ancell
f9e088d49e user-accounts: Use g_signal_connect_object with UmUserManager
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.
2018-10-23 06:41:21 +00:00
Robert Ancell
02559b0f69 user-accounts: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Ondrej Holy
f27b99e338 user-accounts: Fix libpwquality error handling
Always use pwquality_strerror()	in case	of error in order to prevent
memory leaks and to improve error messages.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/171
2018-09-10 22:04:23 +00:00
Ondrej Holy
64007ce52d user-accounts: Do not crash because of libpwquality failures
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
2018-09-10 22:04:23 +00:00
Ondrej Holy
44c5c9e50b user-accounts: Do not set user for password dialog redundantly
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
2018-09-10 22:04:23 +00:00
Robert Ancell
49e8256a7e user-accounts: Don't mark empty strings as translatable 2018-08-24 11:33:32 +12:00
Ondrej Holy
70d8427b04 user-accounts: Add casts to suppress gcc warnings
"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.
2018-08-15 22:12:12 +00:00
Yifan J
a1066a27e0 user-accounts: Remove implicit language setting
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/5e2ed8e

https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/161
2018-08-15 09:32:35 +00:00
Robert Ancell
148e4c8fd0 common: Use GtkTemplate for the language chooser dialog 2018-07-18 22:39:32 +00:00
Ondrej Holy
1e769bb49d user-accounts: Use term "Confirm" instead of "Verify"
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.
2018-07-12 10:11:25 +02:00
Ondrej Holy
833c18bce4 user-accounts: Use the same phrase when passwords do not match
Use "The passwords do not match." phrase in the Add User dialog and
Password dialog consistently.
2018-07-12 10:11:25 +02:00
Robert Ancell
5e91cc7140 user-accounts: Correctly hide password mismatch warnings
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
2018-07-11 16:19:54 +02:00