Commit graph

8304 commits

Author SHA1 Message Date
Felipe Borges
c2a7ebbd5f privacy, help: Default to opening "Privacy Settings" help page
When in the main page or in a subpage without docs, the Help link
should open the "Privacy Settings" page at help:gnome-help/privacy
2024-04-02 09:11:31 +00:00
Felipe Borges
1a54cbf15a privacy: Remove Microphone page
See commit f46fbd18.

This panel can't really be useful at this point since there's no
portal for apps to access microphones.

See #2848
Fixes #2958
2024-03-28 15:56:55 +01:00
Automeris naranja
1578ebefc7 wifi: Don't show "No Wi-Fi Adapter Found" when Wi-Fi is off
Use "nm_client_wireless_hardware_get_enabled" to check if
Wi-Fi is enabled or not at the hardware level. Then, show
a different AdwStatusPage when the Wi-Fi adapter is absent
and when Wi-Fi is off.

Reference:
cfb7cae4a9

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1514
2024-03-27 22:46:01 +00:00
Automeris naranja
5192d9ef36 mouse-test: Make some UI tweaks to follow the latest mockups
- Use "select-mode-symbolic" in the "Clicking"
view switcher

- Ditch the border radius from the scroll test
image

- Make click-status-emblem indicator indicator
to show a more prominent green color when the
test passes

- Don't use @borders for the click-status-emblems
background color because this named color isn't
meant for backgrounds

- Make non-green click-status-emblems dimmed

Reference: 6d5e1813ca
2024-03-27 18:10:44 -03:00
Felipe Borges
994a540bfc system, datetime: Don't set datetime when auto time sync is enabled
The timedate1_call will fail because network time synchronization is enabled:

GDBus.Error:org.freedesktop.timedate1.AutomaticTimeSyncEnabled: Automatic time synchronization is enabled

Let's not set_time when NTP is not available, neither set time by
accident at the widget construction stage. When widgets signals are connected
in the UI file their respective callback was getting called. By moving
the signal connection to callbacks to the widget's _init method we
avoid the unwanted callback call.

Fixes #2945
2024-03-27 13:13:13 +00:00
Felipe Borges
2cf5b90cce common: Check for valid GDateTime object before comparing
Avoids the critical below at runtime
11:14:36.7796                   **[873815]:CRITICAL: cc_util_get_smart_date: assertion 'date != NULL' failed
11:14:36.7802                   **[873815]:CRITICAL: cc_util_get_smart_date: assertion 'date != NULL' failed

Which comes from the location panel passing a NULL date object.

\#0  _g_log_abort (breakpoint=1) at ../shell/cc-log.c:72
        debugger_present = 1
\#1  0x000000000045c3c4 in cc_log_write
    (log_level=10, log_domain=0x7ffff7d592eb "GLib", log_message=0x234c400 "g_date_time_difference: assertion 'begin != NULL' failed", fields=0x7fffffffd740, n_fields=4, user_data=0x0)
    at ../shell/cc-log.c:315
        log_str = 0x234b8d0
        stream = 0x7ffff5dbb4e0 <_IO_2_1_stderr_>
        can_color = 1
\#2  0x000000000045c4f5 in cc_log_handler (log_level=G_LOG_LEVEL_CRITICAL, fields=0x7fffffffd740, n_fields=4, user_data=0x0) at ../shell/cc-log.c:348
        log_domain = 0x7ffff7d592eb "GLib"
        log_message = 0x234c400 "g_date_time_difference: assertion 'begin != NULL' failed"
\#3  0x00007ffff7c9f534 in g_log_structured_array () at /lib64/libglib-2.0.so.0
\#4  0x00007ffff7ca4f57 in g_log_default_handler () at /lib64/libglib-2.0.so.0
\#5  0x00007ffff7c9be29 in g_logv () at /lib64/libglib-2.0.so.0
\#6  0x00007ffff7c9c193 in g_log () at /lib64/libglib-2.0.so.0
\#7  0x00007ffff7c787fa in g_date_time_difference () at /lib64/libglib-2.0.so.0
\#8  0x000000000059c186 in cc_util_get_smart_date (date=0x0) at ../panels/common/cc-util.c:124
        today = 0x2350130
        local = 0x2350100
        span = 10791504
