Commit graph

23196 commits

Author SHA1 Message Date
Automeris naranja
760f605bbb power: Add missing mnemonics in the automatic suspend dialog 2024-01-08 09:42:04 +00:00
velsinki
0b3c670ed4 wifi: Avoid critical warning for hotspot dialog
The CcWifiHotspotDialog is derived from GtkDialog, which is floating.
The floating reference is destroyed on closing the main window, before
the NetDeviceWifi is disposed. This causes a critical warning when the
NetDeviceWifi dispose does run, since it tries to destroy a now
non-existent window.

Fix this by sinking the floating reference, and unreffing it in the
NetDeviceWifi dispose function.

Fixes #2823
2024-01-08 09:38:55 +00:00
Alessandro Bono
67358cd529 cc-ua-seeing-page: Invert overlay scrollbars logic
Similar reasoning as in 7e42076a0a [1].
Accessibility features should be features that you enable[2]. It is odd
to see a feature enabled by default and that should be disabled in
order to improve accessibility.

[1] 7e42076a0a
[2] https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2154#note_1600075
2024-01-08 09:30:22 +00:00
Felipe Borges
a0732990c0 ci: Install 'glslc' for Gtk build with Vulkan 2024-01-08 10:01:51 +01:00
Artur S0
bd02e35009 Update Russian translation 2024-01-07 12:01:36 +00:00
Fabio Tomat
a2e4df0bb7 Update Friulian translation 2024-01-06 17:06:47 +00:00
Efstathios Iosifidis
ba6be47f93 Update Greek translation
(cherry picked from commit 65f151dfec)
2024-01-06 14:27:35 +00:00
Efstathios Iosifidis
b086299542 Update Greek translation
(cherry picked from commit 42e994c6d5)
2024-01-06 08:51:16 +00:00
Efstathios Iosifidis
0fa55ece3d Update Greek translation
(cherry picked from commit 25194046e7)
2024-01-05 22:01:57 +00:00
Aefgh Threenine
af9a736f99 Update Thai translation 2024-01-05 20:10:22 +00:00
Aefgh Threenine
61e02a50a9 Update Thai translation 2024-01-05 19:39:17 +00:00
Felipe Borges
88e0a3caba mouse: Split "Scroll Method" and "Direction" into separate row groups
Per mockups in
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/mouse-and-touchpad/mouse-and-touchpad.png?ref_type=heads
2024-01-04 13:50:39 +00:00
Felipe Borges
3335985290 mouse: Add "Click method" option
Fixes #229
2024-01-04 13:50:39 +00:00
Felipe Borges
8da25aaef5 system: Replace dynamic System row subtitles with static text
Row subtitles in Settings are typically a description of the main label or setting.
You can see this in Mouse & Touchpad, Privacy, Sharing, and Wi-Fi.
For the System panel we did something a bit different and used the subtitle to show
the status of each panel.

Given the standard use of subtitles elsewhere, this feels a bit surprising which,
as a result, makes the panel harder to read. I think that a standard description
would probably also be more useful than the current labels.

Mockups https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png?ref_type=heads

This also removes the thin CcSystemPage abstract class because it was
only introduced to add the support for dynamic System row subtitle. Now
this abstraction is no longer necessary.

Fixes #2776
2024-01-04 11:38:47 +00:00
Automeris naranja
45a5a1e0e7 sharing: Use AdwPreferencesPage/AdwPreferencesGroup in all dialogs 2024-01-04 11:31:04 +00:00
Bart Gravendeel
cacc2b5bef Remove use-underline property from all CCListRows 2024-01-04 10:11:35 +00:00
Jakub Steiner
fa4c6edbe0 mouse: fix edge scroll animation
- more accurate representation of the physical dimensions
  of the active area.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2803
2024-01-04 10:08:18 +00:00
Alynx Zhou
cbfd3b1ad9 system/region: Prevent preview crash from accessing invalid pointer
In !2051, we switch back to real locale before setting the label text,
however, according to nl_langinfo's manpage, the returned pointer could
be invalid after switching locale or creating new locale, so the program
may crash.

