Package: gamera / 3.4.1+svn1423-4

wxpython3.0-transition.diff Patch series | download
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
Description: updates for the wxpython3.0-transition
 The call of wx.InitAllImageHandlers() is no-op in 2.8 anyway,
 cf. http://bugs.debian.org/758578, so completely disabled here
Bug: http://bugs.debian.org/757208
Author: Daniel Stender <debian@danielstender.com>
Forwarded: http://sourceforge.net/p/gamera/code/1424/tree//trunk/gamera/gamera/gui/gui_util.py?diff=50c1e1f034309d0a1716b4b0:1423
Last-Update: 2014-08-26

--- a/gamera/gui/gamera_display.py
+++ b/gamera/gui/gamera_display.py
@@ -39,8 +39,8 @@ import gamera.plugins.gui_support  # Gam
 ##############################################################################
 
 # we want this done on import
-if int(wx.__version__.split('.')[1]) < 9:
-    wx.InitAllImageHandlers() # deprecated since wxPython 2.9
+# if int(wx.__version__.split('.')[1]) < 9:
+#     wx.InitAllImageHandlers() # deprecated since wxPython 2.9
 
 def _sort_by_nrows(a, b):
    return cmp(a.nrows, b.nrows)

--- a/gamera/gui/gui_util.py
+++ b/gamera/gui/gui_util.py
@@ -94,7 +94,7 @@ class FileDialog(wx.FileDialog):
       if cls.last_directory is None:
          cls.last_directory = path.abspath(config.get("default_dir"))
       if multiple:
-         self._flags |= wx.MULTIPLE
+         self._flags |= wx.FD_MULTIPLE
          self._multiple = True
       else:
          self._multiple = False
@@ -121,10 +121,10 @@ class FileDialog(wx.FileDialog):
          return filename
 
 class OpenFileDialog(FileDialog):
-   _flags = wx.OPEN
+   _flags = wx.FD_OPEN
 
 class SaveFileDialog(FileDialog):
-   _flags = wx.SAVE|wx.OVERWRITE_PROMPT
+   _flags = wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT
 
 def open_file_dialog(parent, extensions="*.*", multiple=0):
    return OpenFileDialog(parent, extensions, multiple).show()