Commit graph

6293 commits

Author SHA1 Message Date
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
Adrien Plazas
fd60c313df Stop using HANDY_USE_UNSTABLE_API
It isn't needed anymore since libhandy 0.90.0.
2020-08-18 02:51:04 +00:00
Lionir Deadman
fc3de80fc7 Add back "Universal Access" keyword to allow for old users to still find their way to it.
This was mentioned here : https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/795#note_872863
2020-08-11 22:25:58 +00:00
Mohammed Sadiq
c2b0f8cb1d datetime: Fix activating time and timezone rows
These rows seems not activatable by default and thus not able to edit those values
2020-08-10 13:06:30 +00:00
jeongsu816
015fbf8f4c applications: ensure private types used by the template
on some systems, private types of settings app are not resolved.

    Error building template class 'CcApplicationsPanel' for
    an instance of type 'CcApplicationsPanel': 
    Invalid object type 'CcToggleRow'

to fix this issue, ensure private types used by the template
2020-08-07 03:44:49 +00:00
Robert Ancell
f1d892f46b network: Fix logic in showing IP6 route metric.
The logic was inverted and ensured the value was always <= 0.
2020-08-07 03:40:01 +00:00
Robert Ancell
3b9954ab37 online-accounts: Use panel cancellable for GOA operations 2020-08-07 02:36:16 +00:00
Ian Douglas Scott
d6ef1036ac region: update HdyLeaflet usage in CcFormatChooser
This resulted in a crash when trying to open the dialog. It seems this
was changed in libhandy 1.

Mentioned in https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/785#note_878171
2020-08-07 02:30:55 +00:00
Felipe Borges
6db6d8a402 user-accounts: Show "Take a picture" button only when cam is available
We already had the machanism to show/hide the button based on the number
of camera devices detected. We were just not checking for that at
startup.

Fixes #1087
2020-08-07 00:14:33 +00:00
Mohammed Sadiq
cc7662e24b wifi: Add HotSpot QR code support
When wifi hotspots are created generate a QR code
so that supported devices can connect to the hotspot
by simply scanning the QR code image
2020-08-05 14:25:51 +05:30
Adrien Plazas
f2f188974d Adapt to HdyActionRow changes
Its title property got dropped as it was coliding with the one it
inherits from HdyPreferencesRow, so use that one instead.

See https://gitlab.gnome.org/GNOME/libhandy/-/issues/258
2020-07-30 12:07:05 +00:00
Ian Douglas Scott
21d5e6c6e0 keyboard: make Alternate Character Key HdyActionRow activatable
libhandy made this not activatable by default, breaking this.

ef6707f6cc
2020-07-29 02:04:38 +00:00