Commit graph

8105 commits

Author SHA1 Message Date
Brandon Nielsen
944f415215 Drop dependency on pkexec
Based on discussion on fedora-devel[0][1] drop the use of pkexec. pkexec
was used only for starting / stopping / enabling / disabling the sshd
service via systemd.

This changes the "org.gnome.controlcenter.remote-login-helper" policy to
request the necessary systemd permissions, and changes to using polkit
to request the permission, then making the dbus calls once the
permission is acquired.

This also cleans up targets of the dialog response functions as
discussed in the MR[3].

[0] - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/ZDZACAMG2E3P4K4P2CVBQ3XBBZ7CYSXA/
[1] - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/WCZW4Y4ONV5ZXU4JUCQUS56F3R6GNGJF/
[2] - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/F5INKYST7JUNU6FYKU5JJJWXCYOCM33I/
[3] - https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1179#note_1793602
2024-02-05 12:06:41 +01:00
Matthijs Velsink
b42b4ecf2f system/about: Create CcSystemDetailsWindow when idle
The CcSystemDetailsWindow is fairly slow to create, making the first
opening of it feel slightly unresponsive.

Resolve this by creating the window when idle.
2024-02-05 11:01:34 +00:00
Matthijs Velsink
0eb1eacb64 system/about: Do not leak CcSystemDetailsWindow
The window should be destroyed and unreferenced when the About page is
disposed to prevent leaking it.

We need to take the reference in order to not repeat #2823, since the
AdwWindow is initially floating.
2024-02-05 11:01:34 +00:00
Matthijs Velsink
343932964f system/about: Create CcSystemDetailsWindow upon opening
Initializing the About page involves creating a CcSystemDetailsWindow
too. This costs time, making the System panel open slower because it has
to wait for the About page to finish initializing.

By creating the CcSystemDetailsWindow only when it should be opened, we
save at least 0.1 s when opening the System panel.
2024-02-05 11:01:34 +00:00
Automeris naranja
f623feed0a cc-sharing-networks: Use edit-delete-symbolic
window-close-symbolic shouldn't be used in this case.
Use edit-delete-symbolic instead.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2842
2024-02-05 10:58:49 +00:00
Monster
1d13e5852f search: Remove periods in subtitles 2024-02-05 10:58:08 +00:00
Monster
a4dc4d150e online-accounts: Remove period in description 2024-02-05 10:57:53 +00:00
Monster
de5ab92975 sharing: Remove period in description 2024-02-05 10:57:33 +00:00
Monster
94509facec mouse: Remove period in subtitle 2024-02-05 10:57:22 +00:00
Monster
d2abde0349 keyboard: Remove periods in descriptions 2024-02-05 10:57:11 +00:00
Monster
53771ae5cd printers: Remove periods from descriptions 2024-02-05 10:56:59 +00:00
Monster
5465afce01 accessibility: Correct periods 2024-02-05 10:56:04 +00:00
Monster
641633cf25 privacy: Remove periods from descriptions and subtitles 2024-02-05 10:55:38 +00:00
Monster
1b339a8d72 system: Remove periods from subtitles and labels 2024-02-05 10:55:18 +00:00
Monster
ea24750d06 bluetooth: Remove periods from descriptions 2024-02-05 10:54:43 +00:00
Monster
045e9cd28d wacom: Remove periods from descriptions 2024-02-05 10:54:29 +00:00
Monster
23d2a0aad0 multitasking: Remove periods in subtitles 2024-02-05 10:53:57 +00:00
Monster
29e856bc26 apps: Remove periods in subtitles 2024-02-05 10:53:20 +00:00
Monster
b417d23fb3 notifications: Remove period in subtitle 2024-02-05 10:52:50 +00:00
Monster
47c7f2d216 power: Remove periods in subtitles 2024-02-05 10:52:19 +00:00
Carlos Garnacho
dac9065dc3 wacom: Drop list to handle pads
This has effectively become a group of one. We can
keep the pad device pointer as well.
2024-02-05 09:49:21 +00:00
Carlos Garnacho
d4d0c60fc7 wacom: Pair only builtin pads with tablets
Pad and tablet grouping has become more irrelevant to the
Settings UI since commit 39402f21ba, as the EKR is the only
known case of an additional pad with distinct vendor/product
that is tied to another device.

