Commit graph

7052 commits

Author SHA1 Message Date
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
Mohammed Sadiq
08b1f05a2a user-accounts: Fix a typo in property name 2022-08-15 07:55:36 +00:00
Mohammed Sadiq
ff39de678b common: time-editor: Fix initial AM/PM label value
We set AM/PM label on format change in init(),
but we shall not have set the time in the editor
in init() which results in wrong label if the time
is PM.

Fix it by updating clock label after time changes
2022-08-14 21:34:07 +05:30
Mohammed Sadiq
57c919b7d9 common: time-entry: Emit time-changed on time change 2022-08-14 21:33:52 +05:30
Athul Iddya
43b61571c1 network: Show VPN empty state by default
The network panel used to show an empty box under the VPN header at
start up if no VPNs were present instead of the empty state. This was
because the GtkListBox containing VPN connections was visible by
default instead of the empty state widget.

To fix this, the empty state widget has been moved to the top in the
GtkStack to show it by default. If any VPN connections are found during
initialization, `cc-network-panel` already handles setting the
visibility of the appropriate widget correctly.

Fixes: #1634
2022-08-12 01:32:15 +00:00
Will Thompson
50a92f110d info-overview: show BUILD_ID in separate row
Previously, if os-release included the BUILD_ID field, it was smushed
into the OS Name row as follows:

    OS Name                    Endless OS 5.0.0; Build ID: 220810-230009

