Commit graph

689 commits

Author SHA1 Message Date
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
fb4f430f79 user-accounts: Drop unused CSS style 2022-03-07 15:59:46 +00:00
Felipe Borges
dfb2fa31af users: Make FileChooser inside AvatarChooser transient to main window
Depends on
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1253

Fixes #1677
2022-03-03 17:22:38 +01: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
4b21c5b056 user-accounts: Load avatar image files in "Other users" list
We were checking for the existance of an image file as avatar when
setting up the main avatar widget in the page, but the same wasn't
done for the avatars displayed in the "Other users" list. These
were AdwAvatars simply initialized to use the user initials.

Now we load the user image (if it exists) and it will fallback to
initials when an image isn't set.

Fixes #1658
2022-03-02 16:04:26 +00:00
Felipe Borges
0019b0869a user-accounts: Reinstate fingerprint dialog
The port of the Fingerprint dialog to gtk4 wasn't completed.
Now the dialog is expected to function again.
2022-02-28 15:47:42 +00:00
Jonas Ådahl
5dc4081e2c sharing/remote-desktop: Initialize username/password if not set
If no password or username was set (not even an empty one), initialize
them to something, specifically the username of the user of the session,
and a auto generated password.
2022-02-26 18:19:14 +00:00
Pablo Correa Gómez
fcbe0c039b user-accounts: Try non TRANSLIT conversion if TRANSLIT conversion fails
This fixes a crash in musl-based systems, where TRANSLIT is not
implemented. I followed musl-maintainer recommendation[1] of doing
a run-time check to verify the behavior under these circumstances.

[1] https://github.com/akrennmair/newsbeuter/issues/364#issuecomment-250208235
2022-02-15 14:08:04 +00:00
Felipe Borges
1f693be757 user-accounts: Reset avatar widget when changing user pages
Otherwise the same source image is going to be used for other users
that don't have their own avatar image set.
2022-02-15 13:57:55 +00:00
Felipe Borges
26cc82c754 user-accounts: Always populate other users list
We were not re-populating the list when switching panels.

Related #1631
2022-02-09 15:04:32 +00:00
Felipe Borges
0bf91ed4d6 user-accounts: Fix crash while cancelling user rename
Fixes #1632
2022-02-09 10:51:45 +01:00
Georges Basile Stavracas Neto
59e3c32825 users: Set the activatable-widget property of various rows
It makes it slightly more convenient to interact with them,
since they become activatable.
2022-02-08 11:10:37 -03:00
Georges Basile Stavracas Neto
55072f54db users: Hide enterprise group in new users dialog
Otherwise we get a strange shadow at the bottom.
2022-02-08 11:05:51 -03:00
Georges Basile Stavracas Neto
998db79732 users: Cleanup and modernize CcLoginHistoryDialog
- Remove all 'can-focus' properties, rely on GTK defaults
 - Use AdwPreferencesPage internally
 - Make dialog resizable
 - Set 'icon-name' in header buttons instead of a GtkImage
2022-02-08 10:53:55 -03: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
Sam Hewitt
65b109763b Cleanup private use symbolics
- remove references to deprecated app symbolics
- reduce file size of private-use icons
- update dated icons
2022-02-04 18:12:41 +00:00
Philip Withnall
d46601d590 user-accounts: Make malcontent-control optional
Hide the button to open the parental controls UI if it’s not installed.
This will allow distributions to split the dependency, making
gnome-control-center suggest (rather than require) malcontent-ui, while
still requiring libmalcontent.

