Commit graph

24182 commits

Author SHA1 Message Date
Automeris naranja
3e5982c6f8 keyboard: Turn CcXkbModifierDialog into a subpage
Doing so, the navigation in Settings will be more consistent, see
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3020
2024-06-19 07:19:49 +00:00
Automeris naranja
a670744eba sound: Turn CcVolumeLevelsDialog into a subpage
See also:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3020
2024-06-18 13:28:52 +00:00
Matthijs Velsink
d5897dd63a sound: Try AppInfo icon before icon name for a stream
Icon names for generic full-color icons are sometimes set for streams
(Firefox for example). Some apps seem to even use legacy icon
names.

We factor out the icon lookup into a function and place the AppInfo
before the icon name lookup in priority.

Closes #2740
2024-06-18 13:21:10 +00:00
Matthijs Velsink
def736cfd9 sound: Make AppInfo lookup a little more robust
The display name for a `GAppInfo` can be different from the name, so we
can check both to be sure.
2024-06-18 13:21:10 +00:00
Automeris naranja
fd2e744ce0 user-page: Add ellipsis to the "Remove User" button
"Use an ellipsis (…) at the end of a label if further input or
confirmation is required from the user before the action can
be carried out".

https://developer.gnome.org/hig/guidelines/writing-style.html
2024-06-18 05:11:35 +00:00
Peter Hutterer
98674f6ba5 wacom: Enforce a Z-shape sequence of calibration points
Otherwise we could calibrate the device to be upside down by doing a
reverse Z (starting lower-right). If the device is mounted upside-down
this should be fixed elsewhere.
2024-06-18 10:11:46 +10:00
Peter Hutterer
2c45312564 wacom: Fix wrong alignment detection in the calibrator
Our along_axis() helper would compare the input value against both x and
y of the reference point. This can lead to misdetections of the distance
to the desired points, e.g. if the upper-left reference point is 100/100
and the upper-right point is a clearly-wrong 99/2500, the alignment
would succeed because the x-axis is within the threshold.

This would sort itself out later since the lower points are difficult to
get right then, but let's fix this by checking the desired alignment
only. This way a misclick happens on the actual misclick, not on the
next point(s) in the sequence.
2024-06-18 10:11:19 +10:00
Peter Hutterer
8de142c268 wacom: Turn the struct Calib into a proper CcCalibrator GObject 2024-06-18 10:08:56 +10:00
Peter Hutterer
dd119f3cc7 wacom: Simplify the calibrator code
The code was written to (sort-of) accomodate for the four calibration
points to happen in any sequence. Except we don't care about that, we do
it in a Z shape starting top-left - so let's simplify the code to check
for that sequence.
2024-06-18 10:08:56 +10:00
Peter Hutterer
4e68a871b0 wacom: Up the calibrator threshold to 50 pixels
For anyone calibrating the tablet the threshold doesn't really matter,
it's in their own interest to be as precise as possible. Meanwhile, for
testing a larger threshold makes life a lot easier as we don't need to
be that exact to go through the calibration sequence.

Finally, for devices with calibration seriously out of whack a larger
threshold allows those devices to be used.
2024-06-18 10:08:56 +10:00
Peter Hutterer
d389bc0237 wacom: Fix the thresholds passed to the calibrator
The two were swapped, making the calibrator *really* sensitive to
misclicks.
2024-06-18 10:08:56 +10:00
Peter Hutterer
cd850f34da wacom: Make the calibrator code a bit more readable
Lumping the x/y of a single point into a struct and making the array out
of that makes it a bit easier to read than the clicked_x[0] etc.
2024-06-18 10:08:56 +10:00
Peter Hutterer
85b9b0bd47 wacom: Reset the clock after any click on the calibrator
If we click with the right tool, let's reset the clock to make the
calibration process less stressful.
2024-06-18 10:08:56 +10:00
Peter Hutterer
541d72e915 tests: Skip some tests if we don't have Xvfb or setxkbmap
The keyboard test relies on both of those programs, the network
panel test on Xvfb. Where we don't have those programs installed (e.g. a
pure Wayland session) we cannot run the test.
2024-06-15 07:24:56 +00:00
Felipe Borges
657ef02f1d build, flatpak: Add keyutils dep for gnome-online-accounts 2024-06-15 07:20:05 +00:00
Felipe Borges
541e11451e build, flatpak: Fix build-option for gnome-online-accounts 2024-06-15 07:20:05 +00:00
Felipe Borges
a4c1555bae apps: Don't show "Open" button for Settings itself
Fixes #3000
2024-06-13 15:20:25 +02:00
Felipe Borges
a18eb3319b sound: Use AppInfo to get app icons and fallback to icon-theme
This makes the apps more recognizable and avoids some cases when
app icons can't be found for third party apps.