\#9  0x00000000004f8a20 in add_location_app (self=0x1dee1c0, app_id=0x232fef0 "org.gnome.Calendar", enabled=1, last_used=459618461810) at ../panels/privacy/cc-location-page.c:209
        data = 0xffffda80
        app_info = 0x2341c50
        t = 0x0
        row = 0x2348280
        w = 0x234fe00
        icon = 0x2345310
        last_used_str = 0x0
        desktop_id = 0x7fffcc034c30 "DL\310\375\a"
\#10 0x00000000004f8db4 in update_perm_store (self=0x1dee1c0, permissions=0x7fffcc04e2c0, permissions_data=0x7fffcc04ee80) at ../panels/privacy/cc-location-page.c:282
        enabled = 1
        last_used = 459618461810
        iter = {x = {140736616260288, 2, 0, 6386038, 140736616096608, 36922576, 16, 3579507750, 140737488345904, 140737350561909, 33733184, 36922576, 140737488345936, 140737350702366, 36922576, 3278251457363369984}}
        key = 0x232fef0 "org.gnome.Calendar"
        value = 0x7fffcc04e090
\#11 0x00000000004f8f4e in on_perm_store_lookup_done (source_object=0x1e24040, res=0x202ba40, user_data=0x1dee1c0) at ../panels/privacy/cc-location-page.c:324
        error = 0x0
        ret = 0x7fffcc04eef0
        permissions = 0x7fffcc04e2c0
        permissions_data = 0x7fffcc04ee80
\#12 0x00007ffff7e9082c in g_task_return_now () at /lib64/libgio-2.0.so.0
\#13 0x00007ffff7e944c3 in g_task_return () at /lib64/libgio-2.0.so.0
\#14 0x00007ffff7efe88b in reply_cb () at /lib64/libgio-2.0.so.0
\#15 0x00007ffff7e9082c in g_task_return_now () at /lib64/libgio-2.0.so.0
\#16 0x00007ffff7e944c3 in g_task_return () at /lib64/libgio-2.0.so.0
2024-03-27 13:13:13 +00:00
Automeris naranja
4a986072ce app-notifications-dialog: Port to AdwDialog
Also, remove the ESC shortcut, since AdwDialogs
already close with ESC by default.
2024-03-27 13:51:08 +01:00
Automeris naranja
f366102d89 removable-media-settings: Port "Other Media" to AdwDialog 2024-03-27 12:20:47 +00:00
Felipe Borges
4525890c27 multitasking, accessibility: Remove spaces from desktop file keywords
Spaces are not supported in .desktop file keywords[0] as gnome-shell
splits the search term by spaces, and then prefix-matches each word separately
against the candidate keywords.

Inspired by commit 7bd8dd69cf
2024-03-27 10:24:02 +00:00
Automeris naranja
6e3f7c6055 secure-shell-page: Use "Command copied to clipboard" string
When copying the login command, a toast appear
saying "Command copied". However, these kind of toasts
usually says that the text was copied *to the clipboard*,
like the toast from System > About > System Details > Copy.
2024-03-26 20:46:35 -03:00
Automeris naranja
2b1a66d7ce users: Rename "Add Enterprise User" to "Add Enterprise Login"
This button is labelled as "Add Enterprise Login" in
the mockups[1].

Also:
- Add missing mnemonic
- Add ellipsis to the button label, since it's required
when the button triggers further user interaction[2]

[1] a0e4f828ec
[2] https://developer.gnome.org/hig/guidelines/writing-style.html#ellipses
2024-03-25 15:08:29 +00:00
Philip Withnall
7bd8dd69cf users: Simplify parental controls keywords to remove spaces
Spaces aren’t supported in .desktop file keywords, as gnome-shell splits
the search term by spaces, and then prefix-matches each word separately
against the candidate keywords.

So a search term of ‘parental’ would match the ‘Parental Controls’
keyword, but a search term of ‘parental controls’ would not, as
‘controls’ doesn’t prefix-match anything.

Avoid that by removing spaces from the keywords.

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

