GNOME Bugzilla – Bug 744324
Construct only property didn't take into account on custom widgets inclusions
Last modified: 2018-04-15 00:00:01 UTC
I have a nautilus-window.xml: <interface> <template class="NautilusWindow" parent="GtkApplicationWindow"> <property name="show-menubar">False</property> <property name="title" translatable="yes">_Files</property> <property name="icon-name">system-file-manager</property> <child type="titlebar"> <object class="NautilusToolbar" id="toolbar"> </object> </child> .... And NautilusToolbar is a custom widget that its definition is nautilus-toolbar.xml as follows: <interface> <!-- interface-requires gtk+ 3.8 --> <template class="NautilusToolbar" parent="GtkHeaderBar"> <property name="visible">True</property> <property name="show-close-button">True</property> <property name="custom-title">label_null</property> <child> .... ----------------------------- The thing is that custom-title is not working in this way. To make it working that property has to be defined in the nautilus-window.xml NautilusToolbar object as follows: <interface> <template class="NautilusWindow" parent="GtkApplicationWindow"> <property name="show-menubar">False</property> <property name="title" translatable="yes">_Files</property> <property name="icon-name">system-file-manager</property> <child type="titlebar"> <object class="NautilusToolbar" id="toolbar"> <property name="custom-title">label_null</property> </object> </child> .... ---------------------------- GtkBuilder should work with the first case, that is probably the most logical way to define the properties.
you could try <child type="title"> <object class="GtkLabel"> ... </object> </child>
(In reply to Matthias Clasen from comment #1) > you could try > > <child type="title"> > <object class="GtkLabel"> > ... > </object> > </child> Already tried that option and the same was happening: Putting it in NautilusToolbar definition doesn't work <template class="NautilusToolbar" parent="GtkHeaderBar"> <property name="visible">True</property> <property name="show-close-button">True</property> <child type="title"> <object class="GtkButton"> </object> </child> Putting it in the NAutilusDefinition definition works: <interface> <template class="NautilusWindow" parent="GtkApplicationWindow"> <property name="show-menubar">False</property> <property name="title" translatable="yes">_Files</property> <property name="icon-name">system-file-manager</property> <child type="titlebar"> <object class="NautilusToolbar" id="toolbar"> <child type="title"> <object class="GtkButton"> </object> </child> </object> </child>
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new