Commit graph

6204 commits

Author SHA1 Message Date
Robert Ancell
dad5cc58b6 applications: Hide buttons that launch gnome-software if it is not available
Fixes #417
2020-09-25 03:39:57 +00:00
Dmitry Sharshakov
b31520ae8b Disable the button for hidded Wi-Fi when Wi-Fi is turned off 2020-09-25 03:35:56 +00:00
Ian Douglas Scott
57a0f909d4 keyboard: fix gtk_widget_get_can_default assertion error
Occured when showing the "Replace" button.
2020-09-25 03:24:59 +00:00
Ian Douglas Scott
099426714c keyboard: Fix behavior of "Replace" when adding custom shortcut
In the shortcut editor, the "Replace" button is shown instead of "Set"
or "Add" when there is a collision. But this executes the same code as
"Set", so when adding a shortcut, it doesn't actually work.
2020-09-25 03:17:29 +00:00
Takao Fujiwara
5c0f6e1cde region: Search default input sources
The default input sources are not included in layout_rows_by_id or
engine_rows_by_id but in default_input_source_row of GtkListBoxRow.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1131
2020-09-25 03:09:06 +00:00
Jonathan Kang
918838f567 network: complete SAE support
Added WirelessSecuritySAE class to fully implement SAE support.
2020-09-25 02:06:52 +00:00
Bastien Nocera
12e2475e72 power: Remove WiMax handling
It's been deprecated and unsupported by NetworkManager since version 1.2
(current is 1.26).
2020-09-25 02:04:00 +00:00
Brandon Nielsen
9364deba3e Code cleanup as per HACKING. 2020-09-25 01:59:57 +00:00
Brandon Nielsen
68dca0e748 Consumers clean up the PPD list, not the dialog itself. 2020-09-25 01:59:57 +00:00
Brandon Nielsen
bee87f1b0a Spaces over tabs. 2020-09-25 01:59:57 +00:00
Brandon Nielsen
26e8f11566 component: PpPPDSelectionDialog
G_IS_OBJECT checks fail when calling g_signal_connect_object because
PpPPDSelectionDialog is a struct, not a type descending from G_OBJECT.

This makes the changes required for PpPPDSelectionDialog to be a
GObject, and defines PpPPDSelectionDialog as a GObject. It also updates
consumers of PpPPDSelectionDialog to destroy created PpPPDSelectionDialogs as GObjects.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1126
2020-09-25 01:59:57 +00:00
Arne
9225cd9364 sound: fix subwoofer slider 2020-09-25 01:53:44 +00:00
Robert Ancell
68042c95c1 printers: Use a shared PpCups object 2020-09-22 21:23:05 +00:00
Robert Ancell
f8204635ce printers: Fix location where GTask is unreffed 2020-09-22 21:23:05 +00:00
Robert Ancell
b25db4f601 printers: Don't pass PpJob references around
An internal GTask will hold a reference to it for the duration of the async calls.
2020-09-22 21:23:05 +00:00
Robert Ancell
f42d7cca9a printers: Don't pass PpNewPrinter references around
An internal GTask will hold a reference to it for the duration of the async calls.
2020-09-22 21:23:05 +00:00
Robert Ancell
9d0815bb90 printers: Don't pass PpCups references around
An internal GTask will hold a reference to it for the duration of the async calls.
2020-09-22 21:23:05 +00:00
Robert Ancell
519c390b04 printers: Don't pass PpHost references around
An internal GTask will hold a reference to it for the duration of the async calls.