See #2740
2024-06-13 09:21:20 +00:00
Automeris naranja
8082f9be8f search-locations: Use AdwButtonRow in the "Add Location..." button
Also, remove the list box placeholder since the button will appear
even when the list is empty. The button now acts like a placeholder
too.

Co-authored-by: Matthijs Velsink <mvelsink@gnome.org>
2024-06-13 09:04:25 +00:00
Matthijs Velsink
09a001e47a search-locations: Use GtkListBoxSortFunc type directly
No need to have all this casting when we can just define the sorting
function like GtkListBoxSortFunc.
2024-06-13 09:04:25 +00:00
Felipe Borges
18398e2986 printers, new-printer-dialog: Handle "Escape" shortcut in ui file
As suggested by Matthijs Velsink, it is much cleaner handling UI
related things in the .ui file.

This is a cleaner version of commit 3f612ab81

Related to !2656, fixing #3086
2024-06-13 10:32:48 +02:00
Automeris naranja
fb9b6a0c5c pp-jobs-dialog: Don't use AdwStatusPage inside a GtkBox
AdwStatusPage has a built-in GtkScrolledWindow and it can't be used
with other widgets. Put the GtkStack directly in AdwDialog:property
instead.

Doing so, the AdwStatusPage no longer needs the vexpand property.
2024-06-12 22:47:23 -03:00
Automeris naranja
d8e2ae3358 pp-jobs-dialog: Use AdwWindowTitle
Use AdwWindowTitle and show the printer name using
AdwWindowTitle:subtitle. This gives more room to show the printer name,
especially when the name long, which is prone to get ellipsized.
2024-06-12 14:29:14 +00:00
Felipe Borges
3f612ab812 printers: Close new printer dialog when pressing Escape key
The GtkSearchEntry dialog was eating up the Escape key press events,
causing the dialog not to close as expected.

This adds a controller to explicitly handle key-press events on a
dialog level, which will close the dialog for the Escape key and
just propagate the event down the chain otherwise.

Fixes #3086
2024-06-12 14:14:35 +00:00
Felipe Borges
7da19bfeec color: Capitalize "Built-In Webcam"
It is a noun.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2652#note_2137723
2024-06-11 09:25:21 +00:00
Adrien Plazas
4ef93bb2c7 color: "Laptop Screen" → "Built-In Screen"
Laptops aren't the only devices GNOME cas run on that have an internal
screen, there are also smartphones and all-in-one desktops. This updates
the a label and some translators comments to reflect that.

Signed-off-by: Adrien Plazas <aplazas@gnome.org>
2024-06-11 09:25:21 +00:00
Automeris naranja
d8233292a2 pp-job-row: Use new icon in the priority button 2024-06-11 09:24:59 +00:00
Automeris naranja
dd78b58ebf pp-job-row: Make all buttons flat 2024-06-11 09:24:59 +00:00
Automeris naranja
2903aee9f5 pp-jobs-dialog: Modernize the UI
- Use AdwPreferencesPage, AdwPreferencesGroup and
AdwStatusPage
- Remove the .view style class
- Add the .boxed-list style class to the jobs list box
- Add mnemonic to the "Clear All" button
2024-06-11 09:24:59 +00:00
Automeris naranja
5d0909ae20 pp-jobs-dialog: Port to AdwDialog 2024-06-11 09:24:59 +00:00
Automeris naranja
8d25eafc21 pp-job-row: Add tooltips to all buttons
Also:
- Remove the a11y label from the Pause button
since tooltips are also read by Orca
- Make the priority button to always have a tooltip
2024-06-11 09:24:59 +00:00
Automeris naranja
fee83c309b pp-job-row: Port to AdwActionRow
Also, set the state label as a suffix widget and add
the .dim-label style class, improving consistency with
other rows in Settings.
2024-06-11 09:24:59 +00:00
Automeris naranja
ecb4a9e36c color-profile: Port to AdwActionRow
Also, remove the margins from CCListRowInfoButton and
widget_button, as they are unnecessary.
2024-06-11 09:11:41 +00:00
Automeris naranja
8d51b21823 color-device: Port to AdwActionRow
Also:
- Use gtk_button_new_from_icon_name instead of
embedding a GtkImage into a GtkButton
- Remove margins from "widget_button" and "widget_nocalib",
because suffix widgets from AdwActionRows already have
margins
- Place the "Not Calibrated" label before the switches and
use header capitalization in it, as advised by HIG
- Decrease the "widget_nocalib" margin-end to "6", so it doesn't
look too far from the switches
2024-06-11 09:11:41 +00:00
Peter Hutterer
4ae9d83286 wacom: Correct the link to gnome help
Existing tablet help entries are grouped under "wacom-" so let's assume this
will be what we'll end up with.

