Commit graph

6293 commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
811d3584b6 fingerprint-manager: Cleanup devices cache when fprintd stops 2020-06-26 01:54:04 +00:00
Marco Trevisan (Treviño)
e155b95da6 fingerprint-manager: Add ability to cache devices 2020-06-26 01:54:03 +00:00
Marco Trevisan (Treviño)
d8c119db2d fingerprint-manager: Add completion callback to update state 2020-06-26 01:54:03 +00:00
Marco Trevisan (Treviño)
e935cb9d74 fingerprint-dialog: Use fingerprint manager to notify state changes 2020-06-26 01:54:03 +00:00
Marco Trevisan (Treviño)
25079fc505 user-panel: Use fingerprint manager to track the enrollment state 2020-06-26 01:54:03 +00:00
Marco Trevisan (Treviño)
9d1038db1f user-accounts: Add fingerprint manager
This is a wrapper to read the state of the fingerprint devices and to check
asynchronously whether we have them and if they have enrolled prints we can
use to log-in.
2020-06-26 01:54:03 +00:00
Marek Kasik
dfbe1faea2 printers: Update GtkListBox of printers consecutively
Goal of this commit is to not overwhelm UI when a lot of printers is added
to CUPS. You can reproduce this situation when you add e.g. 30 printers using
lpadmin. Th UI stops to respond for some time.

To do so, the printer entries are not deleted every time there is a request
for updating of the list of printers but only new printer entries are added
and printer entries of deleted printers are removed. Other printer
entries are just updated by new method pp_printer_entry_update().
Which, by the way, is almost whole taken from pp_printer_entry_new().

This needed to add sort function for the list of printer entries. It sorts
printers according to their names not taking case into account.

In the similar manner, the filter function was extended to not show printers
which are being deleted. This needs a list of names of deleted printers
which we keep until they are really deleted.
One important thing here is the "reference" object which points to the panel
itself via its "self" key. We pass this object to the pp_printer_delete_async()'s
callback so it knows whether it can remove the printer's name from the list
of deleted printers (once the panel is being destroyed it clears the key itself).
2020-06-22 11:57:57 +00:00
Robert Ancell
d9ea45354e sound: Stop non-interactive profile changes from triggering changed events
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1033
2020-06-17 19:29:57 +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
Umang Jain
dbf1b0dafb applications: Integrate with malcontent's restrictions
malcontent[1] is  parental(or admin) controlled interface which
can restrict a application's visibility and interactivity for a
standard user. Hence, if the current uid has any restrictions
on its installed applications, filter them out from the applications
panel.

Make the malcontent support enable or disable by setting it up as
a build-time meson option.

[1]: https://gitlab.freedesktop.org/pwithnall/malcontent/
2020-06-17 12:56:43 +01:00
Mohammed Sadiq
7683a09ff7 datetime: Use the new time editor 2020-06-15 04:55:39 +00:00
Mohammed Sadiq
63243d886a Add time editor widget 2020-06-15 04:55:39 +00:00
lenke182
5c5b46ddd2 Revert "applications: snap-row: Shorten permission text to prevent button overflow (2)"
This reverts commit a4f42995c75c3d0a35aa7a0dfbc7d0d6bc3090ab
2020-06-15 04:48:16 +00:00
Marek Kasik
fb3e693ddf printers: Clear GSource id when printer removal finishes
Remove GSource used for real deletion of a printer when
the "Undo" notification was dismissed.
Also set the timout id of the notitification to 0 when triggered.
Replace cancel_notification_timeout() with one line.

The issue fixed here could be reproduced this way:
1) Open Printers panel
2) Remove a printer
3) Press back button to go to overview
4) Wait 10 seconds
5) Return to the printers panel
6) Close gnome-control-center

Result:
Critical warning on removal of non-existing GSource
2020-06-08 09:34:27 +00:00
Marek Kasik
cdb4727690 printers: Do not crash due to wrong argument
Callback for handling of "notification-dismiss-button" got its
parameters swapped. This resulted in crash when user closed
notification about deleted printer.
This commit converts the on_notification_dismissed() function
to accept swapped arguments as was probably intended.
2020-06-03 18:02:50 +02:00
Ludovico de Nittis
520ca91fe8 lock: Add USB protection entry
In the screen lock tab we add a "Forbid new USB devices" entry with a
switch to enable or disable said protection.

