Commit graph

7301 commits

Author SHA1 Message Date
Felipe Borges
b5ce0f08b9 mouse: Redesign Mouse panel
See
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/mouse-and-touchpad/mouse-and-touchpad.png
2023-02-14 13:31:23 -03:00
Felipe Borges
42cfa6dcb5 common: Introduce CcSplitRow 2023-02-14 13:31:23 -03:00
Felipe Borges
c4e569610d common, multitasking: Introduce CcIllustratedRow
The CcIllustratedRow is a generalization of CcMultitaskingRow to
be used later in the Mouse settings.
2023-02-14 13:31:23 -03:00
Felipe Borges
7ba1afc647 mouse: Add mouse "acceleration profile" row
Fixes #94
2023-02-14 12:13:30 +01:00
Nelson Benítez León
e865b14e3b keyboard: allow going back from CCInputChooser via single click
When adding new input sources, the first dialog shows a list of
languages, when single clicking one item you go to a subdialog
that has a 'go back' item, that item only works if double-clicking
it, but that is unintuitive because if you entered the dialog by
single click you also expect the 'go back' button to work by
single click too.

The subdialog is a GtkListBox configured to be double click,
because it has an 'Accept' header bar button and we don't
really want to activate the subdialog items by single click,
but the 'go back' row is special and as explained before it is
expected to work by single click too.

So this commit adds the required single click handler for the
'go back' rows created in CCInputChooser.

Fixes #1954
2023-02-14 03:24:20 +00:00
Nelson Benítez León
d1e64d0f13 user-accounts: Initialize CcAvatarChooser a bit earlier
Fixes following warning when activating Users panel:
user-accounts-cc-panel-WARNING **: Error retrieving app filter for user (null): User 4294967295 does not exist

Initialize CcAvatarChooser a bit earlier so it does
not get used by show_user() before creation.

Fixes #2219
2023-02-11 23:10:30 -04:00
sunflowerskater
9b24810b80 wi-fi: Use AdwStatusPage for the "NetworkManager needs to be running" status page
The Wi-Fi panel displays an old fashioned status page when NM isn't running. Also, it shows a generic error message instead of explaining why the error occurred.

This commit updates this status page to an AdwStatusPage, Also, it makes clear that the error happens because of NM not running.
2023-02-10 13:43:43 +00:00
sunflowerskater
d08fe40bb6 applications-panel: Prevent "Link Files & Assoc." dialog to be shrunken to an unexpected size
Currently, this dialog doesn't have a minimum width and height.
It's possible to shrink it to an unexpected small size.

This commit adds a minimum width and height for this dialog.
2023-02-10 12:20:38 +00:00
sunflowerskater
40f3a2ae98 applications-panel: Set minimum width and height for the "Required Access" dialog
This dialog appears with a really small size, making elements almost invisible.
Also, it can be shrunken to an even smaller size.

This commit sets a minimum width and height for this dialog.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1826
2023-02-10 12:20:38 +00:00
Alessandro Bono
19d83d6839 keyboard: Rewrite layout intersection algorithm
The current layout intersection algorithm compares pointers to strings.
It assumes that `gnome_xkb_info_get_layouts_for_country()` and
`gnome_xkb_info_get_layouts_for_language()` will return two GList
containing pointers to the same strings. Looking at libgnome-desktop[1]
it seems like this is the case: given the same layout, the same pointer
to the layout id will be stored in both lists. However, this is an
implementation detail and we should not rely on that.

Rewrite the intersection algorithm in order to compare the strings. While
at it, use a more efficient algorithm: add all the items of the first list
to a set, then iterate over the second list and check if the item is in
the set. If this happens, remove the item from the set and add it to the
intersection list.

Probably the layout lists are not big enough to notice the difference, but
the complexity goes from O(N*M) to O(N+M).

