After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744324 - Construct only property didn't take into account on custom widgets inclusions
Construct only property didn't take into account on custom widgets inclusions
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-11 12:31 UTC by Carlos Soriano
Modified: 2018-04-15 00:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Carlos Soriano 2015-02-11 12:31:06 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.
Comment 1 Matthias Clasen 2015-02-12 01:37:45 UTC
you could try

  <child type="title">
    <object class="GtkLabel">
      ...
    </object>
  </child>
Comment 2 Carlos Soriano 2015-02-12 09:48:19 UTC
(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>
Comment 3 Matthias Clasen 2018-02-10 04:55:52 UTC
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.
Comment 4 Matthias Clasen 2018-04-15 00:00:01 UTC
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