Commit 86c43bdde1d764125394f89234e2fe7888e69422

Authored by thiago
Committed by Thiago Franco de Moraes
1 parent 9db64b6b
Exists in wxgtk3_bkp

applyied the patches from Olly Betts to run in wxpython3

invesalius/gui/dialogs.py
... ... @@ -215,7 +215,7 @@ def ShowOpenProjectDialog():
215 215 dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."),
216 216 defaultDir="",
217 217 defaultFile="", wildcard=WILDCARD_OPEN,
218   - style=wx.OPEN|wx.CHANGE_DIR)
  218 + style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
219 219  
220 220 # inv3 filter is default
221 221 dlg.SetFilterIndex(0)
... ... @@ -243,7 +243,7 @@ def ShowOpenAnalyzeDialog():
243 243 dlg = wx.FileDialog(None, message=_("Open Analyze file"),
244 244 defaultDir="",
245 245 defaultFile="", wildcard=WILDCARD_ANALYZE,
246   - style=wx.OPEN|wx.CHANGE_DIR)
  246 + style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
247 247  
248 248 # inv3 filter is default
249 249 dlg.SetFilterIndex(0)
... ... @@ -313,7 +313,7 @@ def ShowSaveAsProjectDialog(default_filename=None):
313 313 "", # last used directory
314 314 default_filename,
315 315 _("InVesalius project (*.inv3)|*.inv3"),
316   - wx.SAVE|wx.OVERWRITE_PROMPT)
  316 + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
317 317 #dlg.SetFilterIndex(0) # default is VTI
318 318  
319 319 filename = None
... ... @@ -973,7 +973,7 @@ def ExportPicture(type_=""):
973 973 "", # last used directory
974 974 project_name, # filename
975 975 WILDCARD_SAVE_PICTURE,
976   - wx.SAVE|wx.OVERWRITE_PROMPT)
  976 + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
977 977 dlg.SetFilterIndex(1) # default is VTI
978 978  
979 979 if dlg.ShowModal() == wx.ID_OK:
... ...
invesalius/gui/frame.py
... ... @@ -596,13 +596,13 @@ class MenuBar(wx.MenuBar):
596 596  
597 597 file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO, _("Undo\tCtrl+Z"))
598 598 file_edit_item_undo.SetBitmap(self.BMP_UNDO)
599   - file_edit_item_undo.Enable(False)
600 599 file_edit.AppendItem(file_edit_item_undo)
  600 + file_edit_item_undo.Enable(False)
601 601  
602 602 file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO, _("Redo\tCtrl+Y"))
603 603 file_edit_item_redo.SetBitmap(self.BMP_REDO)
604   - file_edit_item_redo.Enable(False)
605 604 file_edit.AppendItem(file_edit_item_redo)
  605 + file_edit_item_redo.Enable(False)
606 606 else:
607 607 file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False)
608 608 file_edit.Append(wx.ID_REDO, _("Redo\tCtrl+Y")).Enable(False)
... ...
invesalius/gui/task_exporter.py
... ... @@ -276,7 +276,7 @@ class InnerTaskPanel(wx.Panel):
276 276 "", # last used directory
277 277 project_name, # filename
278 278 WILDCARD_SAVE_MASK,
279   - wx.SAVE|wx.OVERWRITE_PROMPT)
  279 + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
280 280 dlg.SetFilterIndex(0) # default is VTI
281 281  
282 282 if dlg.ShowModal() == wx.ID_OK:
... ... @@ -312,7 +312,7 @@ class InnerTaskPanel(wx.Panel):
312 312 "", # last used directory
313 313 project_name, # filename
314 314 WILDCARD_SAVE_3D,
315   - wx.SAVE|wx.OVERWRITE_PROMPT)
  315 + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
316 316 dlg.SetFilterIndex(3) # default is STL
317 317  
318 318 if dlg.ShowModal() == wx.ID_OK:
... ...
invesalius/invesalius.py
... ... @@ -30,8 +30,9 @@ if sys.platform == 'win32':
30 30 else:
31 31 if sys.platform != 'darwin':
32 32 import wxversion
33   - wxversion.ensureMinimal('2.8-unicode', optionsRequired=True)
34   - wxversion.select('2.8-unicode', optionsRequired=True)
  33 + #wxversion.ensureMinimal('2.8-unicode', optionsRequired=True)
  34 + #wxversion.select('2.8-unicode', optionsRequired=True)
  35 + wxversion.ensureMinimal('3.0')
35 36  
36 37 import wx
37 38 #from wx.lib.pubsub import setupv1 #new wx
... ...