Commit graph

489 commits

Author SHA1 Message Date
Bastien Nocera
9e6bed424f user-accounts: Update fingerprint strings from fprintd
Meaning that the strings used in the User Accounts panel should now
match the ones used in fprintd, and thus be translated.

https://bugzilla.gnome.org/show_bug.cgi?id=792630
2018-02-06 14:21:47 +01:00
Felipe Borges
028a06ff98 user-accounts: Introduce the new Avatar Chooser popover
This is based in the Avatar Chooser specifications available at
https://wiki.gnome.org/Design/OS/AvatarChooser#Tentative_Design

https://bugzilla.gnome.org/show_bug.cgi?id=766670
2018-02-05 16:18:24 +01:00
Felipe Borges
169a0b3d56 user-accounts: Introduce a UI template for UmPhotoDialog
https://bugzilla.gnome.org/show_bug.cgi?id=766670
2018-02-05 16:18:24 +01:00
Felipe Borges
3fb1c1dca1 user-accounts: Turn UmPhotoDialog in a full GObject
For the new avatar-chooser implementation we will use Gtk+ widget
composite templates.

https://bugzilla.gnome.org/show_bug.cgi?id=766670
2018-02-05 16:17:53 +01:00
Felipe Borges
0f893b7cff user-accounts: Make face images bigger
Now we present 72x72 faces in a 4x4 grid.

https://bugzilla.gnome.org/show_bug.cgi?id=792243
2018-02-05 16:17:10 +01:00
Felipe Borges
ffe5aac838 user-accounts: Update face images
The faces that are included in the users panel are really old,
the style is outdated and they are too small for modern designs
as well as hidpi screens.

https://bugzilla.gnome.org/show_bug.cgi?id=792243
2018-02-05 16:17:10 +01:00
Ondrej Holy
4e43bd6ce8 user-accounts: Prevent crashes if current user is not in carousel
In a specific cases, current user doesn't have to be returned from
accountsservice, or can be skipped by act_user_is_system_account check.
System users should not be shown. This is expected for root account,
but should not happen with regular user accounts. It needs to be fixed
in accountsservice if you see this happening with regular user accounts.
We have to be just sure that Users panel doesn't crash in such cases
and show all non-system user accounts returned from accountsservice.
Empty page is shown currently only if act_user_manager_list_users
returns nothing, but it has to be also shown if only system accounts
are returned. To fix this issue, do not try to show current user, but
show first user account in carousel instead if there is any. First user
account is current user in normal case.

The patch also fixes problems that current user account is sometimes
selected instead of currently selected user account. This is because
of preselection of first item in um_carousel_add, which causes unwanted
signal emissions...

https://bugzilla.gnome.org/show_bug.cgi?id=773673
2018-02-02 13:40:37 +01:00
Felipe Borges
a701b4646c user-accounts: Introduce an empty state page
There are eventually corner cases where there's no user other than
root in the system and control-center can be launched by the root
user (not recommended). In this cases, the panel crashes without
any user to show (since accountsservice would just list normal
users).

This patch introduces an empty state[0] "No Users Page".

[0] https://wiki.gnome.org/Design/OS/EmptyStates

https://bugzilla.gnome.org/show_bug.cgi?id=773673
2018-02-02 12:49:53 +01:00
Michael Catanzaro
09b94a9b53 user-accounts: Fix definition of MAXNAMELEN
Currently we get MAXNAMELEN from glibc's LOGIN_NAME_MAX, if available,
and sysconf otherwise. But the maximum username length supported by
glibc and the kernel is actually way larger than the maximum length that
actually works in practice. On Linux, anything larger than 32 characters
is not going to fit into utmp, and will therefore be rejected by
useradd. Then gnome-control-center will spit out a confusing error
message dialog.

Let's spare our users from that.

useradd (in shadow-utils) gets its max name size from the following
magic:

 /* Maximum length of usernames */
 #ifdef HAVE_UTMPX_H
 # include <utmpx.h>
 # define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user))
 #else
 # include <utmp.h>
 # ifdef HAVE_STRUCT_UTMP_UT_USER
 #  define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user))
 # else
 #  ifdef HAVE_STRUCT_UTMP_UT_NAME
 #   define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_name))
 #  else
 #   define USER_NAME_MAX_LENGTH 32
 #  endif
 # endif
 #endif

It's more work than necessary. utmpx is standardized by POSIX (it's
actually an XSI extension), whereas utmp is not, so let's just use
utmpx. This ought to work on at least FreeBSD as well. And if any free
operating systems that care about GNOME don't have utmpx yet, no doubt
they'll send patches.

https://bugzilla.gnome.org/show_bug.cgi?id=724193
2018-02-01 09:32:58 -06:00
Michael Catanzaro
0344f663dc user-accounts: Do not suggest usernames that are too long
We assume that we only generate valid usernames, so make sure they're
short enough to be used, else we'll display a dialog with a meaningless
error message when useradd fails.