In turn, this will allow malcontent-ui to be uninstalled without
requiring gnome-control-center to be uninstalled, which will satisfy
users who feel the need to uninstall it because it’s not useful to them.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-03 14:18:25 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Georges Basile Stavracas Neto
acd59aec65 Rename app-id to org.gnome.Settings
Rename the app-id to org.gnome.Settings since this is what
we've been calling it for many years now. Adjust all files
that derive from the app-id, such as the desktop file, D-Bus
service file names, search providers, GSettings schemas, to
match that.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/344
2022-01-21 13:08:50 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +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
Georges Basile Stavracas Neto
5ca53a0a78 Drop Cheese dependency
Cheese is not ready for GTK4, and probably won't ever be, so just
drop the dependency. We'll reimplement webcam support using PipeWire
later.
2021-12-14 22:34:21 -03: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
Jakub Steiner
c4034c8498 fingerprinting: out of style graphics
- use the geometric shapes of the [illustration
  style](https://gitlab.gnome.org/Teams/Design/app-illustrations/)
  for the graphical assets.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1424
2021-09-24 11:42:29 +00:00
Bastien Nocera
c239bce3e9 user-accounts: Add Parental Controls keywords
As designers did not like the presence of a separate parental controls
application in the launchers duplicating launching the management app
through the users panel, we should add the keywords usually associated
with the parental controls app to the panel's keywords so functionality
can still be accessed this way.

See https://gitlab.freedesktop.org/pwithnall/malcontent/-/merge_requests/119#note_1052271
2021-09-08 08:23:31 +00:00
Bastien Nocera
51500e38a8 user-accounts: Add debug when launching malcontent-control 2021-09-05 21:55:06 +00:00
Bastien Nocera
3e26f594fc user-accounts: Avoid double password prompt
Don't require a password to be typed just to be able to launch the
parental controls app which itself will ask for a password to be typed.
2021-09-05 21:55:06 +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
Nishal Kulkarni
df8eb92efc cc-avatar-chooser.c: Enable remote file selection
Currently user can choose avatar only from local files.

This prevents users from loading a file at a remote location.

Changes made include:

1. Setting local-only property to false in `cc_avatar_chooser_select_file`
2. Getting file uri and creating a GFile from it.
3. Reading the GFile into an input stream.
4. Loading image from this stream.

Closes: #813
2021-05-07 03:37:01 +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
Robert Ancell
cbb2d31a38 user-accounts: Add missing GTK_WIDGET cast
Was missing in 77df081fec
2021-02-11 16:14:47 +13: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
dc09e0633c user-accounts: Imply parental controls permissions when unlocking
This allows querying the parental controls status of other non-admin
users once the panel is unlocked.

Implication is not recursive in polkit, so it’s unfortunately not
sufficient to just imply
`org.freedesktop.MalcontentControl.administration` (which itself implies
all the other actions).

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
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
Robert Ancell
c86d1c09c8 user-accounts: Simplify render_user_icon function 2021-01-08 15:28:47 +13:00
Robert Ancell
ff6aabb511 user-accounts: Use consistent whitespace 2021-01-08 15:25:07 +13:00
Robert Ancell
c690e921ca user-accounts: Use g_autoptr/g_autofree 2021-01-08 15:25:07 +13:00
Marco Trevisan (Treviño)
b031bb5758 fingerprint-dialog: Use auto-cleanup to manage removal of dialog states
For sake of simplicity we were just releasing a state once we got a
callback, however during the handling of the callback itself we are
still technically under that scenario, so we should release a state only
after the callback is completed.

This is more relevant now since when converting errors to human readable
strings we check the state we are in, and so we need to ensure that this
state is preserved until this point.
2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
ff7e4d6ebc fingerprint-dialog: Use exact comparision on all the dbus errors 2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
01fdfaccf8 fingerprint-dialog: Use more user friendly errors when showing them to user
Translate dbus errors into something that can be translated to user,
while leave to warnings all the details to help debugging.

Fixes: #1200
2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
d4745fdac1 fingerprint-dialog: Handle the 'enroll-disconnected' error properly
In case the device got disconnected while enrolling we should not try
to stop or unclaim it, but indeed show an error related to the device
not being available.

To get this we only have to remove the enrolling and claimed states now
2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
a0f028671c fingerprint-dialog: Add generic dialog actions state tracking
Use flags to track the dialog actions state so that we can:
 1. Remove multiple flags to track specific states
 2. Prevent starting again an action we're still waiting for completion
 3. Handle global visual elements (such as the busy spinner) correctly

Specifically point 3. allows to ensure that when doing concurrent
actions such as prints listing and device claiming, we will stop the
spinner only once all the operations are over.
2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
ae23cea4d1 fingerprint-dialog: Properly handle claiming errors if we're already claiming
We were a bit too permissive in handling the AlreadyInUse error during
claim, as we assumed it was always us causing it instead of properly
handing the case a device was already claimed by another caller.

So to ensure this is the case we need to avoid multiple calls to claim
until we've finished one.

Unfortunately we can't rely on a cancellable here as we may end up
cancelling the request that succeeded and we'll only get an
AlreadyClaimed error without know if it was us succeeding.

Fixes: #1201
2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
269feb1940 fingerprint-dialog: Always call EnrollStop on enrollment completed
Even if we got an error we need to always call EnrollStop so don't unset
enrolling_finger status until we're really done with it.
2020-12-11 17:46:38 +00:00
Marco Trevisan (Treviño)
5a7b9e09bf fingerprint-dialog: Don't crash when showing an error during release
We unset the local device early when releasing it, so use the one we
get the callback instead of relying in the private instance that has
been already cleared.
2020-12-11 17:46:38 +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