The actual USB protection is handled by gnome-settings-daemon and
USBGuard.

We use the "Available" property of gnome-settings-daemon to check
if we are able to offer the USB protection (i.e. USBGuard is
installed with the minimum required version ecc..).
If the host doesn't met the requirements we hide the USB
protetion row entirely.

Given the fact that the always on protection benefits are very slim we
decided to give just an on/off switch that by default controls the
"with lock screen" protection level.
2020-05-28 10:01:24 +02:00
Marco Trevisan (Treviño)
3c158afa5e fingerprint-dialog: Disconnect signals and reset stages on enroll-restart
This happens if going to the previous page when enrolling a finger
2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
6bbbd8d04e fingerprint-dialog: Don't limit the number of maximum enroll stages
There are devices with more than 10 enroll stages we should handle, so
instead of hardcoding a grid of images, let's just build this dynamically
using a flowbox
2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
97965e1619 fingerprint-dialog: Don't use sync calls for deleting fingerprints
Don't make the UI to block while deleting the saved prints (that might take
some time, especially for devices with internal storage) but just use a task
with a thread that:
 - Mark the fingerprint row as unsenstive
 - Calls the method to delete prints
 - In the same thread, calls the method to fetch the updated informations
 - Returns in set_fingerprint_row_cb where we update the UI again

Again this would be nicer to be done just using async calls but this is
something to do in some bigger refactor.
2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
014c7d77cc user-panel: Only load the fingerprint state once
Don't load the fingerprint information all the times we update the view, but
load it during initialization only.

The fingerprint state in fact can only change because we requested it
through the dialog that we control already and that would update the
relevant widgets state anyways.

Also, given that the fingerprint settings are visible for the current user
anyway, we can track this only with a simple boolean, instead of using a set
of UIDs.
2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
3107279759 user-panel: Pass a cancellable to the fingerprint operations
And cancel it when changing user and on disposition
2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
8ace2050f7 fingerprint-dialog: Make the operations cancellable 2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
e12bfed744 user-panel: Don't wait for fprintd on initialization
When opening the user panel we g-c-c performs lots of sync operations that
may cause a noticeable slowdown, especially when a fingerprint device is
available, in fact set_fingerprint_label() call leads to:
  - DBus sync request of the system bus
  - fprintd dbus-activation
    + This leads to sync opening of all the devices, that might also cause
      a slowdown, depending on the devices drivers
  - Dbus sync calls to the device to get the list of enrolled fingerprints

Only after we've a reply, we update the g-c-c UI and continue the execution.

The fingerprint dialog code would need some global refactor, but to fix this
without big changes, let's just use GTask that runs a thread in wich we do
all the sync operations, and once done we finally update the widget state.
2020-05-27 10:20:48 +00:00
Marco Trevisan (Treviño)
826f83c48a user-panel: Add reference to selected user and clear on dispose
The object was wrongly unreffed (as ActUserManager has the ownership) on
user switch, so add a reference instead when assigning it to our private
ref and unref it on dispose.
2020-05-27 10:20:48 +00:00
prshnt19
b513417f7f lock: Fix typo 2020-05-13 05:04:50 +00:00
Mohammed Sadiq
a623a3a2e3 sharing: Use the new list row patterns 2020-05-12 22:33:15 +00:00
Mohammed Sadiq
70ded401b0 notifications: Use CcListRow for list box rows
This will reduce the amount of code used and let the user change
the item value clicking on the row.
2020-05-12 22:24:00 +00:00
Elia Geretto
1bf5d4f55f printers: Do not authenticate SMB servers when search field is edited
When the search field in the "Add Printer" dialog is edited, no
authentication with a remote SMB server should be attempted. The server
should just be added to the list and marked with "Server requires
authentication". The user can then authenticate the server by clicking
on it.

The behavior described above is probably the intended one when the code
was written, since there is no closure registered for the
"authentication-required" signal in the function this commit modifies.
This commit should simply restore the intended behavior.

