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:

committed by
Johan Dahlin

parent
fa13277655
commit
de5463131e
@ -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>
|
2007-10-24 Johan Dahlin <jdahlin@async.com.br>
|
||||||
|
|
||||||
* gtk/gtkbuilder.c: (_gtk_builder_construct),
|
* gtk/gtkbuilder.c: (_gtk_builder_construct),
|
||||||
|
@ -467,6 +467,10 @@ class GtkBuilderConverter(object):
|
|||||||
def _convert_dialog_response(self, node, object_name, response):
|
def _convert_dialog_response(self, node, object_name, response):
|
||||||
# 1) Get parent dialog node
|
# 1) Get parent dialog node
|
||||||
while True:
|
while True:
|
||||||
|
# If we can't find the parent dialog, give up
|
||||||
|
if node == self._dom:
|
||||||
|
return
|
||||||
|
|
||||||
if (node.tagName == 'object' and
|
if (node.tagName == 'object' and
|
||||||
node.getAttribute('class') == 'GtkDialog'):
|
node.getAttribute('class') == 'GtkDialog'):
|
||||||
dialog = node
|
dialog = node
|
||||||
|
Reference in New Issue
Block a user