Improve dialog handling in gtk-builder-convert

Make gtk-builder-convert handle response ids in GtkFileChooserDialog
correctly. (#557629)
This commit is contained in:
MOROHOSHI Akihiko
2009-04-11 01:34:22 -04:00
committed by Matthias Clasen
parent 8066cc1555
commit d8da8dd4ff

View File

@ -42,10 +42,10 @@ import sys
from xml.dom import minidom, Node from xml.dom import minidom, Node
WINDOWS = ['GtkWindow', DIALOGS = ['GtkDialog',
'GtkDialog',
'GtkFileChooserDialog', 'GtkFileChooserDialog',
'GtkMessageDialog'] 'GtkMessageDialog']
WINDOWS = ['GtkWindow'] + DIALOGS
# The subprocess is only available in Python 2.4+ # The subprocess is only available in Python 2.4+
try: try:
@ -499,7 +499,7 @@ class GtkBuilderConverter(object):
return return
if (node.tagName == 'object' and if (node.tagName == 'object' and
node.getAttribute('class') == 'GtkDialog'): node.getAttribute('class') in DIALOGS):
dialog = node dialog = node
break break
node = node.parentNode node = node.parentNode