Commit graph

566 commits

Author SHA1 Message Date
Felipe Borges
02c288ab6f user-accounts: Generate a default avatar for new users
When a user is created, we generate an avatar with their initials.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/6
2019-02-06 11:53:56 +00:00
Felipe Borges
12ad6a1b18 user-account: Remove border from user image button
See https://gitlab.gnome.org/GNOME/Initiatives/issues/6
2019-02-06 11:53:56 +00:00
Felipe Borges
d263ce1549 user-accounts: Round all user images
This is part of the effort in [0] to standardize the way we display
user images accross GNOME. Images are now going to be rounded and
borderless.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/6
2019-02-06 11:53:56 +00:00
Allan Day
3ababb4bf8 user-accounts: tweak the layout of the faces
For GNOME 3.32 we are pushing to make all our avatar images
round. This commit adjusts the existing stock faces images
to avoid layout issues when they are cropped in this way.

Fixes #289
2019-02-06 11:16:50 +00:00
Philip Withnall
1ca4104844 user-accounts: Allow ‘Remove User’ button to be focused
Otherwise it isn’t included in the tab focus cycle, and can’t be
navigated to with the tab key.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-22 16:50:24 +00:00
Ondrej Holy
a800e97510 user-account: Use the same Categories as other panels
gnome-user-accounts-panel.desktop has some differences in "Categories" in
comparison to other desktop files provided by gnome-control-center for no
obvious reason.

Add "GNOME" and "GTK" categories, which are used in all other desktop files.

Remove "System" and use just "Settings" main category. This among others
prevents the following output from desktop-file-validate:

/usr/share/applications/gnome-user-accounts-panel.desktop: hint: value
"System;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings;" for key
"Categories" in group "Desktop Entry" contains more than one main
category; application might appear more than once in the application menu

All other desktop files uses just the "Settings" main category.

But maybe this is totally useless patch, because it seems that GNOME Shell
do not care about the most of categories and GNOME Classic do not show those
desktop files in menus at all.
2019-01-05 14:40:35 +00:00
Robert Ancell
f1307baf4e user-accounts: Replace lone tab character with spaces 2018-11-14 10:11:02 +13:00
Robert Ancell
b40b0a4d05 user-accounts: Rename um-utils.[ch] to user-utils.[ch]
Um is a naming hangover from before this was part of g-c-c.
2018-11-14 10:10:15 +13:00
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