Improve dialog handling in gtk-builder-convert
Make gtk-builder-convert handle response ids in GtkFileChooserDialog correctly. (#557629)
This commit is contained in:
committed by
Matthias Clasen
parent
8066cc1555
commit
d8da8dd4ff
@ -42,10 +42,10 @@ import sys
|
||||
|
||||
from xml.dom import minidom, Node
|
||||
|
||||
WINDOWS = ['GtkWindow',
|
||||
'GtkDialog',
|
||||
DIALOGS = ['GtkDialog',
|
||||
'GtkFileChooserDialog',
|
||||
'GtkMessageDialog']
|
||||
WINDOWS = ['GtkWindow'] + DIALOGS
|
||||
|
||||
# The subprocess is only available in Python 2.4+
|
||||
try:
|
||||
@ -499,7 +499,7 @@ class GtkBuilderConverter(object):
|
||||
return
|
||||
|
||||
if (node.tagName == 'object' and
|
||||
node.getAttribute('class') == 'GtkDialog'):
|
||||
node.getAttribute('class') in DIALOGS):
|
||||
dialog = node
|
||||
break
|
||||
node = node.parentNode
|
||||
|
||||
Reference in New Issue
Block a user