Commit graph

7369 commits

Author SHA1 Message Date
Gotam Gorabh
2906168a72 keyboard:Fix cancel button issue 2023-03-23 22:15:15 +00:00
Emilia Daria Majewska
4bfa57887b display: Removed the loop from the snapping function
In all my tests, the snapping algorithm was successful on the first pass.
2023-03-23 15:52:15 +00:00
Emilia Daria Majewska
4218aa6e4b display: Remove the monitor argument for cc_display_config_snap_output
The function tries to snap all the outputs anyway,
so might as well remove the unnecessary argument.
2023-03-23 15:52:15 +00:00
Emilia Daria Majewska
0aede82e58 display: Try snapping all the displays after a config change
This issue was originally addressed in !257 ("display snap after changes").
However it only dealt with a two-monitor setup, so the user is still
unable to rotate the middle display with three or more monitors.

This commit tries to snap the displays until all are adjacent to
another.
2023-03-23 15:52:15 +00:00
Marco Trevisan (Treviño)
7f97d9eb54 panels/mouse: Simplify binding of touchpad sensitive widgets
Instead of creating multiple and more complex GSetting bindings for the
sensitive state, just bind the sensitivity of the touchpad widgets to the
active state of the touchpad toggle switch
2023-03-22 13:49:20 +00:00
Marco Trevisan (Treviño)
087d2b8955 panels/mouse: Do not bind sensitivity to touchpad settings
If doing so, these options may be marked as sensitive by GSettingsBind,
ignoring the send-events global setting binding; and causing the widgets
to be always sensitive regardless the touchpad state.
2023-03-22 13:49:20 +00:00
velsinki
eacef5a5a2 sound: Prevent duplicate sound device entries
For unknown reasons, GVC mixer control can sometimes signal a new
device with the same id as one that was added before. This means that
in `device_added_cb`, a duplicate entry with that id is created, in my
case with a different name. However, the last one added is valid, but
that one cannot be selected because all other logic in the sound panel
assumes the first hit in `get_iter` is valid. This breaks sound input
selection then.

The fix is easy; only add a new list entry if none with that id exists.
2023-03-22 13:06:39 +00:00
Marco Trevisan (Treviño)
4b400736bc color-panel: Do not try to access to null pointer in destruction
During destruction toolbar_devices is nullified, but
gtk_widget_in_destruction() does not perform a NULL-check, and we could
crash:

==22708== Invalid read of size 1
==22708== at 0x505CC0B: gtk_widget_in_destruction (gtkwidget.c:10643)
==22708== by 0x189553: gcm_prefs_list_box_row_selected_cb (cc-color-panel.c:1708)
==22708== by 0x4A61714: g_cclosure_marshal_VOID__OBJECTv (gmarshal.c:1910)
==22708== by 0x4A5E148: _g_closure_invoke_va (gclosure.c:895)
==22708== by 0x4A784F3: g_signal_emit_valist (gsignal.c:3462)
==22708== by 0x4A78722: g_signal_emit (gsignal.c:3612)
==22708== by 0x4F5B121: gtk_list_box_remove (gtklistbox.c:2420)
==22708== by 0x4F5B222: gtk_list_box_dispose (gtklistbox.c:439)
==22708== by 0x4A63338: g_object_unref (gobject.c:3891)
==22708== by 0x4EAA994: gtk_box_dispose (gtkbox.c:230)
==22708== by 0x4A63338: g_object_unref (gobject.c:3891)
==22708== by 0x4EAA994: gtk_box_dispose (gtkbox.c:230)
==22708== Address 0xfffffffffffffeb2 is not stack'd, malloc'd or (recently) free'd

See: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2009913
2023-03-21 15:34:44 +00:00
Marco Trevisan (Treviño)
852b39cdc6 dispaly: Allow configuring all monitors and apply settings at once
When multiple monitors are available, it's not possible anymore to
configure them all and eventually apply all the changed parameters.

To make this possible again, add a back button in the apply titlebar
that is shown only when we are in the display-settings child.

See: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2012043
2023-03-21 15:33:16 +00:00
Marco Trevisan (Treviño)
c20ed729f7 mouse: Prevent infinite loop on settings changes
We may get an infinite loop on mouse panel startup, in fact the scroll
method changed event emits a gsettings change that also leads to a
notify::use-default emission that again tries to writes to settings,
leading to another change: infinitely.