Note that this commit doesn't completely fix the bug, as our definition
of MAXNAMELEN is different from useradd's.

https://bugzilla.gnome.org/show_bug.cgi?id=766401
2018-01-31 14:18:37 -06:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Iñigo Martínez
d7012d0337 build: Move libgd and gvc modules to subprojects
In order to share the libgd and gvc modules between autotools and
meson, this patch moves their directories to subprojects
directory and updates autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 19:02:57 -02:00
Georges Basile Stavracas Neto
b23ef59926 shell-model: Remove old categories
Since we don't maintain two different shells anymore, there
is no need to maintain the two different sets of categories
in the desktop files.

This commit also drops the "#ifdef CC_ENABLE_ALT_CATEGORIES"
blocks, since the previous commit removed that define.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Ondrej Holy
51c9a3235b user-accounts: Fix password strenght check
It is possible to use weak passwords in dialogs currently, which is
not intentional and leads to problems in case of changing password of
current user. This regression was introduced by Bug 780002, which added
new strength level for weak passwords. Let's reflect the new level also
when setting sensitivity...

https://bugzilla.gnome.org/show_bug.cgi?id=788122
2017-09-25 14:23:24 +02:00
Silvère Latchurié
7bd7fcdf2c user-accounts: Handle EXIF orientation
Apply the EXIF orientation of the picture that has been picked.

https://bugzilla.gnome.org/show_bug.cgi?id=706547
2017-05-15 11:51:08 +02:00
Felipe Borges
936899277c user-accounts: Explicitly set photo_popup transient_for window
Instead of relying in the underlying machinery for guessing the
correct window.

https://bugzilla.gnome.org/show_bug.cgi?id=780498
2017-05-03 13:58:45 +02:00
Felipe Borges
9536dcdd63 user-accounts: Use gtk_menu_popup_at_widget for user photo popup
gtk_menu_popup has been deprecated since version 3.22.

The use of gtk_menu_popup lately was causing gtk+ to have to guess
the right position to present the widget, causing the menu to
eventually appear in a wrong position under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=780498
2017-05-03 13:05:49 +02:00
Ondrej Holy
4cad3ca408 user-accounts: Change colors of password strength indicator
Use red-yellow- green colors for strength indicator levels.

https://bugzilla.gnome.org/show_bug.cgi?id=780002
2017-05-03 11:39:44 +02:00
Ondrej Holy
cd1f96f8ba user-accounts: Improve password hints
Don't say "Good password!" for all acceptable password (e.g. weak passwords).
Say explicitely that password needs to be longer for short passwords.

https://bugzilla.gnome.org/show_bug.cgi?id=780002
2017-05-03 11:39:42 +02:00
Ondrej Holy
e89d4f59c2 user-accounts: Add strength indicator level for weak passwords
Add first level for short, or weak passwords to be obvious that
the strength indicator signalize something.

https://bugzilla.gnome.org/show_bug.cgi?id=780002
2017-05-03 11:37:28 +02:00
Ondrej Holy
9e4123363e user-accounts: Remove unused password hints
Short password hints are not used for some time. Let's remove them.

https://bugzilla.gnome.org/show_bug.cgi?id=780002
2017-05-03 11:37:28 +02:00
Ondrej Holy
466264e78d user-accounts: Simplify scale-factor handling
Remove redundant on_scale_factor_changed function and call render_image
function directly.

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-05-03 10:34:38 +02:00
Ondrej Holy
c09e8f5b37 user-accounts: Handle pixel-size changes
Commit 8e6fccc introduced pixel-size handling for user icon, however,
the icon is not resized on each pixel-size change as it should. This
is not problem currently, but might be problem in the future...

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-05-03 10:33:46 +02:00
Ondrej Holy
3d8d45ab6b user-accounts: Fix wording mistake
https://bugzilla.gnome.org/show_bug.cgi?id=781133
2017-05-03 10:30:34 +02:00
Ondrej Holy
c49d1ccb4a user-accounts: Fix widget alignment on add user dialog
Widgets on local and enterprise pages of add user dialog don't have
same width regardless of size groups. It is caused by different margins
and borders of various widgets. Let's change them to be like in mockup.

https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-03-22 14:49:45 +01:00
Ondrej Holy
a748d52b44 user-accounts: Unify row spacing
Commit 51a184b changed row spacing for local accounts, change that
also for enterprise part.

https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-03-22 14:37:44 +01:00
Ondrej Holy
932cdd38e9 user-accounts: Add missing widgets in size group
Some control widgets are missing in size group. Let's add them and also
allow hexpand for them.

