File: wxpython3.0-transition.diff

package info (click to toggle)
gamera 3.4.1%2Bsvn1423-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 22,292 kB
  • ctags: 25,015
  • sloc: xml: 122,324; ansic: 50,812; cpp: 50,489; python: 34,987; makefile: 119; sh: 101
file content (46 lines) | stat: -rw-r--r-- 1,747 bytes parent folder | 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()