Resolves: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/755
2020-05-12 22:16:32 +00:00
Daniel García Moreno
3bcea691b8 user-accounts: Use custom setting to override faces
This patch provides an easy way to override default faces using
org.gnome.desktop.interface.avatar-directories settings configuration
that can be used in gnome-initial-setup too so downstream can override
default avatar faces without the need of a patch.

Fix https://gitlab.gnome.org/GNOME/gnome-control-center/issues/678
2020-05-07 15:06:02 +00: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
1a38a971ec user-accounts: Show add user button also if no users found
The add user button is not shown currently if no users are found
even if the panel is unlocked. Let's show the button to allow
user creation in this case.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/988
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
Robert Ancell
e74a41794c info-overview: Remove unnecessary initialization of string.
Was introduced in 4d5f81e, but doesn't make sense or do anything.
2020-04-21 10:02:17 +12:00
Robert Ancell
e32702ee87 online-accounts: Use g_autoptr for GError usage
Fixes a GError leak.
2020-04-17 14:57:40 +12:00
Mart Raudsepp
4d7406b8af info: Raise udisks minimum dependency for g_autoptr usage
g_autoptr(UDisksClient) usage was added, but udisks added the support
only in v2.8.2

Fixes: 6815787012
2020-04-16 04:06:11 +00:00
Robert Ancell
ead0ae4178 applications: Use new snapd-glib API for labelling Snap interfaces
This removes the need to put translated strings in g-c-c, and allows them to be
shared between multiple applications that use Snaps.
2020-04-16 03:59:33 +00:00
Robert Ancell
f246d40e95 applications: Fix only connected snap interfaces showing
Not enough information was being queried from snapd.
2020-04-16 15:49:17 +12:00
D. Auer
23f8d9134e power: Add Energy keyword for desktop search 2020-04-15 06:18:29 +00:00
Robert Ancell
d82f241a9f display: Add missing parameter checks on CcDisplayConfig methods
Closes #945
2020-04-14 11:25:33 +12:00
Bastien Nocera
4d5f81e996 info-overview: Verify data coming from switcheroo-control
Don't crash if the data coming from switcheroo-control is somehow
garbage, and make sure that we actually got pairs of key-values.

Closes: #944
2020-04-08 14:13:45 +02:00
Gunnar Hjalmarsson
05f3cb67c4 Make privacy a valid search term to find the Privacy panels 2020-04-06 23:08:22 +00:00
António Fernandes
cde8f69ad6 sharing: Set label for checkbox properly
The Screen Sharing dialog used to have a switch, which was changed to a
checkbox in 8b68961431

However, unlike switches, checkboxes are expected to have clicable labels

Let's set the label properly, instead of doing it the switch way.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/565
2020-03-30 15:37:03 +00:00
Matthew Leeds
7b1bed5ab0 common: Improve how we print time periods
Print e.g. "2 minutes" instead of "2 minutes 0 seconds". Also, update
the path in Totem from which this was copied. The MR to make the same
change in Totem is here:
https://gitlab.gnome.org/GNOME/totem/merge_requests/134
2020-03-30 03:43:09 +00:00
Robert Ancell
fe91d17b43 printers: Remove nesting on a GVariant iteration 2020-03-30 03:24:58 +00:00
Robert Ancell
02d001564a printers: Simplify D-Bus error case branches 2020-03-30 03:24:58 +00:00
Robert Ancell
e256dd57c3 printers: Replace D-Bus unrefs with g_autoptr
This case could leak the GDBusConnection
2020-03-30 03:24:58 +00:00
Robert Ancell
6b79e7ffa1 printers: Replace D-Bus unrefs with g_autoptr 2020-03-30 03:24:58 +00:00
Robert Ancell
2b9815dbf8 printers: Remove unnecessary checks on result of g_variant_get
This always returns a value or hits an assertion.
2020-03-30 03:24:58 +00:00
Robert Ancell
815db8f404 printers: Replace explicit g_variant_unref calls with g_autoptr 2020-03-30 03:24:58 +00:00
Robert Ancell
3a7533da1b printers: Use g_autoptr for the results of D-Bus calls 2020-03-30 03:24:58 +00:00