https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-03-22 14:37:07 +01:00
Ondrej Holy
921ef1b1f6 user-accounts: Align "Enterprise login" toggle
The "Enterprise login" toggle should have bigger border as per mockup.
Let's increase it a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-03-22 14:37:07 +01:00
Ondrej Holy
54c4dbb712 user-accounts: Align multiline labels
The multiline labels doesn't have xalign 0 and may look wrong. Align
the labels to reflect the mockup.

https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-03-22 14:35:26 +01:00
Felipe Borges
50c2af0cfb user-accounts: Avoid markup in "Your Account" label
The label indicating which photo in the Carousel belongs to the
current user had the <small> markup within the translatable string,
causing unnecessary work for translators. See
https://wiki.gnome.org/TranslationProject/DevGuidelines/Avoid%20markup%20wherever%20possible

This patch formats the string with g_strdup_printf, leaving the
markup tags out of the translatable message.
2017-02-24 17:12:10 +01:00
Ondrej Holy
60c315b53b user-accounts: Fix crash when name is changed and dialogue closed
Wrong variables are used to store timeout id, consequently, the sources
are not properly removed in all cases. Then the dialog may crash in certain
cases if it is closed before the source functions are called.

https://bugzilla.gnome.org/show_bug.cgi?id=778595
2017-02-16 09:21:42 +01:00
Ondrej Holy
9440035560 user-accounts: Don't modify pre-filled username
If user type custom username, don't modify it automatically when
changing fullname.

https://bugzilla.gnome.org/show_bug.cgi?id=778555
2017-02-14 18:44:52 +01:00
Jeremy Bicha
206310e9fb user-accounts: Use ellipsis for "Remove User"
https://bugzilla.gnome.org/show_bug.cgi?id=778568
2017-02-13 19:56:07 +01:00
Felipe Borges
51a184b1b7 user-accounts: Align the elements of "Add User" dialog
https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-02-13 19:15:05 +01:00
Ondrej Holy
8e6fccc8c4 user-accounts: Make user icon bigger
User icon should be bigger as per mockup.

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 14:09:09 +01:00
Allan Day
05f675a037 user-accounts: Give user image button a raised appearance
So it looks clickable.

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 12:22:04 +00:00
Allan Day
e84b10a4a2 user-accounts: Add space above settings
The settings were a bit tightly placed to the top of the panel.
This looks more balanced.

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 12:13:20 +00:00
Felipe Borges
da997dc2ce user-accounts: Save vertical space in the alignment of widgets
Compensate border-width changes with respective margins.

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 12:03:25 +01:00
Ondrej Holy
b4c26363d8 user-accounts: Disable animations when reloading users
Animations cause unwanted effects when reloading users, disable them.

https://bugzilla.gnome.org/show_bug.cgi?id=778405
2017-02-13 11:58:42 +01:00
Ondrej Holy
c8b535007f user-accounts: Don't move with arrow during animations
Don't move with the arrow during the stack animation in order to avoid
some ugly movements...

https://bugzilla.gnome.org/show_bug.cgi?id=778405
2017-02-13 11:58:42 +01:00
Felipe Borges
b8983f906f user-accounts: Animate the Carousel Arrow
https://bugzilla.gnome.org/show_bug.cgi?id=778405
2017-02-13 11:58:42 +01:00
Felipe Borges
bce05cb8bd user-accounts: Animate page transitions in the Carousel
https://bugzilla.gnome.org/show_bug.cgi?id=778405
2017-02-13 11:58:42 +01:00
Felipe Borges
c1f56c3e4a user-accounts: Re-label "Remove Account" button to "Remove User"
"Remove User" matches better to "Add User" than "Remove Account".

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 11:55:32 +01:00
Felipe Borges
92e99f677f user-account: Use a stack in user-icon to keep the same size
This fixes the undesired jumps (resizes) while switching between
"Your Account" and any other account.

https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 11:55:32 +01:00
Felipe Borges
ffb2aaabe7 user-accounts: Drop the user photo selector arrow
https://bugzilla.gnome.org/show_bug.cgi?id=778458
2017-02-13 11:55:32 +01:00
Bastien Nocera
5c5d608730 user-accounts: Fix button sensitivity in photo dialogue
g_file_info_get_content_type() returns an internal string, and we were
freeing the file_info we got it from in the next line, so it's a miracle
that the mime_type was ever not garbage.

https://bugzilla.gnome.org/show_bug.cgi?id=778424
2017-02-12 20:09:44 +01:00
Felipe Borges
1610fe581f user-accounts: Make the UmCarouselItems look the same on hover
UmCarouselItem is a button, but since we have now the arrow which
points to the selected item, we don't need any other visual
feedback (such as hover border/background).

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2017-02-09 19:25:28 +01:00
Felipe Borges
d2529a1a09 user-accounts: Add "Your account" label below proper UmCarouselItem
Set a margin for the username label instead of using the container
spacing property. In doing so the labels are not so far apart from
each other, but still distant from the profile icon/image.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2017-02-09 19:25:28 +01:00