Commit cadb0d83c5f4139d27186047c8d6bc5fbe76e383

Authored by thiago
1 parent 66be38ee
Exists in wxgtk3_b5

applyied the patches from Olly Betts to run in wxpython3

invesalius/gui/dialogs.py
... ... @@ -214,7 +214,7 @@ def ShowOpenProjectDialog():
214 214 dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."),
215 215 defaultDir="",
216 216 defaultFile="", wildcard=WILDCARD_OPEN,
217   - style=wx.OPEN|wx.CHANGE_DIR)
  217 + style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
218 218  
219 219 # inv3 filter is default
220 220 dlg.SetFilterIndex(0)
... ... @@ -242,7 +242,7 @@ def ShowOpenAnalyzeDialog():
242 242 dlg = wx.FileDialog(None, message=_("Open Analyze file"),
243 243 defaultDir="",
244 244 defaultFile="", wildcard=WILDCARD_ANALYZE,
245   - style=wx.OPEN|wx.CHANGE_DIR)
  245 + style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
246 246  
247 247 # inv3 filter is default
248 248 dlg.SetFilterIndex(0)
... ... @@ -312,7 +312,7 @@ def ShowSaveAsProjectDialog(default_filename=None):
312 312 "", # last used directory
313 313 default_filename,
314 314 _("InVesalius project (*.inv3)|*.inv3"),
315   - wx.SAVE|wx.OVERWRITE_PROMPT)
  315 + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
316 316 #dlg.SetFilterIndex(0) # default is VTI
317 317  
318 318 filename = None
... ... @@ -972,7 +972,7 @@ def ExportPicture(type_=""):
972 972 "", # last used directory
973 973 project_name, # filename
974 974 WILDCARD_SAVE_PICTURE,
975   - wx.SAVE|wx.OVERWRITE_PROMPT)
  975 + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
976 976 dlg.SetFilterIndex(1) # default is VTI
977 977  
978 978 if dlg.ShowModal() == wx.ID_OK:
... ...
invesalius/gui/frame.py
... ... @@ -560,13 +560,13 @@ class MenuBar(wx.MenuBar):
560 560  
561 561 file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO, _("Undo\tCtrl+Z"))
562 562 file_edit_item_undo.SetBitmap(self.BMP_UNDO)
563   - file_edit_item_undo.Enable(False)
564 563 file_edit.AppendItem(file_edit_item_undo)
  564 + file_edit_item_undo.Enable(False)
565 565  
566 566 file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO, _("Redo\tCtrl+Y"))
567 567 file_edit_item_redo.SetBitmap(self.BMP_REDO)
568   - file_edit_item_redo.Enable(False)
569 568 file_edit.AppendItem(file_edit_item_redo)
  569 + file_edit_item_redo.Enable(False)
570 570 else:
571 571 file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False)
572 572 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
... ...