Commit cadb0d83c5f4139d27186047c8d6bc5fbe76e383
1 parent
66be38ee
Exists in
wxgtk3_b5
applyied the patches from Olly Betts to run in wxpython3
Showing
4 changed files
with
11 additions
and
10 deletions
Show diff stats
invesalius/gui/dialogs.py
@@ -214,7 +214,7 @@ def ShowOpenProjectDialog(): | @@ -214,7 +214,7 @@ def ShowOpenProjectDialog(): | ||
214 | dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."), | 214 | dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."), |
215 | defaultDir="", | 215 | defaultDir="", |
216 | defaultFile="", wildcard=WILDCARD_OPEN, | 216 | defaultFile="", wildcard=WILDCARD_OPEN, |
217 | - style=wx.OPEN|wx.CHANGE_DIR) | 217 | + style=wx.FD_OPEN|wx.FD_CHANGE_DIR) |
218 | 218 | ||
219 | # inv3 filter is default | 219 | # inv3 filter is default |
220 | dlg.SetFilterIndex(0) | 220 | dlg.SetFilterIndex(0) |
@@ -242,7 +242,7 @@ def ShowOpenAnalyzeDialog(): | @@ -242,7 +242,7 @@ def ShowOpenAnalyzeDialog(): | ||
242 | dlg = wx.FileDialog(None, message=_("Open Analyze file"), | 242 | dlg = wx.FileDialog(None, message=_("Open Analyze file"), |
243 | defaultDir="", | 243 | defaultDir="", |
244 | defaultFile="", wildcard=WILDCARD_ANALYZE, | 244 | defaultFile="", wildcard=WILDCARD_ANALYZE, |
245 | - style=wx.OPEN|wx.CHANGE_DIR) | 245 | + style=wx.FD_OPEN|wx.FD_CHANGE_DIR) |
246 | 246 | ||
247 | # inv3 filter is default | 247 | # inv3 filter is default |
248 | dlg.SetFilterIndex(0) | 248 | dlg.SetFilterIndex(0) |
@@ -312,7 +312,7 @@ def ShowSaveAsProjectDialog(default_filename=None): | @@ -312,7 +312,7 @@ def ShowSaveAsProjectDialog(default_filename=None): | ||
312 | "", # last used directory | 312 | "", # last used directory |
313 | default_filename, | 313 | default_filename, |
314 | _("InVesalius project (*.inv3)|*.inv3"), | 314 | _("InVesalius project (*.inv3)|*.inv3"), |
315 | - wx.SAVE|wx.OVERWRITE_PROMPT) | 315 | + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
316 | #dlg.SetFilterIndex(0) # default is VTI | 316 | #dlg.SetFilterIndex(0) # default is VTI |
317 | 317 | ||
318 | filename = None | 318 | filename = None |
@@ -972,7 +972,7 @@ def ExportPicture(type_=""): | @@ -972,7 +972,7 @@ def ExportPicture(type_=""): | ||
972 | "", # last used directory | 972 | "", # last used directory |
973 | project_name, # filename | 973 | project_name, # filename |
974 | WILDCARD_SAVE_PICTURE, | 974 | WILDCARD_SAVE_PICTURE, |
975 | - wx.SAVE|wx.OVERWRITE_PROMPT) | 975 | + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
976 | dlg.SetFilterIndex(1) # default is VTI | 976 | dlg.SetFilterIndex(1) # default is VTI |
977 | 977 | ||
978 | if dlg.ShowModal() == wx.ID_OK: | 978 | if dlg.ShowModal() == wx.ID_OK: |
invesalius/gui/frame.py
@@ -560,13 +560,13 @@ class MenuBar(wx.MenuBar): | @@ -560,13 +560,13 @@ class MenuBar(wx.MenuBar): | ||
560 | 560 | ||
561 | file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO, _("Undo\tCtrl+Z")) | 561 | file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO, _("Undo\tCtrl+Z")) |
562 | file_edit_item_undo.SetBitmap(self.BMP_UNDO) | 562 | file_edit_item_undo.SetBitmap(self.BMP_UNDO) |
563 | - file_edit_item_undo.Enable(False) | ||
564 | file_edit.AppendItem(file_edit_item_undo) | 563 | file_edit.AppendItem(file_edit_item_undo) |
564 | + file_edit_item_undo.Enable(False) | ||
565 | 565 | ||
566 | file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO, _("Redo\tCtrl+Y")) | 566 | file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO, _("Redo\tCtrl+Y")) |
567 | file_edit_item_redo.SetBitmap(self.BMP_REDO) | 567 | file_edit_item_redo.SetBitmap(self.BMP_REDO) |
568 | - file_edit_item_redo.Enable(False) | ||
569 | file_edit.AppendItem(file_edit_item_redo) | 568 | file_edit.AppendItem(file_edit_item_redo) |
569 | + file_edit_item_redo.Enable(False) | ||
570 | else: | 570 | else: |
571 | file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False) | 571 | file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False) |
572 | file_edit.Append(wx.ID_REDO, _("Redo\tCtrl+Y")).Enable(False) | 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,7 +276,7 @@ class InnerTaskPanel(wx.Panel): | ||
276 | "", # last used directory | 276 | "", # last used directory |
277 | project_name, # filename | 277 | project_name, # filename |
278 | WILDCARD_SAVE_MASK, | 278 | WILDCARD_SAVE_MASK, |
279 | - wx.SAVE|wx.OVERWRITE_PROMPT) | 279 | + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
280 | dlg.SetFilterIndex(0) # default is VTI | 280 | dlg.SetFilterIndex(0) # default is VTI |
281 | 281 | ||
282 | if dlg.ShowModal() == wx.ID_OK: | 282 | if dlg.ShowModal() == wx.ID_OK: |
@@ -312,7 +312,7 @@ class InnerTaskPanel(wx.Panel): | @@ -312,7 +312,7 @@ class InnerTaskPanel(wx.Panel): | ||
312 | "", # last used directory | 312 | "", # last used directory |
313 | project_name, # filename | 313 | project_name, # filename |
314 | WILDCARD_SAVE_3D, | 314 | WILDCARD_SAVE_3D, |
315 | - wx.SAVE|wx.OVERWRITE_PROMPT) | 315 | + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
316 | dlg.SetFilterIndex(3) # default is STL | 316 | dlg.SetFilterIndex(3) # default is STL |
317 | 317 | ||
318 | if dlg.ShowModal() == wx.ID_OK: | 318 | if dlg.ShowModal() == wx.ID_OK: |
invesalius/invesalius.py
@@ -30,8 +30,9 @@ if sys.platform == 'win32': | @@ -30,8 +30,9 @@ if sys.platform == 'win32': | ||
30 | else: | 30 | else: |
31 | if sys.platform != 'darwin': | 31 | if sys.platform != 'darwin': |
32 | import wxversion | 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 | import wx | 37 | import wx |
37 | #from wx.lib.pubsub import setupv1 #new wx | 38 | #from wx.lib.pubsub import setupv1 #new wx |