This is unsightly in English; and in languages where the translations of
"OS Name" and "Build ID" are long, the build ID may be ellipsised and
hence useless:

    Nom du système   Endless OS 5.0.0 ; (identifiant de construction ...
    d'exploitation

Instead, display the build ID in a separate row, and hide it if not
present.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1347
2022-08-12 01:24:37 +00:00
Nils Lück
3194a1890f Migrate CcPasswordDialog from AdwPreferencesWindow to AdwWindow 2022-08-12 01:24:10 +00:00
Jakub Steiner
9def0c98e3 sound: tweak default alert sounds
- one more review pass by the designers:
  - shorter
  - tone down reverb
  - fine tune the pan on swing
  - forceful fade out to 0 on all clips
2022-08-11 16:36:59 +02:00
Eric Daigle
a71c3ac3c3 cc-printers-panel: don't show two Add Printer buttons at once
As described in #1976, the printers panel shows two Add Printer buttons when the
printers list is empty. Adds a check that sets the Add Printer button in the toolbar
to be invisible when the empty-state page is shown (and thus the other Add Printer
button is visible), creating a less confusing UI.

Closes #1976
2022-08-11 13:08:02 +00:00
Jakub Steiner
e3395b1dc3 sounds: EQ sounds
- few EQ and timing adjustments to the sounds

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/264
2022-08-11 12:20:23 +00:00
Felipe Borges
878171bd7c sound: Update sound alerts
Old sound alerts set by users will be migrated to the "click"
sound alert.

Fixes #264
2022-08-11 12:20:23 +00:00
Georges Basile Stavracas Neto
0aed0c5ecd applications: Tweak screenshot description
As per design feedback, tweak the screenshot description text to
"Take pictures of the screen at any time."
2022-08-10 16:50:41 -03:00
Kate Hsuan
82b6e2c7bb firmware-security: Tweak panel style
Fix the spacing issues of several widgets, including the status icon,
label, and subtitle in a expander row.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1999
Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-08-10 16:31:26 -03:00
Georges Basile Stavracas Neto
17b018a9fb applications: Add support for the screenshot permission
Add support for managing the screenshot permission, used by apps
who request non-interactive screenshots from the portal.

See also https://github.com/flatpak/xdg-desktop-portal/pull/851
2022-08-10 19:03:15 +00:00
Kate Hsuan
57fb0e28ae panels: firmware-security: Fix incorrect secure boot icon
If Secure boot is enabled, secure_boot_icon should be channel-secure-symbolic.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1998
Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-08-10 11:47:52 +08:00
Georges Basile Stavracas Neto
6fd7164837 Revert "applications: Add support for the screenshot permission"
This reverts commit 49486dba68.
2022-08-08 17:24:42 -03:00
Georges Basile Stavracas Neto
78434394b2 applications: Add missing end period to Storage row 2022-08-08 19:32:20 +00:00
Georges Basile Stavracas Neto
94b591ac42 applications: Fix header capitalization of background row 2022-08-08 19:32:20 +00:00
Georges Basile Stavracas Neto
49486dba68 applications: Add support for the screenshot permission
Add support for managing the screenshot permission, used by apps
who request non-interactive screenshots from the portal.

See also https://github.com/flatpak/xdg-desktop-portal/pull/851
2022-08-08 19:32:20 +00:00
Kate Hsuan
784f83eb44 panels: firmware-security: new panel UX design implementation
The new UX implementation includes
1. Showing the security level using a number.
2. Showing descriptions of events and HSI checking items.
3. Change the style of the security level number.
4. Add the status icon and label for each HSI checking item.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-08-04 19:46:28 +00:00
Felipe Borges
c2145cacf4 user-accounts: Use "title" styling for login history dialog header
See https://docs.gtk.org/gtk4/class.HeaderBar.html#gtkheaderbar-as-gtkbuildable

Fixes #1958
2022-08-03 11:16:26 +00:00
Hendrik Müller
48497080b3 wifi: Fix bug in Known Wi-Fi Networks dialog
The "Forget" button would only update it's sensitivity after the first
select and deselect, when selecting and deselecting rows in the
"Known Wi-Fi Networks" dialog.
When selecting the first row, it would go from disabled to enabled.
Then deselecting that row would cause the button to go from enabled to
disabled.
Selecting any rows after that would no longer update the sensitivity and
make the dialog essentially useless.

The issue was, that the signals "add" and "remove" where being
expected to be emitted when the connection list updates its rows.
However, neither CcWifiConnectionList nor GtkListBox emit these signals.
The fix was, to emit these two signals at the appropriate locations.
The signals have also been renamed to "add-row" and "remove-row" to
make their purpose more clear.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1824
2022-08-03 11:05:16 +00:00
Mpho Jele
dea4ce1d48 user-accounts: Remove status icons from password entries
Adding the 'error' css class to icons visually indicates that
there's an issue with the input. This is the same purpose served
by the status icons. Another reason to remove the status icons
is that with the error class added to entries the entries dim
except for the status icons.
2022-08-03 09:58:41 +00:00
Mpho Jele
33a445f12e user-accounts: Make password dialog use libadwaita password entries 2022-08-03 09:58:41 +00:00
Felipe Borges
c381c633af user-accounts: Show "automatic login" option when locked
It should be made insensitive when the panel is locked, and sensitive
when locked.

We only hide this row for non-local users, where this setting doesn't
make much sense.

Fixes #1944
2022-08-03 09:39:59 +00:00
Hendrik Müller
c44ee6fa80 wifi: Add padding to Known Wi-Fi Networks dialog
The "Known Wi-Fi Networks" dialog is missing some padding to really
make it look polished.

By switching from a normal dialog to an AdwPreferencesWindow, we can
take advantage of libadwaita's automatic padding.
This will make sure the dialog is more in line with the rest of the
GNOME ecosystem.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1956
2022-08-03 09:18:39 +00:00
Dirk Su
83278d2724 panels: wwan: Add WWAN 5G connection support 2022-08-01 20:06:51 +00:00
Richard Hughes
e0d599bb40 firmware-security: Do not show the 'Processor Supported' attribute
This is really just saying "the HSI tests make sense" and is not really
useful to show in the UI.
2022-08-01 19:53:15 +00:00
Kate Hsuan
68ca4e5a3f Show a description for each event
Show the HSI event description to improve the UX and match the new mockups.

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

Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Richard Hughes <richard@hughsie.com>
2022-07-29 07:35:30 +01:00
Marco Trevisan (Treviño)
72863a8f56 screen: Add Screen Privacy section to show Privacy screen toggle
The privacy screen toggle is visible only when there's a monitor that
supports it and it's modifiable only when there's not hardware lock.

Fixes: #909
2022-07-28 22:47:14 +00:00
Marco Trevisan (Treviño)
2f6d086c6f display-config: Parse privacy screen property and expose it per monitor
Each monitor can have a privacy screen property, so read it and expose
so that it can be at upper levels.
2022-07-28 22:47:14 +00:00
Marco Trevisan (Treviño)
b327301951 Panels: Rename lock panel into screen panel
This was designed some time ago [1] but never actually implemented, so:
 - Change the screen lock section to "screen"
 - Move the screen section up, so it's next to the other types of
   hardware
 - Added a Screen lock section in there

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/909#note_737827
2022-07-28 22:47:14 +00:00
Felipe Borges
ec2c3d477d sharing: Use AdwEntryRow for remote-desktop setup
See #1930
2022-07-26 20:11:56 +00:00
Mpho Jele
272b73795d user-accounts: Make back button switch to current user or panels list
When the window AdwLeaflet is folded the back button should either
switch to the panels list if the selected user is the current user
or switch to the current user if the selected user is from the
"other users" list
2022-07-24 15:29:46 +00:00
Mpho Jele
311268c4f7 user-accounts: Show the back button when window leaflet folds
Currently the back button is only shown when viewing a user from the
"other users" list.
These changes show the back button when the window AdwLeaflet is
folded or when the selected is from the "other users" list but never
when the window is not folded and the selected user is the current
user.

Fixes: #1719
2022-07-24 15:29:46 +00:00
Lukáš Tyrychtr
cf99eb4529 user-accounts: Set a11y label for login history dialog title
This was originally https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1402
2022-07-24 09:36:51 -05:00
Georges Basile Stavracas Neto
caa9b59f41 online-accounts: Mark run_goa_helper_sync as NULL-terminated
Spotted while porting GNOME Initial Setup [1]

[1]
https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/134
2022-07-21 16:54:25 -03:00
Kate Hsuan
1e53da4720 panels: firmware-security: Reduce the length of description
The descriptions of secure boot status were made simpler to improve the
user friendly.

Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1937
Signed-off-by: Kate Hsuan <hpa@redhat.com>
2022-07-21 22:50:06 +08:00