Make sure that --root works for toplevel widgets. (#491847, Phil Lello)

2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtk-builder-convert (GtkBuilderConverter._strip_root): 
	Make sure that --root works for toplevel widgets.
	(#491847, Phil Lello)


svn path=/trunk/; revision=19309
This commit is contained in:
Johan Dahlin 2008-01-06 02:18:38 +00:00 committed by Johan Dahlin
parent fe095eccfe
commit 284af5af69
2 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2008-01-06 Johan Dahlin <johan@gnome.org>
* gtk/gtk-builder-convert (GtkBuilderConverter._strip_root):
Make sure that --root works for toplevel widgets.
(#491847, Phil Lello)
2008-01-05 Johan Dahlin <johan@gnome.org>
* modules/other/gail/tests/Makefile.am: Include Makefile.decl,

View File

@ -597,16 +597,11 @@ class GtkBuilderConverter(object):
raise SystemExit("Could not find an object called `%s'" % (
root_name))
# If it's already a root object, don't do anything
if widget.parentNode is self._interface:
return
for child in self._interface.childNodes[:]:
if child.nodeType != Node.ELEMENT_NODE:
continue
child.parentNode.removeChild(child)
widget.parentNode.removeChild(widget)
self._interface.appendChild(widget)