Remove the gnome_rr_* bindings and substitute them with the respective
calls from the CcDisplayMonitor. This way we get the same monitor names
as the display panel.
Closes#1821
When closing the lid on a laptop, the number of active monitors drops to
zero. However, `monitor_labeler_show()` always assumes at least one
monitor is active, as it unconditionally closes the `GVariantBuilder`.
This causes a crash when there is no monitor added to the
`GVariantBuilder`, however, as no value was added to it.
Instead, only close the `GVariantBuilder` when we're actually going to
use it and know a value was added.
Commit ca9228bb fixed a similar crash for when there are no outputs at
all. But in this case, there is still an output, it is just not active,
only with the active UI number as 0.
Fixes#3058
Require the use of <child type="subpage"> for when an AdwNavigationPage
is expected to be added to CcPanel.navigation.
This way we can avoid programming errors when a child widget is wrongly
packed in the navigation view.
See also https://gitlab.gnome.org/GNOME/gnome-control-center/-/wikis/shell/CcPanel#child-packing
Co-authored-by: Matthijs Velsink <mvelsink@gnome.org>
Actions can be set in .ui files, but not callback actions. That's done
in the .c file anyways, but it was also put in the .ui file.
That used to be ignored, but since gtk!7121 that will generate a
warning.
So, remove that line.
Closes#3050
According to [1], the string "This could be the result of
the graphics driver being used, or the desktop being used
remotely" should end with a period. This wasn't addressed
in [2], so add the period to fix this issue.
[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2020
[2] 909f068672
Night light can be unavailable in three cases:
- Device being used remotely
- Unsupported graphics driver
- Using a virtual machine
In all of these cases, a GtkInfoBar is shown. However, GtkInfoBar is
deprecated. AdwBanner is the replacement, but it's meant for short
text and the text explaining the three cases above is quite long for
AdwBanner. AdwStatusPage can be used with longer text, so use it.
For a managed GtkShortcutController, changing its propagation phase
away from `GTK_PHASE_BUBBLE` currently results in a lingering reference
due to a bug in GTK (gtk#6246). This means the Escape key shortcut
remains active even after leaving the Display panel, resulting in a
crash when pressing Escape in any panel after leaving the Display panel.
This is now fixed in GTK (gtk!7115), but there seems to be no reason for
changing the propagation phase at all anyways. Since the callback
returns `GDK_EVENT_PROPAGATE` when it does not activate, the event
should still make it to other handlers.
So, to speed up the fix for gnome-control-center, we remove the
propagation phase changes althogether. There is also no need to let the
shortcut have global scope, managed is enough.
Closes#2768
Show the full VRR (Variable Refresh Rate) range of a monitor in the
refresh rate expander row when a variable refresh rate mode is
selected and the minimum refresh rate of the monitor is known.
Using `g_clear_handle_id()` in combination with `g_source_remove()` can
save a lot of boiler plate code.
This removes about 110 lines of code for free.
When switching from Mirror mode to Join mode
and opening a monitor leaflet child by clicking
its row, clicking Cancel on the title bar would
get the UI into an invalid state.
Closes#2513.
In case an inapplicable display configuration
is attempted, and the issue is then resolved,
the warning window subtitle remains displayed
even under the "Apply Changes?" title.
Closes#2512.
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'
Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'