Commit graph

55 commits

Author SHA1 Message Date
Felipe Borges
d2c456abe6 user-accounts: Show label when another user is logged in
One cannot remove an user if they are currently logged in. Before
we used to show an error message stating that this didn't work.

Now we make the "Remove User" button insensitive and show a label
next to it stating why the user cannot be deleted.

See https://gitlab.gnome.org/GNOME/gnome-control-center/uploads/a47f3ab8606227e541a176008dc7bf64/image.png
2023-08-14 07:55:45 +00:00
Felipe Borges
3449a48ab0 user-accounts: Port "error" message dialogs to AdwToasts 2023-08-14 07:55:45 +00:00
Felipe Borges
14d358740d user-accounts: Drop "Restart" notification
We have code to show the "Restart" notification when the user
would change its account-type between STANDARD/ADMIN, except that
we never allow that to happen. So this code was never used.

We have the would_demote_only_admin function that is used to set
the visibility of the Account Type row. So we won't ever display
the Account Type row if the user would demote the only admin.
2023-08-14 07:55:45 +00:00
Felipe Borges
8289c69fd8 user-accounts: Add loading page with a spinner
Otherwise the panel might look broken in the first half second it
takes to load the user data from accountsservice. The time might
get significant for enterprise/remote accounts.
2023-08-14 07:55:45 +00:00
Felipe Borges
ae98f7d834 user-accounts: Turn "no-users-box" into an error page
We only have no users when we are unable to connect to accountsservice.
2023-08-14 07:55:45 +00:00
Felipe Borges
d7ba866f01 user-accounts: Port GtkMessageDialogs in user deletion to AdwMessageDialog 2023-08-14 07:55:45 +00:00
Automeris naranja
d621855dc8 users: Add mnemonics to the "Remove User" and "Add User" buttons 2023-06-27 16:22:56 -03:00
sunflowerskater
266c55715a general: Add tooltips to headerbar controls
Acc. HIG, "controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-06-06 13:27:00 +00:00
Felipe Borges
c8fe38c4f1 user-accounts: Move "Add User" button out of the user listbox
Per mockups at
78b6a0506b/users/users.png

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1812>
2023-06-01 01:38:20 +00:00
Robert Ancell
39ccf2c610 user-accounts: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Gotam Gorabh
f9c75e6694 user-accounts:updated the remove user dialog with AdwMessageDialog
This commit will update the GUI of remove user dialog with AdwMessageDialog which
doesn't follow design guidelines. Re-desined according to https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/users/users.png

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2093
, https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2341
2023-05-24 08:57:30 +00:00
Mpho Jele
483a5f3e8d user-accounts: Use AdwEntryRow for user full name 2023-05-17 11:14:29 +02:00
Felipe Borges
45931c783f user-accounts: Make Administrator row use info button widget
Instead of recreating the menu button and popover.
2023-05-16 13:32:21 +00:00
Felipe Borges
d586df5c87 user-accounts: Add a popover describing the autologin functionality
Fixes #2235
2023-05-16 13:32:21 +00:00
sunflowerskater
1ba63a360c user-panel: Add popover explaining about the "Administrator" option
This change adds a GtkPopover to explain about the "Administrator" option like in the mockups below:
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/users/users.png
2023-05-10 09:37:04 +00:00
Gotam Gorabh
19d611ad03 user-accounts: Removed account activity window
This changes remove the account activity window or
login history as it is less used or no use.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2096
2023-03-24 08:38:03 +00:00
Markus Göllnitz
98f7a40d24 multiple panels: show start title buttons in header bar
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.

Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-16 13:18:37 +00:00
Jake Dane
37a579b6b0 Replace "application" with "app"
This is part of an initiative to use "app" instead of "applications",
see: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123

Redo of !1539 that was closed by a ghosting user.

Replaces "application" with "app" in user facing strings in these
panels:

- applications
- camera, location, microphone
- default-apps
- multitasking
- notifications
- removable-media
- search
- usage
- user-accounts

Fixes: #2208.
2023-01-23 11:10:28 +00:00
Mohammed Sadiq
45656c4212 user-accounts: Fix account list styling
Fixes #1926
2022-11-28 11:00:04 +00:00
Mohammed Sadiq
14f2d0e6ef user: Use CcListRow where appropriate 2022-11-25 20:37:49 +05:30
Mpho Jele
272b73795d user-accounts: Make back button switch to current user or panels list
When the window AdwLeaflet is folded the back button should either
switch to the panels list if the selected user is the current user
or switch to the current user if the selected user is from the
"other users" list
2022-07-24 15:29:46 +00:00
Bilal Elmoussaoui
bb86c36147 panels: Use icon-name property instead
Don't embed a custom GtkImage as that would lack the appropriate style
classes
that GtkButton/GtkMenuButton would automatically add for us
2022-07-20 14:15:57 +02:00
Lukáš Tyrychtr
87ef7e25f6 Add a few missing a11y labels to the users panel 2022-06-19 21:41:09 +00:00
Felipe Borges
854c888214 user-accounts: Add cutout to avatar edit button
Shamelessly copied from
https://gitlab.gnome.org/GNOME/fractal/-/blob/fractal-next/data/resources/ui/content-room-details.ui#L29
and
https://gitlab.gnome.org/GNOME/fractal/-/blob/fractal-next/data/resources/style.css#L506