[1] 3c8834af09/libgnome-desktop/gnome-xkb-info.c (L281)
2023-02-10 11:32:05 +00:00
Georges Basile Stavracas Neto
441ff16c5f Revert "firmware-security: Rename "Security Events" to "Security Alerts""
This reverts commit 90d83fdfe5
2023-02-10 11:31:15 +00:00
Georges Basile Stavracas Neto
81866aeb29 Revert "firmware-security: Add a subtitle for the "Security Alerts" title"
This reverts commit dded489b81
2023-02-10 11:31:05 +00:00
Automeris naranja
dded489b81 firmware-security: Add a subtitle for the "Security Alerts" title
In the latest mockups there is a subtitle below the "Security Alerts" title:
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/device-security/device-security-44.png

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2332
2023-02-10 11:18:02 +00:00
Automeris naranja
90d83fdfe5 firmware-security: Rename "Security Events" to "Security Alerts"
"Security Events" string was replaced by "Security Alerts" in latest mockups:
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/device-security/device-security-44.png

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2332
2023-02-10 11:18:02 +00:00
Sundeep Anand
b05990e024 keyboard: country matches should not be shown under a language name.
country_layouts are being appended to the layouts_with_locale which results in less relevant
layout groupings. for example, we if choose Hindi language which is an Indian language,
all Indian language layouts are shown within it - including Tamil, Bangla etc.

furthermore, language_layouts are also getting appended for countries where they may not
belong, for example, English (Ireland) is shown when we search India.

The layouts_with_locale table is filled as union however it yields better
search results if we change that to intersection.

Relates #2114
2023-02-09 14:12:27 +00:00
Jan Pokorný
705ff06d64 display: Add 32:9 to known aspect ratios
Resolution dropdown previously did not show an aspect ratio hint for
32:9 resolutions. This adds the 32:9 aspect ratio to recognized ones.

Fixes #2334
2023-02-09 14:08:46 +00:00
Aryan Kaushik
8a4a80b7b2 network: Disable DNS entry if the automatic option is enabled
Fixes: #2243
2023-02-07 22:51:45 +00:00
Allan Day
f3e64dd720 firmware: Tweak status strings
The descriptions for the levels of protection were very similar.
This makes them more distinct.
2023-02-07 13:39:06 +00:00
Alessandro Bono
c892b69b40 microphone: Move switch from the header bar to the panel
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2198
2023-02-07 10:14:40 +00:00
Alessandro Bono
3c60eb9e76 microphone: Remove empty status page
We are going to move the main switch from the header bar to the panel.
There is no more need for an empty page.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2191
2023-02-07 10:14:40 +00:00
Alessandro Bono
f8b1934882 camera: Move switch from the header bar to the panel
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2198
2023-02-07 10:14:40 +00:00
Alessandro Bono
3f84e2d9b4 camera: Remove empty status page
We are going to move the main switch from the header bar to the panel.
There is no more need for an empty page.

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2191
2023-02-07 10:14:40 +00:00
Alessandro Bono
1f9e96a897 location: Move switch from the header bar to the panel
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2198
2023-02-07 10:14:40 +00:00
Alessandro Bono
5eac8cc1d1 location: Remove empty status page
We are going to move the main switch from the header bar to the panel.
There is no more need for an empty page.

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2191
2023-02-07 10:14:40 +00:00
Georges Basile Stavracas Neto
284ff9fa0d network: Cosmetics 2023-02-06 10:38:43 -03:00
Gotam Gorabh
820a204853 wi-fi: updated stop hotspot dialog
This changes update the UI of current outdated stop hotspot dialog.
Using AdwMessageDialog instead of GtkMessageDialog to update it.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2291
2023-02-06 13:34:23 +00:00
faultline
fee8351c67 network: Init editor when secrets are missing
When NetworkManager doesn't give us any secrets for a connection, the
connection editor still needs to be opened. This change ensures that
initialization of the editor completes even when there's an error when
fetching secrets.

Fixes #2329
2023-02-05 16:59:45 +00:00
Alessandro Bono
b585371cb8 firmware-security: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
d886f6199e diagnostics: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
5d28eff9de usage: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
482a01f071 thunderbolt: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
96a4ab5787 microphone: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
fe7c8221ad microphone: Update name
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
0e21e855e8 camera: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
a1aeed9edb camera: Update name
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
ba14428330 location: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alessandro Bono
891b8be198 screen: Update comment
Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2196
2023-02-03 14:56:39 +00:00
Alynx Zhou
ebc986030d network: Make metered connection label a child of its check button
GtkCheckButton accepts a widget as its child and will toggle when
clicking its child, currently we put check button and label of metered
connection into a box, then clicking the label won't toggle the check
button, this differs from the other two check buttons.

