Commit graph

724 commits

Author SHA1 Message Date
Ondrej Holy
f5f67823db user-accounts: Present the default avatar in the avatar popover
Currently, it is not possible to unset a custom avatar, respective it
is not possible to set the default one. Let's present the default
avatar in the avatar popover as suggested in the mockup:
https://wiki.gnome.org/Design/OS/AvatarChooser

Fixes: GNOME/gnome-control-center#62
2019-05-16 14:50:45 +00:00
Ondrej Holy
65a8c15467 user-accounts: Remove a redundant parameter
The `round_image()` function has the `icon_size` parameter, which is not
used by that function, because the size is determined from a pixbuf size.
Let's remove that redundant `icon_size` parameter.
2019-05-16 14:50:45 +00:00
Andrea Azzarone
f42f39970d user-accounts: Fix memory corruption in the avatar popup
Use g_object_set_data_full and g_steal_pointer to ensure the validity of the
"filename" association.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/399
2019-03-04 11:06:54 +00:00
Ondrej Holy
03bf65f78f user-accounts: Remove custom file size limit for avatars
accountsservice has 1 MB limit for avatars, however, users panels
refuses to show avatars bigger than 64 KB for some historical reasons.
But you can still successfully set avatars up to the accountsservice
limit. Let's remove this custom limit and other redundant check and
rely just on accountsservice limits and errors from GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=792243
2019-03-02 14:47:52 +00:00
Ondrej Holy
addc65a6fd user-accounts: Allow bigger custom avatars
Default set of avatars uses 512x512 currently. However, custom avatars
from file, or webcam are always scaled down to 96x96. Let's increase this
also to 512x512. This change should be safe, because theoretical maximal
file size is 1 MB, which is equal to accountsservice limit.

https://bugzilla.gnome.org/show_bug.cgi?id=792243
2019-03-02 14:47:52 +00:00
Georges Basile Stavracas Neto
cd0954be34 user-accounts: Ellipsize real name label
In the User Accounts panel's carousel, longer real names
push the window geometry to super wide levels -- even with
the 255-char limitation in place.

Fix that by ellipsizing the real name label.
2019-02-13 15:06:53 +00:00
Georges Basile Stavracas Neto
db94f197fa user-panels: Limit full name length
GNOME Settings allows limitless full names, which is
actually accepted by most of the stack but may break
GNOME Settings, GNOME Shell and other user-visible
applications that show the user names.

Limit the user full name entries to 255 characters,
which is the same value used by GNOME Initial Setup.
2019-02-13 15:06:53 +00:00
Ondrej Holy
587238867e user-accounts: Fix crashes when dialog is canceled
Changes from !373 causes crashes when "Add User" dialog is canceled.
Check return value and generate user avatar only if valid user is
returned to fix the crashes.
2019-02-08 09:45:35 +01:00
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