Commit graph

7089 commits

Author SHA1 Message Date
Michael Catanzaro
bc01d726f5 info-overview: never upscale the system logo
If we scale up, the logo will become blurry. We should only ever be
willing to scale down, not scale up.

Hopefully fixes #1709
2022-10-25 15:08:53 -05:00
Michael Catanzaro
db3be4c498 network: fix crashes in eap-method-simple
When the stored password is missing, we will crash passing NULL to a
non-nullable GTK API function.

Fixes #1905
2022-10-24 10:50:31 +00:00
Pablo Correa Gómez
ab7d752de9 default-apps: Show SMS and Calls conditional to modem being present
This avoids coggling the UI for those devices for which a modem
is not present, as x-scheme-handler/tel and x-scheme-hanlder/sms
are of no use in such cases
2022-10-21 14:35:40 +02:00
Pablo Correa Gómez
f1e46f0983 default-apps: Add default app to handle x-scheme-handler/sms 2022-10-21 11:48:41 +02:00
Newbyte
ea534c48d8 default-apps: Add default app to handle x-scheme-handler/tel 2022-10-21 11:48:41 +02:00
Pablo Correa Gómez
843c12c2e2 default-apps: Increase readability by using default GtkGrid naming 2022-10-21 11:48:41 +02:00
Pablo Correa Gómez
bbdb641b3d default-apps: Remove unnecessary blank labels
These labels were introduced in an ancient time (pre 2011) when
the panel still consisted in a table. They are unnecessary
and have no UI impact at this point
2022-10-21 11:48:41 +02:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +00:00
Andy Chi
e0f22a04bb user-account: Return duplicate notification when the finger is exist 2022-10-20 10:09:04 +00:00
Felipe Borges
b5a62e9c6e info-overview: Add "Kernel Version" row
Fixes #1112
2022-10-20 10:07:51 +00:00
Felipe Borges
afd173c799 info: Make get_hardware_model use a hostnamed property getter
This way we have a convenient way to obtain systemd-hostnamed
properties.
2022-10-20 10:07:51 +00:00
Felipe Borges
a9312cdea3 background: Check for bg name before sorting wallpapers
Otherwise a missing <name> tag in an wallpaper XML can couse
Settings to crash.

Fixes #2087
2022-10-17 15:13:34 +00:00
Kaustubh Desale
2538075fd5 Fixes uneven padding in Formats search bar. 2022-10-15 18:32:56 +00:00
Alessandro Bono
3182b7019f net-device-ethernet: Don't check device iface name
If the interface name is wrong we shouldn't add the device in the first
place. The device comes from NM. If the interface name is wrong is a bug
at NM level.
2022-10-12 13:56:19 +02:00
Alessandro Bono
f6fa2fafec net-device-ethernet: Prevent double free
Fixes: ee53bfd8b6
2022-10-12 13:56:19 +02:00
Luciano da Silva Ribas
ee53bfd8b6 network: Fixed Network profiles shown on wrong device
Added missing interface name during network profile creation.

Fixes #353

Fixed issues from code review
2022-10-12 08:43:22 +00:00
Alexander Mikhaylenko
53fd0d69e2 firmware-security: Don't use .view on rows
I'm not sure what the intention was here, but it didn't work. It made rows
white in light variant (same as other rows), but even darker than they were
before in dark.
2022-09-22 15:34:56 +00:00
Felipe Borges
6b076a7765 user-accounts: Disconnect fingerprint reading devices when closing dialog
Otherwise when users close and reopen the window they will face a
“Failed to claim fingerprint device Synoptics Sensors: the device is
already claimed by another process” error message.

