[Glade-users] glade.py:128: GtkWarning: gtk_button_box_set_child_secondary: assertion `child->parent == GTK_WIDGET (widget)' failed

Gerald Britton gerald.britton at gmail.com
Thu May 14 17:15:23 EDT 2009


I'm getting this on a file I converted from libglade to gtk.Buidler:

glade.py:128: GtkWarning: gtk_button_box_set_child_secondary:
assertion `child->parent == GTK_WIDGET (widget)' failed

>From this session, you can see that libglade works and builder fails.
I used gtk-builder-convert to convert the file to Gtk.Builder format

$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> from gtk import glade
>>> a = gtk.Builder()
>>> b = glade.XML('/usr/share/gramps/glade/rule.glade')
>>> a.add_from_file('/home/jerryb1/gramps32/src/glade/rule.glade')
__main__:1: GtkWarning: gtk_button_box_set_child_secondary: assertion
`child->parent == GTK_WIDGET (widget)' failed
1L

In glade-3, the only buttons that I can find for this file that have a
"Secondary" property (in the glade-3 session) are help buttons.  The
relevant sections are:

libglade format:

	    <widget class="GtkButton" id="help">
	      <property name="visible">True</property>
	      <property name="can_default">True</property>
	      <property name="can_focus">True</property>
	      <property name="label">gtk-help</property>
	      <property name="use_stock">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <property name="response_id">-11</property>
	      <signal name="clicked" handler="on_help_rule_clicked"
last_modification_time="Fri, 25 Mar 2005 02:22:53 GMT"/>
	    </widget>
	  </child>

Gtk.Builder format:

              <object class="GtkButton" id="help">
                <property name="label">gtk-help</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="can_default">True</property>
                <property name="receives_default">False</property>
                <property name="use_stock">True</property>
                <signal name="clicked" handler="on_help_rule_clicked"/>
              </object>

-- 
Gerald Britton


More information about the Glade-users mailing list