Allow adding any kind of widget to HdyPreferencesPage
Currently a widget of type other than HdyPreferencesGroup
is not allowed to be added to an HdyPreferencesPage
. This is inconsistent with what GTK does with GtkListBox
, GtkFlowBox
and so on. Say for example, If A GtkLabel
is added to a GtkListBox
the GtkLabel
is wrapped into a GtkListBoxRow
and added to the `GtkListBox
Here is a minimal example to trigger the warning:
window.ui
file:
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow" id="window">
<property name="visible">1</property>
<property name="width-request">300</property>
<property name="height-request">300</property>
<child>
<object class="HdyPreferencesPage">
<property name="visible">1</property>
<child>
<object class="GtkListBox">
<property name="visible">1</property>
<property name="selection-mode">none</property>
<style>
<class name="frame"/>
</style>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label">Test label</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
Testing: LD_PRELOAD=libhandy-1.so gtk-builder-tool preview test.ui
This triggers a warning, but if HdyPreferencesPage
is changed to something else, say a GtkBox
, the preview is shown without warning (ie, GtkListBox
shows the GtkLabel
)