To fix this, we save the result before switching locale, so we won't
access the invalid pointer after switching locale.
2024-01-04 11:23:54 +08:00
Efstathios Iosifidis
bfec11b543 Update Greek translation
(cherry picked from commit 0a8e61c9eb)
2024-01-03 20:10:14 +00:00
Hari Rana
a00a0fe3fd automatic-suspend-dialog: Use AdwPreferencesPage
The GtkScrolledWindow-AdwClamp-GtkBox combo would cause the dialog to horizontally move when the user resizes it to its minimum width. Furthermore, the AdwClamp used in the window wasn't using its `child` property. The dialog looks identical.
2024-01-02 15:20:47 +00:00
Hari Rana
2a75af4d48 primary-menu: Add mnemonics 2024-01-02 08:58:13 +00:00
Automeris naranja
21d93d19df remote-desktop-page: Use an en dash in the page description 2024-01-02 08:44:15 +00:00
Automeris naranja
7c865408c7 po: Add location-page.c to POTFILES.in
Otherwise the new strings from 05b9fcd85e
will be left untranslated.
2024-01-02 08:43:32 +00:00
Automeris naranja
6a04869948 wwan: Remove object ID from the "No WWAN Adapter Found" AdwStatusPage
I copied the AdwStatusPage code from the Bluetooth panel
to make https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2082.
However, I forgot to remove the object ID from the
"No WWAN Adapter Found" AdwStatusPage.

Remove the ID to avoid future problems.
2024-01-02 08:42:35 +00:00
velsinki
63995f7354 po: Remove background file from POTFILES.in
Commit 94513252 removed the unused bg-colors-source files from the
Appearance (background) panel, but forgot to delete the entry from
POTFILES.in as well.
2024-01-02 08:41:30 +00:00
Efstathios Iosifidis
a769843afa Update Greek translation
(cherry picked from commit 4ef09d387a)
2024-01-01 21:00:43 +00:00
Efstathios Iosifidis
8e4f51b304 Update Greek translation
(cherry picked from commit 1c83dcf37a)
2024-01-01 19:04:54 +00:00
Efstathios Iosifidis
b7a66f6a02 Update Greek translation
(cherry picked from commit a57a45ae18)
2024-01-01 11:10:51 +00:00
Efstathios Iosifidis
3cb506404e Update Greek translation
(cherry picked from commit 4a1b9b2a2c)
2023-12-31 23:16:09 +00:00
Felipe Borges
8a57658707 docs: Fix typo in CODEOWNERS path 2023-12-22 10:40:50 +01:00
Yosef Or Boczko
c1fa336658 Update Hebrew translation 2023-12-21 23:17:17 +00:00
Automeris naranja
ae73d2d324 input-chooser: Reduce window width
The input chooser window width is unnecessarily
big, so this change reduces it to avoid unused space.
2023-12-21 09:30:06 +00:00
Automeris naranja
4d6c32c187 remote-desktop-page: Add period to the page description phrase
I forgot this in !2095.

Mockups:
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/remote-desktop/remote-desktop.png
2023-12-21 09:25:57 +00:00
Automeris naranja
05b9fcd85e location-page: Set up the page description in the C code
This will make easier to translate the strings.
2023-12-21 09:25:57 +00:00
Peter Hutterer
e53cc1f69b wacom: Mark the center-point of the stylus pressure curve 2023-12-21 09:23:49 +00:00
Peter Hutterer
815bd93943 wacom: Simplify the algorithm a bit
Now that our first and last configuration points are 0/100 and 100/0
respectively, we can simplify the calculation a bit. Doubly so because
p2 is just a mirror of p1.

That with extending the slider range to 200 means we get a value for
each integer combination on our pressurecurves - which in turn means
that for any of our generated curves we get a slider value return.
2023-12-21 09:23:49 +00:00
Peter Hutterer
b76a7e06b2 wacom: Extend the pressurecurve range by 25% in each direction
Now that we have a smooth range of curves we can extend the curve
into the maximum range we can support given 0 < x|y < 100.
2023-12-21 09:23:49 +00:00
Peter Hutterer
7814309ee9 wacom: Generate a smooth pressure curve instead of just 7
Our previously hardcoded pressurecurves follow a predictable
pattern so we can generate the value on-the-fly based on that pattern.
The slider now uses a range of 100 (integer) values and calculates the
matching pressure curve based on that. The actual pressure curve remains
the same for previous values.

However, the functions are lossy thanks to CLAMP() so figuring out
a slider position from points requires heuristics: for each of the four
coordinates we calculate a slider value. Then we calculate the points
for that slider value and if those calculated points match ours then we
have a winner.
2023-12-21 09:23:49 +00:00
Carlos Garnacho
17d8013769 common: Query Virtual core pointer for currently used tablet
This code does not work as expected in X11, since the GdkDevice
that GTK gives us is the Virtual core pointer, and not the hardware
device that is driving it at the moment.