Correctly unref these objects in finalize.
2020-09-22 21:23:05 +00:00
Robert Ancell
7ebf0f22aa printers: Don't pass PpSamba references around
An internal GTask will hold a reference to it for the duration of the async calls.
2020-09-22 21:23:05 +00:00
Robert Ancell
703d833e2f printers: Don't pass PpPrinter references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:05 +00:00
Robert Ancell
e6a05e535e printers: Fix PpPrinter reference leaks
They were not unreferenced in the callback.
2020-09-22 21:23:05 +00:00
Robert Ancell
7c1f84b4d3 printers: Don't pass PpMaintenanceCommand references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:05 +00:00
Robert Ancell
5f4599d649 printers: Don't pass GFile references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:04 +00:00
Robert Ancell
f3bf0080d7 printers: Don't pass GDBusConnection references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:04 +00:00
Robert Ancell
b2c5056031 printers: Use g_autoptr 2020-09-22 21:23:04 +00:00
Robert Ancell
ec23d22ada printers: Use g_clear_object 2020-09-22 21:23:04 +00:00
Gunnar Hjalmarsson
5aee280a29 common: Display locale @modifiers properly
Fixes GNOME/gnome-desktop#50
2020-09-21 13:13:10 +00:00
Bastien Nocera
eb79846c53 network: Fix missing prototype error
gnome-control-center/panels/network/net-device-wifi.c:1179:1: warning: no previous prototype for ‘nm_client_on_permission_change’ [-Wmissing-prototypes]
 1179 | nm_client_on_permission_change (NetDeviceWifi *self) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-09-16 10:11:48 -03:00
Ian Douglas Scott
ddfd582b72 region: Move preview of format to a widget 2020-09-15 22:19:55 +00:00
Ian Douglas Scott
0dce812e18 region: "move up" and "move down" buttons in input row menu
Implementation borrowed from cc-search-panel-row.c
2020-09-15 21:28:25 +00:00
Ian Douglas Scott
561a6b93dc region: Use popover for input source rows 2020-09-15 21:28:25 +00:00
Hui Wang
9b81e0ee45 sound: update the profile list after getting the signal from gvc
In the ubuntu 20.04, we found a regression on HDMI audio. We plug a
HDMI/DP monitor, the output device is the speaker in the output device
combo box, then we select the HDMI from the combo box, the output
device is switched to HDMI audio successfully, but the configuration
box is empty. This will not happen in the ubuntu 18.04, the profile
will show hdmi-stereo in this situation. So I think this is a
regression.

When problem happens, I could see the errors from log:
Gvc:    DEBUG: Matching profile for 'output:analog-stereo' is '(null)'
Gvc:    DEBUG: Matching profile for 'output:analog-stereo' is '(null)'
Gvc:    DEBUG: Matching profile for 'output:analog-stereo' is '(null)'

Through debugging, I found the cc_profile_combo_box_set_device() is
called too early. In the ubuntu 18.04, this function is called after
pulseaudio changes the active_profile, but in the ubuntu 20.04, it is
called ahead of pulseaudio changes the active_profile.

To fix it, add a signal callback function, after pulseaudio changes
the active_profile, this callback function will be called, then call
cc_profile_combo_box_set_device().

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2020-09-16 09:10:02 +12:00
Mohammed Sadiq
55ea4cabda datetime: Implement the new time-date editor dialog design 2020-09-15 03:07:41 +00:00
Ian Douglas Scott
c3c5d724bd region: move input source ListBox code into it's own class 2020-09-14 22:07:36 +00:00
Felipe Borges
04211dd548 power: Hide "Suspend & Power Button" section when empty
Fixes #1075
2020-09-14 21:39:34 +00:00
Ian Douglas Scott
dc02c803c2 keyboard: Move row code to CcKeyboardShortcutRow
This adds a widget called `CcKeyboardShortcutRow`, sub-classing
`GtkListBoxRow`, to handle a shortcut row. This makes the implementation
a bit tidier, rather than handling it all in `CcKeyboardPanel`, and
allows the widgets that compose the row to be laid out in xml.

This is a prerequisite for moving the shortcuts to a new dialog.
2020-09-14 17:19:33 +00:00
Ian Douglas Scott
67cb508802 keyboard: Refactoring of CcKeyboardItem handling of multiple combos
This commit includes all the changes that seem to be necessary for
CcKeyboardItem to be used for dealing with multiple keybindings, without
(yet) changing the user interface to expose this.

The `primary_combo` and `binding` fields of `CcKeyboardItem` are
removed, in favor of the existing `key_combos`. No combination is
"primary", since all of them can now be seen and changed equally.

We treat `CcKeyboardItem.key_combos` as a set, that a combo can be added
to or removed from. Though it continues to be represented as a `GList`,
instead of a `GHashTable`, to preserve ordering.

