Give up instead of raising an error if we can't find the parent dialog

2007-10-24  Johan Dahlin  <jdahlin@async.com.br>

	* gtk/gtk-builder-convert 
	(GtkBuilderConverter._convert_dialog_response): 
	Give up instead of raising an error if we can't find
	the parent dialog when converting response ids.
	(#479463, Priyank)


svn path=/trunk/; revision=18945
This commit is contained in:
Johan Dahlin 2007-10-24 11:52:56 +00:00 committed by Johan Dahlin
parent fa13277655
commit de5463131e
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2007-10-24 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtk-builder-convert
(GtkBuilderConverter._convert_dialog_response):
Give up instead of raising an error if we can't find
the parent dialog when converting response ids.
(#479463, Priyank)
2007-10-24 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtkbuilder.c: (_gtk_builder_construct),

View File

@ -467,6 +467,10 @@ class GtkBuilderConverter(object):
def _convert_dialog_response(self, node, object_name, response):
# 1) Get parent dialog node
while True:
# If we can't find the parent dialog, give up
if node == self._dom:
return
if (node.tagName == 'object' and
node.getAttribute('class') == 'GtkDialog'):
dialog = node