But we preserved the grouping of pads (for the tablet EKRs
get paired with), thus possibly still requesting the pad OSD
to be shown on one of these arbitrarily.

In order to ensure that each "Map Buttons..." button in the
UI goes to the right pad being mapped, drop this grouping of
tablets, and make a CcWacomPage only observe a stylus/pad
pair in the same group (i.e. belonging to the same device, if
multiple similar ones are plugged) and with the same vendor+product
(i.e. coming from the same device).

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2876
2024-02-05 09:49:21 +00:00
Peter Hutterer
cc7aff9cb2 wacom: Add missing mnemonics
Partially fixes #2541
2024-02-05 09:12:57 +00:00
Peter Hutterer
95248cd906 wacom: Return has_eraser again as libwacom intended
libwacom_has_eraser tells us if this non-eraser tool has an
associated eraser (same serial, different tool id)
libwacom_is_eraser tells us if the current tool is an eraser device.

Now that we always have the stylus for the tool in proximity (see the
previous commit), switch this back to the has_eraser function and
rename it in the process so it's more obviously not the seemingly
obvious interpretation.

This reverts commit 9bd0b94527.
2024-02-05 08:30:26 +00:00
Peter Hutterer
42b39cb956 wacom: Prefer the stylus over the eraser
Pens with an integrated eraser share the serial number with the
corresponding pen but differ in the tool ID. libwacom provides a
"paired_id" mapping to look up one from the other.

If the user brings the eraser into proximity the very first time the
tool is seen, the eraser's tool ID is stored in the keyfile instead of
the associated stylus id. This leads to otherwise wrong behavior since
erasers share the serial number with the stylus but don't have any
buttons, don't have any erasers themselves, etc.

Fix this by looking up a matching stylus when we see an eraser. This
effectively filters our CcWacomTool to always be the pen, which is an
inadvertent assumption anyway.
2024-02-05 08:30:26 +00:00
Felipe Borges
7613a223f3 mouse: Modernize test window
Fixes #2801
2024-02-01 14:07:13 +00:00
Automeris naranja
19db526413 column-chooser: Move AdwBanner to the content widget
AdwBanner isn't a toolbar and AdwToolbarView won't
be able to style it correctly.

Wrap AdwPreferencesPage and AdwToolbarView into a
GtkBox and place it inside the content widget.
2024-02-01 09:16:55 +00:00
velsinki
869dfb990e system/about: Fix crash after dark mode switch
Commit f3f81d37 added a signal connection between dark mode changes and
updating the OS logo in the About page. However, this signal was not
disconnected, causing a crash when changing the dark mode after leaving
the About page.

Fix this by using `g_signal_connect_object ()` instead.

Fixes #2854
2024-01-31 14:03:05 +01:00
Felipe Borges
484866e27e system, wwan: Depend on gcr4 2024-01-31 10:38:07 +01:00
Felipe Borges
5ed0b3e1f8 sharing: Remove unused pwquality and pwd.h dependencies
Those were leftovers from when the Remote Desktop settings got moved
into the System panel.
2024-01-31 10:38:07 +01:00
Felipe Borges
dc514d3df1 sharing: Remove unused "gcr/gcr-base.h" include
This was part of the Remote Desktop code that now is part of the
System panel.
2024-01-31 10:38:07 +01:00
Felipe Borges
196987d7ad system, remote-desktop: Use a single rdp_settings object
A GSettings object was being created in multiple places when that
could be simplified.
2024-01-31 09:37:20 +00:00
Felipe Borges
590513352a system, remote-desktop: Don't show the panel when backend is unavailable
Let's not show the page neither crash when there are issues with
finding the remote desktop gsettings in the system, or when the
RemoteDesktop name didn't appear on dbus.

