mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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:
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>
|
||||
|
||||
* gtk/gtkbuilder.c: (_gtk_builder_construct),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user