Helps: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/48
2024-03-25 14:17:45 +00:00
Automeris naranja
f00dc11f38 privacy: Separate subpages files in their respective folders
Accessibility and System panel folders also
have this folder structure, which is way more organized.
2024-03-25 14:43:32 +01:00
Felipe Borges
942461d0d8 system, remote-desktop: Rename "RemoteSession" code to "RemoteLogin"
To be consistent with what we show in the UI and conciliate the
confusion with Secure Shell, which was formerly named "RemoteLogin".
2024-03-25 12:33:23 +00:00
Felipe Borges
9a05b542e2 system, secure-shell: Rename internal name from RemoteLogin
As the user facing name of this setting changed to "Secure Shell",
let's change its internal name to match it.

This avoids confusion with the Remote Desktop "Remote Session" setting,
which is now named "Remote Login" in the UI and should get its code
renamed to follow that consistently.
2024-03-25 12:33:23 +00:00
Felipe Borges
96cf88c68f system, remote-login: Fix header name typo
Fixes
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2211#note_2061610
2024-03-25 10:40:30 +00:00
Felipe Borges
5323020102 privacy: Fix Thunderbolt page tag name
The main panel was looking for a page with tag "bolt" when the panel
is actually using the "thunderbolt" tag.

Fixes #2973
2024-03-25 11:19:43 +01:00
Peter Hutterer
33c49dc125 wacom: Check for the right output connector name
Otherwise we just return the first output with the corresponding vendor
and serial number.

Fixes: 75ce02e202 ("wacom: Provide connector name for disambiguation")
2024-03-22 13:02:22 +00:00
Peter Hutterer
ebd2b013dd wacom: Accept 4-value output settings
We now store the connector name as fourth value.

Fixes: 75ce02e202 ("wacom: Provide connector name for disambiguation")
2024-03-22 13:02:22 +00:00
Felipe Borges
0787182dd0 search: Prevent listbox placeholder from being treated like a row
The Search panel providers listbox has a placeholder label that is
visible when there are no listbox items.

The placeholder label is being considered in the list of children
of the listbox while estimating whether "Moving down" is allowed for
the listbox reorder feature.
2024-03-22 12:43:24 +00:00
Automeris naranja
1d00a94009 search: Tweak "No Apps Found" placeholder
The current placeholder that appears when no
providers are available has some problems:

- The row is activatable, but this is unnecessary
- The row has no padding
- The "No Apps Found" string doesn't use header
capitalization

Fix this by using a GtkListBox placeholder widget, with
margins and with header capitalization in the string.
2024-03-22 12:43:24 +00:00
Felipe Borges
49e35600c9 power: Load a different list for suspend-times when on mobile
Using the systemd-hostnamed chassis-type to detect when running on
"tablet", "handset", or "watch" and setting a more reasonable list
of suspend time options for them.
2024-03-21 16:01:11 +00:00
silver
f694945b6e power: Add some more reasonable suspend time options for mobile
Edited by felipeborges.
2024-03-21 16:01:11 +00:00
Chris Williams
bdd1a1037a system/about: Make print-renderer helper log to stderr
This avoids debug logging appearing in the UI via stdout when
G_MESSAGES_DEBUG is used.

Fixes #2387
2024-03-21 11:00:45 +00:00
Munazza Shabir
adb485e18c apps, default-apps: Indicate when no apps are available for a mime type
As discussed in #2870 the current way of displaying insensitve rows when
no apps are availbe to handle a mime type is confusing.

Fix this by showing a "No Apps Available" label in the aforementioned case.

Fixes #2870
2024-03-21 09:50:45 +00:00
Automeris naranja
d5c66d25a0 about-page: Use property rows
Doing so, the system/hardware information rows
can be properly displayed in small screen sizes.
2024-03-21 09:32:48 +00:00
Felipe Borges
52f165f36b system: Load subpages on demand
Let's manually wire the row activation to the panel creation so that
we can create panels on demand.

This also makes calls to subpages directly avoid initializing the
other panels.