https://gitlab.gnome.org/GNOME/gnome-user-docs/-/merge_requests/180
2024-06-10 07:56:09 +00:00
Automeris naranja
5227be3d78 add-user-dialog: Don't use "adw_alert_dialog_format_body"
There isn't a formatted string, so adw_alert_dialog_set_body must
be used instead.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3087
2024-06-10 07:55:30 +00:00
Automeris naranja
cfcea08372 remote-desktop: Set "—" as the placeholder for the "Port" row subtitle
Instead of showing an empty space as the placeholder for the "Port" row
subtitle, use "—", like Nautilus and Disks does when a value is empty,
for example.
2024-06-09 18:29:46 -03:00
Automeris naranja
fdb0528464 apps: Fix disabled rows wrongly having a mnemonic
These rows aren't activatable, so using a mnemonic isn't necessary.
Another thing is that the rows aren't using
AdwPreferencesRow:use-underline, which makes the row title to look
broken.

Remove the underlines and also add a mnemonic to the Camera switch
row.
2024-06-06 14:46:33 -03:00
Peter Hutterer
b82621a36c wacom: Fall back to the generic tablet provided by libwacom
Whether libwacom knows about a tablet has no effect on whether the
tablet works, only whether we know how to map it, which styli are
available, etc.

Instead of pretending there is no tablet connected let's use the
libwacom fallback tablet instead. As of libwacom 2.11 that defaults to a
built-in tablet (the vast majority of devices these days) which means we
can at least map this to an output, calibrate it etc.
2024-06-04 11:54:22 +00:00
Automeris naranja
59e0d08e56 printers: Add "pp" prefix to some dialog GtkBuilder file names
Doing so, these dialog file names will match their respective
C and header file names.
2024-06-04 09:52:29 +00:00
Jakub Steiner
78c840ba57 cursor-size-dialog: use same size for cursors
- all cursors use 96x96px canvas
2024-06-04 09:48:44 +00:00
Automeris naranja
7b4e95ae99 cursor-size-dialog: Use GtkFlowBox to group the cursor buttons
Doing so, the dialog will be adaptive in when the window
width is narrow.

Also, ditch the .linked style class, because the buttons
are now in a reflowing grid.
2024-06-04 09:48:44 +00:00
Automeris naranja
c9dedb82e6 cursor-size-dialog: Port to AdwDialog 2024-06-04 09:48:44 +00:00
Automeris naranja
99ab03fd45 about-page: Add AdwActionRow:subtitle-selectable to several rows
This allows to copy the row contents without opening the System
Details dialog. This can be useful if the user just wants to
copy the hardware model, for example.
2024-06-04 09:44:57 +00:00
Peter Hutterer
a966a067c1 wacom: If we have two identical monitors, suffix the connector name
Check if any two monitor display names are identical, if so use a
display name like 'Manufacturer 27" (HDMI-1)'.
2024-06-04 09:35:19 +00:00
Peter Hutterer
491c945ca6 wacom: Use CcDisplayMonitor and friends to get monitor names
Remove the gnome_rr_* bindings and substitute them with the respective
calls from the CcDisplayMonitor. This way we get the same monitor names
as the display panel.

Closes #1821
2024-06-04 09:35:19 +00:00
Peter Hutterer
3bb33bbfa7 display: Add getters for monitor vendor, product and serial 2024-06-04 09:35:19 +00:00
Automeris naranja
60300f7f9e pp-details-dialog: Port to AdwDialog 2024-06-03 08:49:37 +00:00
Automeris naranja
d824ed115c wacom: Port "Grip Pen" to AdwDialog 2024-06-03 07:57:16 +00:00
Felipe Borges
7248ebb5dc printers: Recreate destroyed toasts
We re-use a toast for the "Undo" feature, but the toast widget gets
destroyed in the first interaction, causing a crash on a second deletion
when we reference a NULL self->toast.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2596#note_2114598
2024-06-03 07:54:13 +00:00