Closes: #2405
2023-03-17 16:42:50 +00:00
Markus Göllnitz
98f7a40d24 multiple panels: show start title buttons in header bar
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.

Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-16 13:18:37 +00:00
Jakub Steiner
a3c16f103b sound: Make bass audible on low quality hardware
- add mid range frequencies to make the bassy sound more audible on sub par hardware,
  because that's 85% of the hardware gnome runs on, sadly.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2268
2023-03-16 11:53:29 +00:00
Automeris naranja
65734339c2 wacom: Rename "Test Your Settings" button to "Test Settings"
The same change was made in the Mouse & Touchpad panel:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1486
2023-03-15 13:37:44 +00:00
Mohammed Sadiq
f0f1ee168f common: hostname-entry: Update hostname only after apply is clicked
Since the entry already shows an apply button, update hostname only
after the apply button is clicked.  It's not required to update
hostname after every character change.
2023-03-15 13:37:15 +00:00
Automeris naranja
e17efcca82 usage: Fix confirmation dialog when clearing history
When clearing file history, a dialog appears saying that all files
will be permanently deleted. However, this isn't true. Only the recent
files list will be cleared and the files will remain intact.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2366
2023-03-15 13:25:20 +00:00
Jake Dane
1ccade9481 notifications: Replace "Applications" with "Apps"
This is part of an initiative to use "app" instead of "applications",
see: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123

!1637 missed replacing one occurrence of "Applications" on the
notifications panel. This does that last replacement with "Apps".
2023-03-14 19:49:54 +00:00
Bastien Nocera
5755f0eec7 power: Label the main "battery" as UPS if that's what it is
Change the label from "Battery" to "UPS" if the upower DisplayDevice is
a UPS. This avoids confusions like:
https://www.reddit.com/r/gnome/comments/11aws0q/battery_indicator_for_desktop_computer_seems/
https://askubuntu.com/questions/1344733/why-does-ubuntu-show-battery-and-charge-info-when-it-is-a-desktop-with-no-batter

"
Why does GNOME display a battery percentage ("Fully Charged") when I'm
running a desktop computer without any battery?
"
followed by:
"
Ha! I figured it out[...]. I have my desktop plugged into a UPS
"
2023-03-14 19:19:51 +00:00
Alessandro Bono
19c5d9d4fc thunderbolt: Decouple active and state properties usage
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
2023-03-03 18:16:57 +00:00
Alessandro Bono
6c125accc3 thunderbold: Don't cast CcBoltPanel when cancelled
Otherwise we get a crash.
2023-03-03 18:16:57 +00:00
Alessandro Bono
9d2844e02f sharing: Set active property instead of state
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
2023-03-03 18:16:57 +00:00
Alessandro Bono
4cacdb3544 sharing: Connect to the active property instead of state
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
2023-03-03 18:16:57 +00:00
Alessandro Bono
b892e6ff15 sharing: Bind to the active property instead of state
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
2023-03-03 18:16:57 +00:00
Alessandro Bono
e7458ff1b4 sharing: Set active property instead of state
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
2023-03-03 18:16:57 +00:00
Alessandro Bono
7c356d8c7d datetime: Decouple active and state properties usage
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2330
2023-03-03 18:16:57 +00:00
Alessandro Bono
9af0a2d15e bluetooth: Decouple active and state properties usage
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442
2023-03-03 18:16:57 +00:00
Alessandro Bono
f275c3a53c bluetooth: Properly fetch changing state
Since commit 75c3e11708 user_data does not
contain the state anymore. Assume that the active value is what the state
is going to be.
2023-03-03 18:16:57 +00:00
Alessandro Bono
b236b72fb2 bluetooth: Return TRUE for state-set callback
From the documentation[1]: "The signal handler should return TRUE to
prevent the default handler from running."