Fixes #2857
2024-03-20 15:48:57 +00:00
Automeris naranja
beaa14ecdf wifi-connection-list: Add a placeholder widget to the list box
Doing so, the Wi-Fi list box won't appear broken when
it's empty.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2574
2024-03-20 09:14:35 +00:00
Automeris naranja
5844b039e3 universal-access: Open subpage when CcPanel.subpage is set
This allows launching the Accessibility panel subpages
from the command line.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2940
2024-03-18 12:14:41 +00:00
Felipe Borges
808ac116e2 system, remote-desktop: Don't start Desktop Sharing page hidden
At init it will verify whether the panel can be constructed in the
check_desktop_sharing_available call, and with that hide/show the
panel accordingly.

Fixes #2955
2024-03-18 11:49:17 +00:00
Automeris naranja
14f0a13162 add-user-dialog: Port to AdwToolbarView
Also, allow closing the dialog with ESC.
2024-03-14 10:57:18 +00:00
Jonas Dreßler
4afd08e234 sound: Don't call gvc_mixer_control_open() twice
Unfortunately I sneaked in a move of the gvc_mixer_control_open() call from
earlier in the function to the end of the function with commit 2152899354.

That change didn't actually move the call though, but introduced a second
call instead, leading to a critical error on opening of the sound panel.

Fix it by removing the first call to gvc_mixer_control_open() and keeping
the second one around. We want to keep the second one instead of the earlier
one because the signal handlers should be connected before we initialize gvc
and it connects to pulse, emitting all the input/output-added signals etc.

The reason why this wasn't broken before was likely because the connection
to pulse happens async, and therefore the initial emission of the signals
would effectively still have happened after we connected our handlers.