Fixes #2874
2024-01-31 09:37:20 +00:00
Felipe Borges
61dd1b2adf system, remote-desktop: Remove sharing proxy connection
This is a leftover from the previous implementation in the Sharing
panel and has no use here.
2024-01-31 09:37:20 +00:00
velsinki
9716575162 network: Fix missing VPN entries
This required some archeology: 52d28579 introduced virtual device
support. This was done by getting the virtual device name and testing if
that was `NULL`. Then came 8861d440, which removed virtual devices, but
did not revert fully to the behavior before 52d28579. Combined with
9183d349, this meant that any VPN that has an interface name set, will
never be displayed.

Fix this by reverting to the behavior before 52d28579, while keeping
wireguard support. The added check from ddc35609 is left in, although it
is not clear to me if that is still needed.

Fixes #2822
2024-01-30 17:02:00 +00:00
Florian Müllner
feddd1b559 universal-access: Stop tracking old GTK theme
Nothing uses it anymore.
2024-01-30 14:45:26 +00:00
Florian Müllner
3cc39bd280 universal-access: Stop forcing HighContrast icon theme
The theme is considered deprecated in favor of symbolic icons from
the regular theme, and both gnome-shell and the gnome portal stopped
linking it to the high-contrast setting.
2024-01-30 14:45:26 +00:00
Automeris naranja
a3681a50fd search-locations-dialog: Add tooltip to the remove button 2024-01-30 13:44:07 +00:00
Automeris naranja
00d9cd012f sharing: Add tooltips to some icon-only buttons
Also, remove a11y labels from these buttons,
because a11y labels and tooltips are redundant
(Orca reads both).
2024-01-30 13:44:07 +00:00
Felipe Borges
305c89e71d system, about: Use CcHostname to obtain properties from system-hostnamed 2024-01-30 13:34:10 +00:00
Felipe Borges
47774b9968 privacy: Use CcHostname to detect when running in a VM
We currently hide "Device Security" when running in a VM or an
undefined systemd-hostnamed chassis-type.

This makes our existing check use the CcHostname utility.
2024-01-30 13:34:10 +00:00
Felipe Borges
cd911dfa5d display: Use CcHostname to detect when running in a VM
Instead of a manual call to system-hostnamed to obtain the chassis-type
and compare whether it is equal to "vm".
2024-01-30 13:34:10 +00:00
Felipe Borges
70888ea71d power: Use CcHostname to obtain the systemd-hostnamed chassis-type 2024-01-30 13:34:10 +00:00
Felipe Borges
270347e66c system, remote-desktop: Use CcHostname to get the host display name 2024-01-30 13:34:10 +00:00
Felipe Borges
69a6abd0fa network: Make NetDeviceWifi use CcHostname to obtain the display name 2024-01-30 13:34:10 +00:00
Felipe Borges
e924a830b4 common: Make CcHostnameEntry use CcHostname to access hostnamed 2024-01-30 13:34:10 +00:00
Felipe Borges
8def72a266 common: Introduce CcHostname
This object allows for panels to interact with systemd-hostnamed over
DBus using a simple API that abstracts the GVariant and DBus specifics
involved.
2024-01-30 13:34:10 +00:00
Automeris naranja
2c04c9dfc9 sharing: Move switches out of the headerbar
In the "Media Sharing" and "File Sharing"
dialogs, move the main switches out of the
headerbar and show them in a row.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1930
2024-01-30 13:33:35 +00:00
Automeris naranja
b1d1302053 general: Remove a11y labels from buttons that have tooltips
Orca also reads tooltips, so having both a11y labels
and tooltips is redundant.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2023#note_1915854
2024-01-30 13:28:48 +00:00
Automeris naranja
e5a4332a65 privacy: Set some switches as activatable-widgets
The switches from app rows in the Location, Camera
and Microphone pages can't be interacted by clicking
on the rows. Mark these switches as activatable-widgets
to fix that.
2024-01-30 13:26:49 +00:00