Commit 86c43bdde1d764125394f89234e2fe7888e69422
Committed by
Thiago Franco de Moraes
1 parent
9db64b6b
Exists in
wxgtk3_bkp
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
@@ -215,7 +215,7 @@ def ShowOpenProjectDialog(): | @@ -215,7 +215,7 @@ def ShowOpenProjectDialog(): | ||
215 | dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."), | 215 | dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."), |
216 | defaultDir="", | 216 | defaultDir="", |
217 | defaultFile="", wildcard=WILDCARD_OPEN, | 217 | defaultFile="", wildcard=WILDCARD_OPEN, |
218 | - style=wx.OPEN|wx.CHANGE_DIR) | 218 | + style=wx.FD_OPEN|wx.FD_CHANGE_DIR) |
219 | 219 | ||
220 | # inv3 filter is default | 220 | # inv3 filter is default |
221 | dlg.SetFilterIndex(0) | 221 | dlg.SetFilterIndex(0) |
@@ -243,7 +243,7 @@ def ShowOpenAnalyzeDialog(): | @@ -243,7 +243,7 @@ def ShowOpenAnalyzeDialog(): | ||
243 | dlg = wx.FileDialog(None, message=_("Open Analyze file"), | 243 | dlg = wx.FileDialog(None, message=_("Open Analyze file"), |
244 | defaultDir="", | 244 | defaultDir="", |
245 | defaultFile="", wildcard=WILDCARD_ANALYZE, | 245 | defaultFile="", wildcard=WILDCARD_ANALYZE, |
246 | - style=wx.OPEN|wx.CHANGE_DIR) | 246 | + style=wx.FD_OPEN|wx.FD_CHANGE_DIR) |
247 | 247 | ||
248 | # inv3 filter is default | 248 | # inv3 filter is default |
249 | dlg.SetFilterIndex(0) | 249 | dlg.SetFilterIndex(0) |
@@ -313,7 +313,7 @@ def ShowSaveAsProjectDialog(default_filename=None): | @@ -313,7 +313,7 @@ def ShowSaveAsProjectDialog(default_filename=None): | ||
313 | "", # last used directory | 313 | "", # last used directory |
314 | default_filename, | 314 | default_filename, |
315 | _("InVesalius project (*.inv3)|*.inv3"), | 315 | _("InVesalius project (*.inv3)|*.inv3"), |
316 | - wx.SAVE|wx.OVERWRITE_PROMPT) | 316 | + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
317 | #dlg.SetFilterIndex(0) # default is VTI | 317 | #dlg.SetFilterIndex(0) # default is VTI |
318 | 318 | ||
319 | filename = None | 319 | filename = None |
@@ -973,7 +973,7 @@ def ExportPicture(type_=""): | @@ -973,7 +973,7 @@ def ExportPicture(type_=""): | ||
973 | "", # last used directory | 973 | "", # last used directory |
974 | project_name, # filename | 974 | project_name, # filename |
975 | WILDCARD_SAVE_PICTURE, | 975 | WILDCARD_SAVE_PICTURE, |
976 | - wx.SAVE|wx.OVERWRITE_PROMPT) | 976 | + wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
977 | dlg.SetFilterIndex(1) # default is VTI | 977 | dlg.SetFilterIndex(1) # default is VTI |
978 | 978 | ||
979 | if dlg.ShowModal() == wx.ID_OK: | 979 | if dlg.ShowModal() == wx.ID_OK: |
invesalius/gui/frame.py
@@ -596,13 +596,13 @@ class MenuBar(wx.MenuBar): | @@ -596,13 +596,13 @@ class MenuBar(wx.MenuBar): | ||
596 | 596 | ||
597 | file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO, _("Undo\tCtrl+Z")) | 597 | file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO, _("Undo\tCtrl+Z")) |
598 | file_edit_item_undo.SetBitmap(self.BMP_UNDO) | 598 | file_edit_item_undo.SetBitmap(self.BMP_UNDO) |
599 | - file_edit_item_undo.Enable(False) | ||
600 | file_edit.AppendItem(file_edit_item_undo) | 599 | file_edit.AppendItem(file_edit_item_undo) |
600 | + file_edit_item_undo.Enable(False) | ||
601 | 601 | ||
602 | file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO, _("Redo\tCtrl+Y")) | 602 | file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO, _("Redo\tCtrl+Y")) |
603 | file_edit_item_redo.SetBitmap(self.BMP_REDO) | 603 | file_edit_item_redo.SetBitmap(self.BMP_REDO) |
604 | - file_edit_item_redo.Enable(False) | ||
605 | file_edit.AppendItem(file_edit_item_redo) | 604 | file_edit.AppendItem(file_edit_item_redo) |
605 | + file_edit_item_redo.Enable(False) | ||
606 | else: | 606 | else: |
607 | file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False) | 607 | file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False) |
608 | file_edit.Append(wx.ID_REDO, _("Redo\tCtrl+Y")).Enable(False) | 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,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 |