Fixes #1983
2022-09-22 14:32:33 +02:00
Lubomir Rintel
ad0db360e2 network: Fix an assertion failure
Entering the Wi-Fi page without connected to a network trips an
assertion failure:

  (gnome-control-center:14943): nm-CRITICAL **: 16:36:16.732: nm_access_point_get_frequency: assertion 'NM_IS_ACCESS_POINT(ap)' failed

  Thread 1 "gnome-control-c" received signal SIGTRAP, Trace/breakpoint trap.
  0x00007ffff7c8ee51 in g_logv () from /lib64/libglib-2.0.so.0
  (gdb) bt
  #0  0x00007ffff7c8ee51 in g_logv () at /lib64/libglib-2.0.so.0
  #1  0x00007ffff7c8f0d3 in g_log () at /lib64/libglib-2.0.so.0
  #2  0x00007ffff63b7b8a in nm_access_point_get_frequency () at /lib64/libnm.so.0
  #3  0x00000000005965b1 in connect_details_page (self=0x4658210) at ../panels/network/connection-editor/ce-page-details.c:264
  #4  0x0000000000597f9e in ce_page_details_new (connection=0xfbde70, device=0xd52360, ap=0x0, editor=0x50a4350) at ../panels/network/connection-editor/ce-page-details.c:570
  #5  0x0000000000593273 in net_connection_editor_set_connection (self=0x50a4350, connection=0x7fffcc096770) at ../panels/network/connection-editor/net-connection-editor.c:522
  #6  0x0000000000593f7d in net_connection_editor_new (connection=0x7fffcc096770, device=0xd52360, ap=0x0, client=0xd3a0c0) at ../panels/network/connection-editor/net-connection-editor.c:790
  #7  0x0000000000582b16 in show_details_for_row (self=0xcc3040, row=0x46587b0, list=0x4273b40) at ../panels/network/net-device-wifi.c:987
  #8  0x00007ffff7d83845 in g_cclosure_marshal_VOID__OBJECTv () at /lib64/libgobject-2.0.so.0
  #9  0x00007ffff7da1b79 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
  #10 0x00007ffff7da1eb8 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
  #11 0x000000000058d41f in on_row_configured_cb (self=0x4273b40, row=0x46587b0) at ../panels/network/cc-wifi-connection-list.c:251
  #12 0x00007ffff7da1b79 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
  #13 0x00007ffff7da1eb8 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
  #14 0x000000000058c4c4 in configure_clicked_cb (self=0x46587b0) at ../panels/network/cc-wifi-connection-row.c:513
  #15 0x00007ffff7da1b79 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
  #16 0x00007ffff7da1cb3 in g_signal_emit () at /lib64/libgobject-2.0.so.0
  ...
2022-09-22 09:22:12 +00:00
Felipe Borges
12bbd3ea0c printers: Set "use-underline" for Authenticate button in Jobs dialog
The label of the button indicates a mnemonic (_Authenticate).

Fixes #2062
2022-09-19 15:01:05 +02:00
Bastien Nocera
da7b4db162 power: Don't assert if we can't find the widget for a profile
In some cases, it was possible for a profile to be set (directly, or
through a hold) even though it wasn't supported. Don't assert in those
cases.

Closes: #1504
2022-09-16 11:07:09 +00:00
Carlos Garnacho
92b784f561 wacom: Use Mutter's input mapping interface to show calibration UI
When the "Automatic" mapping is chosen for a display-attached tablet device,
Mutter is in charge of applying the heuristics to map the tablet device to
its most likely attached display.

When that happens, the Wacom panel does not know better (or anything)
to show the calibration UI than picking a GdkMonitor and hoping for the
best.

