GNOME Bugzilla – Bug 386983
Gazpacho crashes trying to open a .glade file
Last modified: 2008-06-06 10:56:25 UTC
Steps to reproduce: 1. Open the attached file. Stack trace: File /usr/lib/python2.4/site-packages/gazpacho/app/app.py, line 1029, in _open_cb self.open_project(filename) File /usr/lib/python2.4/site-packages/gazpacho/app/app.py, line 713, in open_project project.load(path) File /usr/lib/python2.4/site-packages/gazpacho/project.py, line 213, in load loader = GazpachoObjectBuilder(filename=filename, app=self._app) File /usr/lib/python2.4/site-packages/gazpacho/loader/gazpacholoader.py, line 64, in __init__ ObjectBuilder.__init__(self, **kwargs) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 520, in __init__ self._parser.parse_file(filename) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 202, in parse_file self._parser.ParseFile(fp) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 246, in _handle_endelement func(item) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 326, in _end_widget return self._end__common(attrs) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 318, in _end__common self._builder._build_phase2(obj) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 898, in _build_phase2 self._pack_child(adapter, gobj, child) File /usr/lib/python2.4/site-packages/gazpacho/loader/loader.py, line 938, in _pack_child child.type) File /usr/lib/python2.4/site-packages/gazpacho/loader/custom.py, line 601, in add self._set_child_properties(notebook, child, properties) File /usr/lib/python2.4/site-packages/gazpacho/loader/custom.py, line 448, in _set_child_properties container.child_set_property(child, name, value) TypeError: first argument must be a child Other information: I'll attach the .glade file once I'm off of this hand-holding screen.
Created attachment 78534 [details] The .glade file that crashes gazpacho
Created attachment 78620 [details] Reduced test case (.glade file) Reduced test case (I hope I didn't cut a way too much but I believe it's ok). The problem seems to be the notebook children. I'm not sure if the glade-file is broken or if it is Gazpacho. Someone with more knowledge about the notebook might want to take a look at this.
This bug is caused by the fact that child properties on a notebook's child are provided on the tab label for the body widget, ie tab_fill and tab_expand. Instead of trying to set a child property on the tab label widget which is not considered a child (internal child I guess). The NotebookAdapter already works out if the "child" is a tab label, patch added to actually use that information.
Created attachment 112250 [details] [review] Fix to apply child preoperties of a tab label to the body
*** Bug 472620 has been marked as a duplicate of this bug. ***