Since there's no way to ask for this information to GTK4, query
XI2 indirectly about it, by checking the source device that the
Virtual core pointer inherited its XIValuatorClass classes from
(e.g. pressure), then querying that source device /dev node path.
2023-12-20 20:57:52 +01:00
Felipe Borges
445bc72c7c apps: Add banner indicating when an app isn't sandboxed
This uses a work around AdwBanner not having APIs for setting a
custom child on its internal GtkOverlay child.

It adds a custom widget (CcListRowInfoButton) using the GtkWidget
API and binds the widget visibility to the AdwBanner.visible
property.

This workaround ignores AdwBanner.revealed and relies on its
"visible" property so that we avoid having a "hide" animation when
switching between an app that shows the banner to one that doesn't.

An app page is static populated and the banner is supposed to be
displayed when the page loads and not later.

Fixes #2782
2023-12-20 12:03:09 +00:00
Felipe Borges
2d40ea866c docs: Add velsinki to CODEOWNERS file 2023-12-20 12:02:47 +01:00
velsinki
94513252fc background: Remove bg-colors-source and refactor
The ability to choose solid colored backgrounds has been removed at
least 4 years ago, so let's remove the code for it too.

Furthermore, we slightly refactor some code to make it easier to
understand and fit better to the usual style.
2023-12-19 14:14:28 +00:00
velsinki
23e7e8466e background: Make preview sharper using CcBackgroundPaintable
Because the CcBackgroundPaintable is now reusable, it can be used inside
the preview. This allows removing lots of code, since the drawing is now
done by the paintable. Because the scale factor was previously not
handled properly, this change makes the preview much sharper on scale
factors > 1.

Fixes #704
2023-12-19 14:14:28 +00:00
velsinki
18413cb172 background: Make CcBackgroundPaintable independent
To make the CcBackgroundPaintable fully reusable, it has to know the
desired thumbnail size and the thumbnail factory. We add a width and
height property, and modify the thumbnail retrieval of CcBackgroundItem
to use the scale factor now.

This also allows us to greatly simplify the background sources, so that
they now only do one thing: provide CcBackgroundItems from different
sources.

We keep the fixed thumbnail height and width for the chooser, which
makes more sense now that it is in the chooser code instead of the
background source code.
2023-12-19 14:14:28 +00:00
velsinki
761367ac4a background: Make paintable light/dark adjustable
In order to make the CcBackgroundPaintable more reusable, the way it
draws itself either light, dark, or both needs to be adjustable. We
therefore introduce CcBackgroundPaintFlags that indicate the desired
drawing behavior.
2023-12-19 14:14:28 +00:00
velsinki
50411b206d background: Split Meson generated enums
This separates the CcBackground... enums from the GDesktop... ones,
preserving the separate namespaces.
2023-12-19 14:14:28 +00:00
velsinki
99b42130b0 wifi: Fix crash when switching to other panel after forget network
Similar to the previous crashes, if you switch panels after forgetting a
network while the toast is still alive, Settings crashes. This is
because the AdwToastOverlay is not properly disposed because the Saved
Networks dialog is also not destroyed.

However, destroying the saved networks dialog still leaves a crash,
because the overlay disposal first unreferences its child, but we still
need that for the dismissal of the waiting toasts. Therefore, we keep an
extra reference to the saved networks list.

To prevent further crashing, we cannot set "list" to NULL, because there
may be multiple async calls. Also, we have to keep a reference to self
in the async call, otherwise it does not work when you remove many
networks and then switch panels.

As an added bonus, we can now use the saved networks list inside the UI
refresh function.
2023-12-19 09:33:26 +00:00
velsinki
794d8f5135 wifi: Move Saved Network mostly to .ui and clean up
It is cleaner to define the dialog in a .ui file. Moreover, since we are
initializing the main Visible Networks list in the code, we can
initialize the Saved Networks list in the same location, in the same
style.
2023-12-19 09:33:26 +00:00
velsinki
74279db43f wifi: Clean up net-device-wifi
There is a lot of unused code for the saved networks dialog. We can
remove all of that.

We furthermore format the code a litte better.
2023-12-19 09:33:26 +00:00
velsinki
91771c4c31 wifi: Avoid casting of Adw and GTK types
This reduces some of the casting noise in the code.
2023-12-19 09:33:26 +00:00