You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.1 KiB
57 lines
2.1 KiB
4 years ago
|
https://trac.macports.org/export/50710/trunk/dports/x11/gtk2/files/patch-gtk-builder-convert.diff
|
||
|
--- a/gtk/gtk-builder-convert 2009-04-27 14:02:41.000000000 +0300
|
||
|
+++ b/gtk/gtk-builder-convert 2009-04-27 13:58:26.000000000 +0300
|
||
|
@@ -258,7 +258,7 @@
|
||
|
for node in objects:
|
||
|
self._convert(node.getAttribute("class"), node)
|
||
|
if self._get_object(node.getAttribute('id')) is not None:
|
||
|
- print "WARNING: duplicate id \"" + node.getAttribute('id') + "\""
|
||
|
+ print("WARNING: duplicate id \"" + node.getAttribute('id') + "\"")
|
||
|
self.objects[node.getAttribute('id')] = node
|
||
|
|
||
|
# Convert Gazpachos UI tag
|
||
|
@@ -441,8 +441,8 @@
|
||
|
if signal_name in ['activate', 'toggled']:
|
||
|
action.appendChild(signal)
|
||
|
else:
|
||
|
- print 'Unhandled signal %s::%s' % (node.getAttribute('class'),
|
||
|
- signal_name)
|
||
|
+ print('Unhandled signal %s::%s' % (node.getAttribute('class'),
|
||
|
+ signal_name))
|
||
|
|
||
|
if not uimgr.childNodes:
|
||
|
child = self._dom.createElement('child')
|
||
|
@@ -461,8 +461,8 @@
|
||
|
for accelerator in get_accelerator_nodes(node):
|
||
|
signal_name = accelerator.getAttribute('signal')
|
||
|
if signal_name != 'activate':
|
||
|
- print 'Unhandled accelerator signal for %s::%s' % (
|
||
|
- node.getAttribute('class'), signal_name)
|
||
|
+ print('Unhandled accelerator signal for %s::%s' % (
|
||
|
+ node.getAttribute('class'), signal_name))
|
||
|
continue
|
||
|
accelerator.removeAttribute('signal')
|
||
|
child.appendChild(accelerator)
|
||
|
@@ -711,7 +711,7 @@
|
||
|
return s.stdout.read()
|
||
|
|
||
|
def usage():
|
||
|
- print __doc__
|
||
|
+ print(__doc__)
|
||
|
|
||
|
def main(args):
|
||
|
try:
|
||
|
@@ -745,10 +745,10 @@
|
||
|
|
||
|
xml = _indent(conv.to_xml())
|
||
|
if output_filename == "-":
|
||
|
- print xml
|
||
|
+ print(xml)
|
||
|
else:
|
||
|
open(output_filename, 'w').write(xml)
|
||
|
- print "Wrote", output_filename
|
||
|
+ print("Wrote", output_filename)
|
||
|
|
||
|
return 0
|
||
|
|