[1] https://docs.gtk.org/gtk4/signal.Switch.state-set.html
2023-03-03 18:16:57 +00:00
Jonas Ådahl
b612179cdb panels/remote-desktop: Popuplate address label
This means the address will displayed as intended, and clicking the copy
icon will copy it again.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=2173136
2023-03-03 13:57:09 +01:00
Automeris naranja
ce212d9d06 firmware-security-dialog: Increase the dialog height
This change increases the dialog height to avoid
showing an unnecessary scrollbar.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2369
2023-03-02 15:53:07 +00:00
Felipe Borges
0e7ad06da3 mouse: Rename "Pointer Assistance" to "Mouse Acceleration"
This is the popular term  for this feature and we would be confusing
users by inserting new terminology.
2023-03-02 15:51:22 +00:00
Mohammed Sadiq
e155979dc2 keyboard: shortcut-dialog: Set custom title for subview
So that we can have different titles for main view and subview,
and so the title won't be broken when swiping back from subview.
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
287ab748a1 keyboard: shortcut-dialog: Pack content in a single leaflet
Don't pack headerbar and content separately, keep them together.
So that navigating back shall work right.
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
f86fc38ef4 keyboard: shortcut-dialog: Remove separator between headerbar and search
Since we now uses GtkSearchBar, we no longer requires a separator in
between as GtkSearchBar has one already.
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
d978d51c96 keyboard: shortcut-dialog: Don't update search results in sub-view
Since the main view is not visible, there is no point in updating
search results when we are in a sub-view.  This will happen as we
always listen to keyboard events for the whole window - regardless
of whether the search entry has focus or not.
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
73c76a7e85 keyboard: shortcut-dialog: Pack search inside a SearchBar
So that they are shown distinct from the rest of the content and
have proper margins

Fixes #2202
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
587a1b05ae keyboard: shortcut-dialog: Add margins around search entry
So that they won't get too close to the window borders.  Also adjust
width-chars so that the window width can reach smaller sizes
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
76707bb701 keyboard: shortcut-dialog: Align status pages to the center of the page
Fixes #2202
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
40cf37590f keyboard: shortcut-dialog: Remove sub-view search code
We have had removed support for searching in sub-sections.
Remove related code which is no longer used
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
80ff36d18c keyboard: shortcut-dialog: Don't update search visibility in custom shortcuts
Now we never show search entry in subpages, so don't hide search entry
when switching to subviews.  Otherwise, the search entry will be hidden
when the user switches back to the main view.
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
c0be13c7d6 keyboard: shortcut-dialog: Fix search on swipe navigations
We were updating the state when the back button is pressed, not when
the pages were changed, and so the dialog state was broken if the
user went back by swipe (or means other than clicking the back button).

Fix it by handling updating state when the visible view changes.
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
6a84e1eb83 keyboard: shortcut-dialog: Use AdwLeaflet for headerbar
So that users can swipe on headerbar to go back

Fixes #2202
2023-03-01 16:12:19 +00:00
Mohammed Sadiq
db82543a62 keyboard: shortcut-dialog: Focus search entry when the window is presented 2023-03-01 16:12:19 +00:00
Markus Göllnitz
0754e1ef13 mouse: add title to header bar
The header bar of the mouse panel can display a title, when
the stack only contains the mouse and the touchscreen subpanel.

This header bar, however, does not inherit the title widget from
the common CcPanel, as it contains the view switcher.

It is needed to add the correct title as a property to the switcher
to let it display this title, if no switcher is.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-01 14:34:09 +00:00
Markus Göllnitz
8b4fbef678 mouse panel: add navigate back button
The mouse panel currently does not show a button to navigate back,
but should do so if the window is folded.

fixes #2363

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-01 13:58:19 +00:00
Felipe Borges
4e10ccb9ea mouse: Toggle visibility of Touchpad page based on device detection
Fixes #2355
2023-02-28 14:17:37 +00:00
Felipe Borges
5b4c9e16a8 mouse: Don't set arbitrary dimensions for mouse test window
As long as the picture's scrolled window can be larger than 440,
everything else should fit within the window's default size.

Fixes #2356
2023-02-28 14:16:49 +00:00
Bastien Nocera
2417cd5e6e wifi: Handle open networks in QR code
Fix empty dialogue when the current Wi-Fi network is an open network.

Closes: #2372
2023-02-27 20:00:15 +00:00
Hendrik Müller
0a5f0d16e3 wifi: Allow QR code dialog to be closed by pressing ESC
Being able to close the QR code dialog by pressing the ESC
key would be a handy feature.

By switching from GtkWindow to GtkDialog, the QR code
dialog is closed when pressing ESC.

Closes #2357
2023-02-25 13:00:15 +00:00
Lukáš Tyrychtr
1bfa4be664 info-overview: Actually don't show the firmware version row when in a VM
The previous logic was hiding the row when we were not under virtualization.
Fixes #2351
2023-02-21 10:04:27 +00:00
Nelson Benítez León
0cb4706b88 user-accounts: restore default cursor in CcCropArea dialog
The CcCropArea dialog fails to update cursor to 'default'
one when leaving the CcCropArea into the GtkHeaderBar.

Fix that by setting 'default' cursor in the "leave" event
of CcCropArea.

Closes #2359
2023-02-20 10:56:38 +00:00