Fwiw, calling gvc_mixer_control_open() after
cc_volume_slider_set_mixer_control(), cc_subwoofer_slider_set_mixer_control()
and cc_device_combo_box_set_mixer_control() is not a problem, as those
functions all call into gvc to get static values (and as explained above,
at this point gvc wouldn't have established connection to pulse anyway).

Reported-by: Matthijs Velsink <mvelsink@gnome.org>

Fixes: 2152899354 ("sound: Listen to signals from GvcMixerControl only in sound panel")
2024-03-12 22:39:14 +00:00
Automeris naranja
1b357b2fb4 power-profile-info-row: Set natural-wrap-mode to none
This fixes title_label appearing awkwardly truncated when
the the text is long (a lot of whitespace is shown at the
right of the row).

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2240
2024-03-12 22:17:17 +00:00
Automeris naranja
bf6c647be5 apps: UI tweaks to the "Files & Links" row
- Set a new name and subtitle
- Show the types number at the right

Reference:
cb7f6da52d

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2906
2024-03-12 22:08:47 +01:00
Automeris naranja
963c598cce privacy: Update subpage tags in the main page
Each page had its AdwNavigationPage tag updated in [1],
but the tags in the Privacy panel main page weren't
updated, which made all the subpages fail to open.

[1] 917248d7bf
2024-03-12 17:41:23 -03:00
Automeris naranja
8a65911b3a apps: Add tooltips to remove buttons from handler_dialog
In the File & Link Associations dialog (handler_dialog),
the remove button from list rows doesn't have a tooltip;
also, Orca doesn't read this button properly, since there
is no a11y label.

Fix that by adding a tooltip, which also acts as an a11y
label.
2024-03-12 12:59:05 +00:00
Automeris naranja
2094d7bb73 apps: Fix inconsistent "Storage" row subtitle
Unlike other rows from the app page, the
"Storage" row subtitle states a value
instead of showing the row description.
Also, the description ends with a period,
which isn't necessary acc. to HIG.

Show the disk space  as a secondary label,
so the "Storage" row can have a consistent
subtitle like other rows.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2777
2024-03-12 12:56:38 +00:00
Automeris naranja
542cd4e0a6 keyboard-shortcut-row: Tweak the reset button
- Reword tooltip to follow HIG guidelines[1]
- Remove the a11y because Orca also reads
tooltips
- Remove the "reset-shortcut-button" style class
because it's unused

[1] https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2024-03-12 12:51:45 +00:00
Automeris naranja
59ff136095 keyboard-shortcut-row: Add an edit icon
Shortcut rows don't indicate that a window will
be opened. Add an edit icon to fix that.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2814
2024-03-12 12:51:45 +00:00
Automeris naranja
84ac927787 remote-login-page: Add missing mnemonic
Add mnemonic to the "SSH Login Command" row.
Also, use the letter "S" for the mnemonic of
the "Secure Shell" row.
2024-03-12 12:49:24 +00:00
Automeris naranja
cba40d5194 system: Fix broken mnemonics
Secure Shell and Software Updates rows are
using the letters R and U, respectively, for
their mnemonics. However, these letters are
already taken by other rows (Region & Language
and Users).

Fix that by choosing different letters.
2024-03-12 12:44:30 +00:00
Automeris naranja
e31dd03fdc network-vpn: Add tooltip to the VPN options button
Also, remove the a11y label because Orca also reads tooltips.
2024-03-12 12:40:45 +00:00
Felipe Borges
a76ff8923f system: Use CcPanel.subpage for launching subpages
Rather than overriding the parameters property.
2024-03-12 10:03:08 +01:00
Felipe Borges
8ffe4b8cf4 privacy: Open subpage when CcPanel.subpage is set
Fixes #2940
2024-03-12 10:03:08 +01:00
Felipe Borges
917248d7bf privacy: Update subpages tags to match expected cmdline args 2024-03-12 10:03:08 +01:00
Jonas Dreßler
3aeb837cb0 sound: Set input/output meter stream to NULL when there's no active device
When there's no active input or output device, the input/output meter shouldn't
have a stream set, so call set_input_stream() with a NULL stream
(cc_volume_slider_set_stream() and cc_level_bar_set_stream() are already handling
NULL as expected) in case there's no active input or output device.

This fixes a bug where the input/output meter doesn't get updated when the active
input or output device gets unset.
2024-03-12 08:33:58 +00:00
Jonas Dreßler
afec106a8b sound: Unset active entry on the device comboBox when there's no active device
When gvc gives us an active-input/output-device ID we don't know or sets the ID
to 0, that means there's no device currently active. While this seems unlikely
to be the case without the device getting removed at the same time, it can happen:
When the bluetooth profile gets changed from handset (input+output) to
headphone (output only), the input device remains available, but there's no
more active-input-device anymore.

In this case, we shouldn't leave the active entry on the device combo box as-is,
instead we should set it to NULL to indicate that no input device is set.

This fixes a bug where the input switcher is not updated when there's no
internal microphone but there's a bluetooth headset connected, and the
bluetooth profile gets switched from Handset to Headphone.
2024-03-12 08:33:58 +00:00
Jonas Dreßler
bf6f72278e sound: Update active-device UI on signals from gvc, not on combo box changes
Gvc is the actual "source of truth" when it comes to the currently active input
or output device, so we should update widget visibility and the input/output
meter stream based on the information from gvc, not on changes to the combo box.

The flow when the selects a different device in the combo box now is:
"user change" -> gvc_mixer_control_change_output() -> receive
"active-output-changed" signal from gvc -> update active device and get it
using the DeviceComboBox -> set widget visibility and update stream based
on this device.

This fixes a few bugs where the stream for the input/output meter wouldn't
get updated properly on active device changes.
2024-03-12 08:33:58 +00:00
Jonas Dreßler
a74bc5a84d sound: Block our own signal handlers while updating the active-device combo box
When we get notified of an "active-input/output-device" change by gvc, we have
to update our respective combo box to reflect that change. Obviously, this in
turn shouldn't trigger our own signal handler for changes on that combo box,
that signal handler is only meant to handle the user interacting with the combo
box.

So block our signal handlers when we update the combo box to respond to changes
from the gvc side.

This fixes a recursive call to gvc_mixer_control_change_input/output() when we
get notified about an input/output change from gvc itself.
2024-03-12 08:33:58 +00:00
Jonas Dreßler
2152899354 sound: Listen to signals from GvcMixerControl only in sound panel
We should only listen to "active-input-update" and "active-output-update" in
one place, and then update the combo box from there. This way we can block our
own signal handler for input/output device changes on the combo box, which
we'll do in the next commit.
2024-03-12 08:33:58 +00:00