Fixes #1662
2022-03-07 15:59:46 +00:00
Felipe Borges
dc032c338d user-accounts: Explicitly initialize CcAvatarChooser
Setting the Gtk.MenuButton.popover property to a CcAvatarChooser
object doesn't initialize the CcAvatarChooser object.

Fixes #1689
2022-03-03 16:13:46 +00:00
Felipe Borges
0bf91ed4d6 user-accounts: Fix crash while cancelling user rename
Fixes #1632
2022-02-09 10:51:45 +01:00
Felipe Borges
7f8e90a966 user-accounts: Port to gtk4/libadwaita implementing the new design
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/users/users.png
2022-02-08 13:29:56 +00:00
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08:00
Chingkai Chu
3b6acb1867 user-accounts: Make autologin_switch a activatable_widget
If we don't add this property for autologin_row, the shortcut to
toggle the GtkSwitch won't work.

See: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1501
2021-10-29 11:21:45 +00:00
Bastien Nocera
97e858d697 user-accounts: Hide parental controls row if unavailable
Don't show the parental controls line for administrator accounts.
2021-09-05 21:55:06 +00:00
Kalev Lember
e65a4ba77b user-accounts: Fix spurious underscore in front of "Parental Controls" label 2021-08-26 16:34:04 +02:00
Mohammed Sadiq
179d6aeb2d user: Use content style for listboxes 2021-05-19 03:25:47 +00:00
Mohammed Sadiq
092c77b0c1 user: Allow activating rows
HdyActionRow are not activatable by default. Explicitly enable them.
2021-05-12 03:18:35 +00:00
Ian Douglas Scott
5e858826c5 user-accounts: Use HdyClamp 2021-05-07 03:23:31 +00:00
Ian Douglas Scott
aff0b446bc user-accounts: Use HdyActionRow 2021-05-07 03:23:31 +00:00
Philip Withnall
77df081fec user-accounts: Make dim-label behaviour better for parental controls row
This makes it behave a bit more like other rows.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/26
2021-02-01 03:46:14 +00:00
Philip Withnall
2d41210b2f user-accounts: Add a description label for the Parental Controls row
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/26
2021-02-01 03:46:14 +00:00
Philip Withnall
2809316fd1 user-accounts: Show ‘Add User’ button when panel is locked
Rather than hiding the ‘Add User’ button when the panel is locked, show
it in an insensitive state. This gives the user a hint that in order to
add a new user, they will need to unlock the panel.

See: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/26#note_705945

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-11 17:19:11 +00:00
Umang Jain
cd391b4942 user-accounts: Add a launcher for parental controls app
malcontent ships malcontent-control[1] which is the user interface
to interact with various parental-control settings. Add a launcher
as per the design mockups[2] to launch malcontent-control.

[1]: https://gitlab.freedesktop.org/pwithnall/malcontent/-/blob/master/README.md
[2]: https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/users/users.png
2020-06-17 12:56:43 +01:00
Ondrej Holy
502583fcc5 user-accounts: Move add user button tooltip in UI file
The add user button is shown only if the panel is unlocked, but
tooltips are also set for the case when the panel is not unlocked.
Let's move the tooltip text in the UI file directly and remove
the obsolete codes.
2020-05-05 09:25:41 +00:00
Ondrej Holy
ac46922b65 user-accounts: Show permissions toolbar also if no users found
The permissions toolbar is not shown currently if no users are found
which prevents creation of new user accounts. Let's show the toolbar
also in this case.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/988
2020-05-05 09:25:41 +00:00
Felipe Borges
b4bcae2d2d user-accounts: Only set "Add User" visibility when permission changed
To avoid showing and hiding rapidly.

See #859
2020-02-17 15:04:26 +01:00
Felipe Borges
8a1c6f696e user-accounts: Rename "Last Login" entry to "Account Activity"
According to the mockups at
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/users/users.png

Other than renaming the label, we prepend "Last login" to the
date-time string.

Fixes #771
2020-01-30 08:04:09 +00:00
Felipe Borges
6db4d9e933 user-account: Add border around user image button
According to the mockups at
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/users/users.png

Fixes #771
2020-01-30 08:04:09 +00:00
Felipe Borges
05313d35e2 user-accounts: UI style improvements
According to the mockups at
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/users/users.png

Fixes #771
2020-01-30 08:04:09 +00:00
Felipe Borges
43b41cb1fa user-accounts: Make the full_name_entry and editable widget
According to the mockups at
https://gitlab.gnome.org/Teams/Design/settings-mockups/blob/master/users/users.png

Fixes #771
2020-01-30 08:04:09 +00:00
Felipe Borges
3576133654 user-accounts: Use CcPermissionInfobar to lock/unlock the panel
This moves the GtkLockButton out of the headerbar and starts to
consume the CcPermissionInfobar API to lock/unlock the panel.

See #771
2020-01-06 14:43:11 +00:00
Robert Ancell
cb6241f540 user-accounts: Replace GtkStack child names with widget references
The child names are easier to break if widgets are changed - this can't be
detected by the compiler.
2019-12-10 09:54:27 +00:00
Mohammed Sadiq
48912bef01 user-panel: Fix entry overflow on minimum width
And set a margin on either side, so that it won't expand up to the border
2019-06-10 16:46:16 +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