A lot of the keyboard panel code relied on the assumption that only one
combo can be set for each setting, so this required a variety of
miscellaneous changes.
2020-09-14 17:19:33 +00:00
Carlos Garnacho
6782bc07db display: Hook to PanelOrientationManaged for accelerometer checks
This property gives means for Mutter to determine who is in charge of
display rotation for the built-in panel (us or Mutter). The UI must
reflect this change.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1018
2020-09-05 08:03:44 +00:00
Carlos Garnacho
c89f5ca526 display: Add panel-orientation-managed signal to CcDisplayConfig
So we can track changes on this property.
2020-09-05 08:03:44 +00:00
Carlos Garnacho
b91a83c402 display: Add API to get the PanelOrientationManaged DisplayConfig property
This property indicates whether the builtin panel orientation is managed by
an accelerometer, thus shouldn't be managed by the display panel.
2020-09-05 08:03:44 +00:00
Carlos Garnacho
1ae3ebcfb2 display: Use a proxy for org.gnome.Mutter.DisplayConfig
It will be more convenient than a direct DBus call in future commits.
2020-09-05 08:03:44 +00:00
Carlos Garnacho
297906685e wacom: Group pad/stylus devices together with the group name
This will cover the regular case of pads attached to a tablet, but
also the EKR case where the pad is a separate device logically
grouped with a tablet.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/415
2020-09-04 21:46:19 +00:00
Carlos Garnacho
14da368600 common: Add GsdDevice API to tell whether 2 devices are grouped
This will be used for pad devices, better than the current way of
comparing name strings coming from libwacom.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/415
2020-09-04 21:46:19 +00:00
Carlos Garnacho
eb14c5a64f wacom: Cater for multiple pads in the CcWacomPage
We don't need to track them much specifically, as we delegate pad
button mapping UI on GNOME Shell. It is however possible to have
tablets with 0 to N pads (upper bound within sanity = 2), so we
must at least reflect that in the "Map Buttons..." button visibility.

This distinction is most important for the combination of EKR plus
Cintiq 27QHD, as this is a pad-less tablet, for which we wouldn't
usually show the "Map buttons..." action.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/415
2020-09-04 21:46:19 +00:00
Carlos Garnacho
e50f27a96b wacom: Let CcWacomPage track pad devices
This puts stylus/pad tracking on 2 separate levels. The CcWacomPanel
will look for styli, and treat them as "device leaders", adding a
CcWacomPage for them.

The CcWacomPage will then track the related pad, and update the
"Map buttons..." action visibility according to it.

This simplifies tablet page creation (eg. have it completed in one
step), and decouples the device grouping logic from CcWacomPanel,
which will be useful in future commits.
2020-09-04 21:46:19 +00:00
Sebastien Bacher
57b01cf695 user-account: don't segfault trying to get the user initials
it's possible that act_user_get_real_name returns null, handle that case
fixes bug #959
2020-08-19 10:26:08 +12:00
Jamison Lofthouse
9efe9eefd3 Monitor NMClient permissions for change 2020-08-19 09:04:35 +12:00
Benjamin Berg
dd2ecbfa9d color: Fix order of arguments to gcm_prefs_device_changed_cb
Commit f1893b8e8 (color: Connect signals with g_signal_connect_object
in swapped form) changed the connect call to use G_CONNECT_SWAPPED, but
it did not change the order of the arguments for the
gcm_prefs_device_changed_cb function.

Fixes: #1082
2020-08-18 21:00:36 +00:00
Bin Li
f66e22df57 details-page.ui: Fixed rows of text collide, increased child's top_attach
after auto_connect_check.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/933
2020-08-18 15:06:40 +12:00
Ian Douglas Scott
3893a1da77 power: Refactor brightness scale code into a CcBrightnessScale class
This reduces some redundancy between the screen brightness and keyboard
brightness code.

Such refactoring is a prerequisite for including a keyboard backlight
control in the Keyboard panel, as has been [proposed][1]. But hopefully
this makes the code a bit neater and more managable even without that.

[1]: https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/keyboard/Keyboard-with-dialogs.png
2020-08-18 03:01:02 +00:00