summaryrefslogtreecommitdiff
path: root/dev-util/gtk-builder-convert/files/gtk-builder-convert-2.24.32-python3.patch
blob: 01dc3d0aaff243ff35324ccedb6abcf9645d3fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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