This commit makes the label a child widget of the check button, so the
three check buttons behave the same.
2023-01-30 11:47:02 +00:00
Nelson Benítez León
f61bc83409 keyboard: fix bad state when moving input rows
When moving CcInputRows we can't just rely on
row index, because there are rows which are
not CCInputRows, so let's check for that.

Fixes #2282
2023-01-30 11:42:51 +00:00
Martin Pobaschnig
8c7a286511 network: Remove "close-request" signal handler for VPN file import dialog
When the dialog is closed using ESC key, the "close-request" signal is
emitted in addition to the "response" signal. When the "close-request"
is handled, it frees the memory to which info points. In the "response"
signal handler, the memory of info pointer is accessed again, leading
to a segmentation fault.

Fix this by removing the "close-request" function callback, which shares
the same behaviour as the "response" callback function.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2320
2023-01-30 11:39:11 +00:00
Marco Melorio
9f7fad1aca sound: Add .lowres-icon to CcStreamRow app icons 2023-01-30 10:50:11 +00:00
Marco Melorio
be89d7df88 sound: Format sound-panel.ui 2023-01-30 10:49:09 +00:00
Marco Melorio
29514add66 sound: Remove the nested GtkListBox
See the previous commit for more info.

The UI file is not formatted on purpose to facilitate the review. It
will be reformatted in the next commit.
2023-01-30 10:49:09 +00:00
Marco Melorio
ec9a0052ba sound: Move the "No Devices" rows in different groups
Previously this was problematic because the current layout is a bit
messy. The reasoning is a bit complex, but I'll try to explain below.

Basically the AdwPreferencesGroup has an integrated GtkListBox where the
rows should normally be added to it by declaring AdwPreferencesRow
subclasses as its direct children in the UI file. This is not currently
done in the sound panel and we instead have another GtkListBox as its
direct child, while the "No Devices" row is actually a AdwPreferencesRow
subclass, so we end up with two listboxes with .boxed-list style. The
problem is that we hide the "No Devices" row when there are devices
available, but the internal listbox is still there, so we still see its
shadows.

This commit just separates the "No Devices" row in a separate group so
that we are sure to hide everything correctly.
2023-01-30 10:49:09 +00:00
Marco Melorio
fc3580f2f2 sound: Fix warning about missing measure in output test
Just measure the label to make GTK not complain about allocating
children without measuring anything. Measuring all the buttons is an
overkill because we expect this widget to have the minimum size
overwritten by CSS either way.
2023-01-27 17:46:58 +00:00
Dylan Van Assche
571a69d36e
network: fix tabs/spaces mixing
Some functions were using tabs instead of spaces, unify the file to use spaces everywhere.
2023-01-27 18:39:19 +01:00
Dylan Van Assche
9b08433599
network: add missing cancellable
Add missing GCancellables to resolve the FIXME statements and
avoid possible crashes if the properties in NetConnectionEditor
outlive themselves.
2023-01-27 18:39:12 +01:00
Dylan Van Assche
3c4939bdbd
network: reapply connection on device
Changing an active connection applies the changes onto the
NetworkManager connection, but not on the device. This is because
NetworkManager clones the connection when it is applied on a device.
This behavior is expected and documented in the NetworkManager
documentation [1]. To effectively apply the connection changes onto a
device, a reapply operation must be performed. This will make NetworkManager
apply the new connection onto the active device without having to
disable and re-enable the device.

Perform this reapply operation when the Apply button is pressed in the
Connection Editor so the changes effectively propagate to the network
device.

[1] https://networkmanager.dev/docs/api/1.32.10/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-method-org-freedesktop-NetworkManager-Device.Reapply
2023-01-27 18:39:07 +01:00
Mohammed Sadiq
8857a6b2e6 build: Update G_LOG_DOMAIN
When run with -vvv, we log domains prefixed with cc- by default.
So set G_LOG_DOMAIN appropriately so that logs are shown when
run in verbose mode.
2023-01-25 09:55:34 +00:00
Bastien Nocera
11ae5d11d1 background: Remove unused thumbnail factory 2023-01-25 09:54:10 +00:00