]> Pileus Git - ~andy/gtk/commitdiff
Give up instead of raising an error if we can't find the parent dialog
authorJohan Dahlin <jdahlin@async.com.br>
Wed, 24 Oct 2007 11:52:56 +0000 (11:52 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Wed, 24 Oct 2007 11:52:56 +0000 (11:52 +0000)
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

ChangeLog
gtk/gtk-builder-convert

index d73a15a7473b8c7236d02fd7b96532611ae31f01..c2303e69a6cb36602b02d53c2303329104c45fc1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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),
index 91bf07dd27c0192be0378bfbb862aaded6831d21..d62fc6b4abd4c6d31fca2bc6fd707a9597c6197c 100755 (executable)
@@ -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