Objects referred to in templates aren't created
Steps to reproduce
- Create a GtkTemplate UI file that uses an object in a property, e.g.
<interface>
<template class='TestScale' parent='GtkScale'>
<property name='adjustment'>adjustment</property>
</template>
<object class='GtkAdjustment' id='adjustment'>
<property name='upper'>1.0</property>
</object>
</interface>
- Load the template in your class
Current behavior
The templated object appears, but the object referred to in the property doesn't seem to have been loaded. In the above example the scale has the default adjustment assigned (i.e. upper is 0.0). Can be seen by the slider not being movable and/or using the Gtk+ Inspector to view the adjustment properties.
Expected outcome
Both the defined scale and adjustment should be loaded.
Version information
Using GTK+ 3.24.1-1ubuntu2 on Ubuntu 18.10.
Putting the Scale inside a box makes this work, which suggests to me that GTK+ is not loading objects referred to in template tags, but it is from object tags.
Test cases:
Edited by Daniel Boles