To improve this situation, Mutter has been added a D-Bus interface so it
is possible to query it for the output that a tablet device is mapped to.
This commit adds the support for this interface, so that the Wacom panel
does know to pick the right GdkMonitor to fullscreen the calibration UI on.
2022-09-01 23:14:07 +02:00
Kate Hsuan
ac74cf695c firmware-security: hide expander arrow when event description is unavailable
Showing an arrow for an empty expander row for the event confuses the user.
The user may misunderstand there is the information behind the arrow and then
the user will click it but will not get any response from the panel.
Therefore, to prevent confusing the user, the expander will be hidden for a
event with an empty description.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2031

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-08-29 16:11:14 +00:00
Matthias Clasen
920302bb52 background: Allow all images
The code was filtering with a small list of known
image mimetypes, needlessly. Just allow any
image/* mimetypes.

Fixes: #2036
2022-08-25 17:06:12 +00:00
Richard Hughes
12352f8c1a firmware-security: Move the workaround for UEFI Secure Boot lower
This fixes the toplevel security level to correctly show failed.
2022-08-25 14:37:14 +00:00
Felipe Borges
ff904208cb sound: Fix sound alert selection
The mapping between sounds and the UI elements was wrong.

Fixes #2026
2022-08-25 16:08:24 +02:00
Kate Hsuan
0245329949 firmware-security: Hide the panel when chassis type is an empty string
When requesting the chassis type through systemd-hostnamed, it sometimes
returns an empty string "" not the "vm" to present the virtual machine.
Since this panel will not be shown in the VM environment, if systemd-hostnamed
returns an empty string or "vm", the panel will be hidden.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-08-24 14:39:33 +00:00
Richard Hughes
be3d9752bc firmware-security: Handle platforms that do not have a valid set of HSI tests
This affects aarch64 and older AMD devices.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2014
2022-08-24 14:39:58 +01:00
Richard Hughes
941fdeaa05 firmware-security: Only show events that have changed value 2022-08-24 14:27:59 +01:00
Felipe Borges
37921f8a46 display: Fix primary monitor selection issue with AdwComboRow
We were connecting to the selected-index property when AdwComboRow
actually has a selected-item property. This is the same as
issue #2025

Fixes #2028
2022-08-24 11:18:35 +02:00
sunflowerskater
53ff717b4d printers: Use the same sentence for "Add Printer" in button and empty-state
Change the add printer button text, from the empty state section, to "Add Printer..."
(previously was "Add a Printer...") so it gets consistent with the add printer button
from the headerbar (in Printers panel) and with other buttons in Settings that end with
ellipsis, such as the "Add Picture..." from the Appearance panel, which doesn't have the
article also.
2022-08-24 08:46:55 +00:00
Felipe Borges
3a31e34514 power: Fix "Power Button Behavior" setting now applying
The AdwComboRow widget has a selected-item property, while we were
connecting to selected-index (which doesn't exist.

It is likely that selected-index existed in the past in libhandy
or libadwaita and this is a regression during the port to GTK4.

Fixes #2025
2022-08-23 15:26:46 +00:00
Felipe Borges
37f5cbe6af power: Fix blank-screen settings not applying
The AdwComboRow widget has a selected-item property, while we were
connecting to selected-index (which doesn't exist.

It is likely that selected-index existed in the past in libhandy
or libadwaita and this is a regression during the port to GTK4.

Fixes #2025
2022-08-23 15:26:46 +00:00
Jake Dane
1ae4d99421 network: Fix 802.1x TLS file chooser filters
If on the Security tab in the connection editor one selected 802.1x
with TLS authentication, the 3 file chooser dialogs there didn't
let one select any file. This was because allowed extensions were
passed to gtk_file_filter_add_suffix () with the leading dot but that
function expects them without the leading dot.

This could be fixed in the code by skipping over the dot but as per
discussion on !1433 it is preferable to use mime types instead. The
code is changed to use mime types for the file chooser dialog filter
and for checking a file is of the right type.

Fixes #2022.
2022-08-23 10:28:19 +00:00
Sebastian Keller
7f6dc4511f tests: Add test for keyboard shortcut normalization
This tests if the shortcuts generated from an event are in the format
that the shell expects.
2022-08-22 12:49:13 +00:00
Sebastian Keller
bad61a2229 keyboard: Handle shift shortcut modifier the same way as the shell does
The way shortcuts in mutter/gnome-shell work is that it looks up the
keycode that generates the shortcut keyval at the lowest shift level and
then checks if all the modifiers match. This does not work for shortcuts
that for example include "dollar" to represent "<Shift>4", because on
some keyboards/layout there is a separate dollar key key with its own
keycode. This would be at a lower shift level than "<Shift>4".

By always translating such shortcuts to "<Shift>number", we make sure
the resulting shortcut will work in the shell and is closer to what the
user likely intended the shortcut to be, because numbers are usually
assigned to things that can be enumerated, such as workspaces or
favorite applications.

This also special cases the num-row key on layouts such as AZERTY, where
the number is the shifted keyval, to always prefer the number. Due to
the way the shell interprets these shortcuts, they still work and by
always using numbers they work across different layouts.

This change also fixes that pressing "<Shift><Super>4" was turned into
"<Shift><Super>dollar", which effectively included the "<Shift>" twice.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1528
2022-08-22 12:49:13 +00:00
Sebastian Keller
986a37ff6c keyboard: Split out function to normalize keyval and modifier mask
This will allow it to be tested in a unit test in an upcoming commit.
2022-08-22 12:49:13 +00:00
Pablo Correa Gómez
b9a684dc1d region: fix warning of uninitialized variables
../panels/region/cc-region-panel.c: In function 'set_restart_notification_visible':
../panels/region/cc-region-panel.c:131:17: warning: 'current_locale' may be used uninitialized [-Wmaybe-uninitialized]
  131 |                 uselocale (current_locale);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
../panels/region/cc-region-panel.c:115:18: note: 'current_locale' was declared here
  115 |         locale_t current_locale;
      |                  ^~~~~~~~~~~~~~
../panels/region/cc-region-panel.c:130:34: warning: 'new_locale' may be used uninitialized [-Wmaybe-uninitialized]
  130 |         if (locale && new_locale != (locale_t) 0) {
      |                       ~~~~~~~~~~~^~~~~~~~~~~~~~~
../panels/region/cc-region-panel.c:114:18: note: 'new_locale' was declared here
  114 |         locale_t new_locale;
      |                  ^~~~~~~~~~
2022-08-20 20:47:35 +00:00
Pablo Correa Gómez
7846e57bfe region: fix possibly unused variable
../panels/region/cc-format-preview.c: In function 'update_format_examples':
../panels/region/cc-format-preview.c:70:16: warning: unused variable 'fmt' [-Wunused-variable]
   70 |   const gchar *fmt;
      |                ^~~
2022-08-20 20:47:35 +00:00
Pablo Correa Gómez
32b5e5dcb3 region: fix permissions_acquired always returning FALSE 2022-08-20 20:47:35 +00:00
Pablo Correa Gómez
18eea16ff3 keyboard: fix permission_acquired always returning FALSE 2022-08-20 20:47:35 +00:00
Marek Kasik
5ceabcb5c7 printers: Show empty-state after removal of the last printer
Check whether the currently removed printer was last. Also
check whether there are other printer being removed by CUPS
right now (their amount is still part of self->num_dests).

Do this check also in actualize_printers_list_cb() to catch
corner cases from timing point of view. This will handle them
with some delay if they show up.

When undone, just check whether the number of printers is higher
than 0 and show the printers-list page.

Fixes #2023
2022-08-18 17:01:02 +02:00
Felipe Borges
4ea4f41e20 printers: Pass correct argument to gtk_builder_add_objects_from_resource
This is detectable with -Wincompatible-pointer-types and warns with
[1/7] Compiling C object panels/printers/libprinters.a.p/cc-printers-panel.c.o
../panels/printers/cc-printers-panel.c: In function ‘cc_printers_panel_init’:
../panels/printers/cc-printers-panel.c:1228:59: warning: passing argument 3 of ‘gtk_builder_add_objects_from_resource’ from incompatible pointer type [-Wincompatible-pointer-types]
 1228 |                                                           objects, &error);
      |                                                           ^~~~~~~
      |                                                           |
      |                                                           gchar ** {aka char **}
In file included from /usr/include/gtk-4.0/gtk/gtkbuildable.h:26,
                 from /usr/include/gtk-4.0/gtk/gtk.h:56,
                 from /usr/local/include/libadwaita-1/adwaita.h:9,
                 from ../shell/cc-panel.h:25,
                 from ../panels/printers/cc-printers-panel.h:21,
                 from ../panels/printers/cc-printers-panel.c:23:
/usr/include/gtk-4.0/gtk/gtkbuilder.h:122:66: note: expected ‘const char **’ but argument is of type ‘gchar **’ {aka ‘char **’}
  122 |                                                   const char   **object_ids,
      |                                                   ~~~~~~~~~~~~~~~^~~~~~~~~~
[7/7] Linking target tests/network/test-wifi-panel-text
2022-08-18 15:33:38 +02:00
Carlos Garnacho
39402f21ba wacom: Show distinct entries for Wacom Express Key Remote
If you did not know the Wacom Express Key Remote (or EKR for short),
let me introduce it to you:

https://estore.wacom.com/media/catalog/product/cache/fb4143a007ae6439deba9b18afd745f2/a/c/ack-411050_main_2.jpg

This is a hand-sized standalone pad device, meant to be used together
with drawing tablets, providing additional buttons and a touch sensitive
ring that can be mapped to actions and keypresses.

These pads were so far handled in GNOME, but in a very subtle manner.
As the EKR is implicitly paired to a tablet, it was possible to map
EKR buttons from the paired tablet once the pad OSD UI from GNOME
Shell was shown.

As this device basically just needs a "Map buttons" action to
configure it, it just didn't sit well in the older Settings UI,
it would get a separate page with just a lone button in there. So
its support has been kind of an easter egg so far.

But the new UI can indeed accomodate better a device that is neither
tablet nor stylus, and has few options. This commit adds the EKR
as a separate AdwPreferencesGroup.
2022-08-17 11:57:33 +00:00
Felipe Borges
32f73d9045 search: Use "action" to connect to Move up/down actions for rows
Using "action-name" wasn't triggering the callback.

Fixes #2013
2022-08-17 09:41:54 +00:00
Mohammed Sadiq
38d62974b6 user-panel: Fix possible invalid free
The selected_user variable is unref on dispose(), and show_user()
is likely executed with self->selected_user already set to user,
but it's inconsistent, and so to be on the safer side, use
g_set_object()
2022-08-17 08:21:34 +00:00
Mohammed Sadiq
234485fd19 online-accounts: Fix a possible crash on parsing NULL string
If the goa helper fails to find goa helper executable (which happened when run
without install), %NULL is returned.  Avoid feeding g_variant_parse(), the %NULL
variable in those case as it is not nullable and avoid the crash that follows.
2022-08-17 08:16:28 +00:00
Mohammed Sadiq
a4aa214d76 info-overview: Use adw-external-link icon
Replace the use of external-link-symbolic which doesn't
work with dark theme
2022-08-17 08:09:15 +00:00
Mohammed Sadiq
5f3b16b288 keyboard: Fix activation of input source toggle button
When the options are changed, the first item was never shown as
active when selected.  Fix it by binding to the inverse of the
button state instead of binding both toggle buttons to settings.

Fixes #1653
2022-08-15 08:26:16 +00:00
Mpho Jele
5782c7312c display: remove unused night light dialog code 2022-08-15 08:14:27 +00:00