[med-svn] r18133 - in trunk/packages/invesalius/trunk/debian: . patches

Thiago Franco Moraes tfmoraes-guest at moszumanska.debian.org
Wed Sep 24 17:26:35 UTC 2014


Author: tfmoraes-guest
Date: 2014-09-24 17:26:35 +0000 (Wed, 24 Sep 2014)
New Revision: 18133

Added:
   trunk/packages/invesalius/trunk/debian/patches/10_wxpython3.patch
Modified:
   trunk/packages/invesalius/trunk/debian/changelog
   trunk/packages/invesalius/trunk/debian/control
   trunk/packages/invesalius/trunk/debian/patches/series
Log:
Added patches to make invesalius3 runs using wxPython3

Modified: trunk/packages/invesalius/trunk/debian/changelog
===================================================================
--- trunk/packages/invesalius/trunk/debian/changelog	2014-09-24 14:02:53 UTC (rev 18132)
+++ trunk/packages/invesalius/trunk/debian/changelog	2014-09-24 17:26:35 UTC (rev 18133)
@@ -1,3 +1,10 @@
+invesalius (3.0~b5-4) unstable; urgency=low
+
+  [ Thiago Franco de Moraes and Olly Betts ]
+  * Support to wxPython 3.0
+
+ -- Thiago Franco de Moraes <tfmoraes at cti.gov.br>  Tue, 23 Sep 2014 16:32:50 -0300
+
 invesalius (3.0~b5-3) unstable; urgency=low
 
   [ Thiago Franco de Moraes ]

Modified: trunk/packages/invesalius/trunk/debian/control
===================================================================
--- trunk/packages/invesalius/trunk/debian/control	2014-09-24 14:02:53 UTC (rev 18132)
+++ trunk/packages/invesalius/trunk/debian/control	2014-09-24 17:26:35 UTC (rev 18133)
@@ -22,7 +22,7 @@
          ${misc:Depends},
          python-numpy,
          python-scipy,
-         python-wxgtk2.8 (>= 2.8.12),
+         python-wxgtk3.0,
          python-imaging,
          python-vtk,
          python-gdcm,

Added: trunk/packages/invesalius/trunk/debian/patches/10_wxpython3.patch
===================================================================
--- trunk/packages/invesalius/trunk/debian/patches/10_wxpython3.patch	                        (rev 0)
+++ trunk/packages/invesalius/trunk/debian/patches/10_wxpython3.patch	2014-09-24 17:26:35 UTC (rev 18133)
@@ -0,0 +1,541 @@
+Author: Thiago Franco de Moraes and Olly Betts
+Date: Tue, 23 Sep 2014 16:36:46 -0300
+Description: Patches necessary to make InVesalius3 runs using wxPython 3.0
+diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py
+index eff129a..bf51d19 100644
+--- a/invesalius/gui/data_notebook.py
++++ b/invesalius/gui/data_notebook.py
+@@ -22,9 +22,9 @@ import sys
+ import platform
+ 
+ try:
+-    from PIL import Image
+-except(ImportError):
+     import Image
++except ImportError:
++    from PIL import Image
+ 
+ import wx
+ import wx.grid
+@@ -162,16 +162,16 @@ class MeasureButtonControlPanel(wx.Panel):
+         button_new = pbtn.PlateButton(self, BTN_NEW, "",
+                                      BMP_NEW,
+                                      style=button_style,
+-                                     size = wx.Size(18, 18))
++                                     size = wx.Size(24, 20))
+         self.button_new = button_new
+         button_remove = pbtn.PlateButton(self, BTN_REMOVE, "",
+                                          BMP_REMOVE,
+                                          style=button_style,
+-                                         size = wx.Size(18, 18))
++                                         size = wx.Size(24, 20))
+         button_duplicate = pbtn.PlateButton(self, BTN_DUPLICATE, "",
+                                             BMP_DUPLICATE,
+                                             style=button_style,
+-                                            size = wx.Size(18, 18))
++                                            size = wx.Size(24, 20))
+         button_duplicate.Disable()
+ 
+         # Add all controls to gui
+@@ -276,15 +276,15 @@ class ButtonControlPanel(wx.Panel):
+         button_new = pbtn.PlateButton(self, BTN_NEW, "",
+                                      BMP_NEW,
+                                      style=button_style,
+-                                     size = wx.Size(18, 18))
++                                     size = wx.Size(24, 20))
+         button_remove = pbtn.PlateButton(self, BTN_REMOVE, "",
+                                          BMP_REMOVE,
+                                          style=button_style,
+-                                         size = wx.Size(18, 18))
++                                         size = wx.Size(24, 20))
+         button_duplicate = pbtn.PlateButton(self, BTN_DUPLICATE, "",
+                                             BMP_DUPLICATE,
+                                             style=button_style,
+-                                            size = wx.Size(18, 18))
++                                            size = wx.Size(24, 20))
+ 
+         # Add all controls to gui
+         sizer = wx.BoxSizer(wx.HORIZONTAL)
+@@ -444,7 +444,7 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
+         self.InsertColumn(1, _("Name"))
+         self.InsertColumn(2, _("Threshold"), wx.LIST_FORMAT_RIGHT)
+         
+-        self.SetColumnWidth(0, 20)
++        self.SetColumnWidth(0, 25)
+         self.SetColumnWidth(1, 120)
+         self.SetColumnWidth(2, 90)
+         
+@@ -595,15 +595,15 @@ class SurfaceButtonControlPanel(wx.Panel):
+         button_new = pbtn.PlateButton(self, BTN_NEW, "",
+                                      BMP_NEW,
+                                      style=button_style,
+-                                     size = wx.Size(18, 18))
++                                     size = wx.Size(24, 20))
+         button_remove = pbtn.PlateButton(self, BTN_REMOVE, "",
+                                          BMP_REMOVE,
+                                          style=button_style,
+-                                         size = wx.Size(18, 18))
++                                         size = wx.Size(24, 20))
+         button_duplicate = pbtn.PlateButton(self, BTN_DUPLICATE, "",
+                                             BMP_DUPLICATE,
+                                             style=button_style,
+-                                            size = wx.Size(18, 18))
++                                            size = wx.Size(24, 20))
+ 
+         # Add all controls to gui
+         sizer = wx.BoxSizer(wx.HORIZONTAL)
+@@ -768,7 +768,7 @@ class SurfacesListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
+         self.InsertColumn(2, _(u"Volume (mm³)"))
+         self.InsertColumn(3, _("Transparency"), wx.LIST_FORMAT_RIGHT)
+         
+-        self.SetColumnWidth(0, 20)
++        self.SetColumnWidth(0, 25)
+         self.SetColumnWidth(1, 85)
+         self.SetColumnWidth(2, 85)
+         self.SetColumnWidth(3, 80)
+@@ -1008,7 +1008,7 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
+         self.InsertColumn(3, _("Type"))
+         self.InsertColumn(4, _("Value"), wx.LIST_FORMAT_RIGHT)
+         
+-        self.SetColumnWidth(0, 20)
++        self.SetColumnWidth(0, 25)
+         self.SetColumnWidth(1, 65)
+         self.SetColumnWidth(2, 55)
+         self.SetColumnWidth(3, 50)
+@@ -1199,7 +1199,7 @@ class AnnotationsListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
+         self.InsertColumn(2, _("Type"), wx.LIST_FORMAT_CENTER)
+         self.InsertColumn(3, _("Value"))
+         
+-        self.SetColumnWidth(0, 20)
++        self.SetColumnWidth(0, 25)
+         self.SetColumnWidth(1, 90)
+         self.SetColumnWidth(2, 50)
+         self.SetColumnWidth(3, 120)
+diff --git a/invesalius/gui/default_tasks.py b/invesalius/gui/default_tasks.py
+index 9c38ba4..7725073 100644
+--- a/invesalius/gui/default_tasks.py
++++ b/invesalius/gui/default_tasks.py
+@@ -113,10 +113,7 @@ class Panel(wx.Panel):
+ # Lower fold panel
+ class LowerTaskPanel(wx.Panel):
+     def __init__(self, parent):
+-        wx.Panel.__init__(self, parent, pos=wx.Point(5, 5),
+-        #                  size=wx.Size(280, 700))
+-                           size=wx.Size(280, 420))
+-
++        wx.Panel.__init__(self, parent)
+         fold_panel = fpb.FoldPanelBar(self, -1, wx.DefaultPosition,
+                                       self.GetSize(),FPB_DEFAULT_STYLE,
+                                       fpb.FPB_COLLAPSE_TO_BOTTOM)
+@@ -182,9 +179,7 @@ class LowerTaskPanel(wx.Panel):
+ # Upper fold panel
+ class UpperTaskPanel(wx.Panel):
+     def __init__(self, parent):
+-        wx.Panel.__init__(self, parent, pos=wx.Point(5, 5),
+-                          size=wx.Size(280, 656))
+-
++        wx.Panel.__init__(self, parent)
+         fold_panel = fpb.FoldPanelBar(self, -1, wx.DefaultPosition,
+                                       self.GetSize(),FPB_DEFAULT_STYLE,
+                                       fpb.FPB_SINGLE_FOLD)
+@@ -210,7 +205,8 @@ class UpperTaskPanel(wx.Panel):
+             tasks = [(_("Load data"), importer.TaskPanel),
+                      (_("Select region of interest"), slice_.TaskPanel),
+                      (_("Configure 3D surface"), surface.TaskPanel),
+-                     (_("Export data"), exporter.TaskPanel)]
++                     (_("Export data"), exporter.TaskPanel)
++                    ]
+         elif int(session.mode) == const.MODE_NAVIGATOR:
+             tasks = [(_("Load data"), importer.TaskPanel),
+                      (_("Select region of interest"), slice_.TaskPanel),
+diff --git a/invesalius/gui/default_viewers.py b/invesalius/gui/default_viewers.py
+index 9d8a3ef..c31f801 100644
+--- a/invesalius/gui/default_viewers.py
++++ b/invesalius/gui/default_viewers.py
+@@ -330,7 +330,7 @@ class VolumeViewerCover(wx.Panel):
+ 
+ class VolumeToolPanel(wx.Panel):
+     def __init__(self, parent):
+-        wx.Panel.__init__(self, parent, size = (10,100))
++        wx.Panel.__init__(self, parent)
+ 
+         # VOLUME RAYCASTING BUTTON
+         BMP_RAYCASTING = wx.Bitmap("../icons/volume_raycasting.png",
+@@ -346,15 +346,15 @@ class VolumeToolPanel(wx.Panel):
+ 
+         button_raycasting = pbtn.PlateButton(self, BUTTON_RAYCASTING,"",
+                 BMP_RAYCASTING, style=pbtn.PB_STYLE_SQUARE,
+-                size=(24,24))
++                size=(32,32))
+ 
+         button_stereo = pbtn.PlateButton(self, BUTTON_3D_STEREO,"",
+                 BMP_3D_STEREO, style=pbtn.PB_STYLE_SQUARE,
+-                    size=(24,24))
++                    size=(32,32))
+ 
+         button_slice_plane = self.button_slice_plane = pbtn.PlateButton(self, BUTTON_SLICE_PLANE,"",
+         BMP_SLICE_PLANE, style=pbtn.PB_STYLE_SQUARE,
+-        size=(24,24))
++        size=(32,32))
+ 
+         self.button_raycasting = button_raycasting
+         self.button_stereo = button_stereo
+@@ -363,13 +363,13 @@ class VolumeToolPanel(wx.Panel):
+         BMP_FRONT = wx.Bitmap(ID_TO_BMP[const.VOL_FRONT][1],
+                               wx.BITMAP_TYPE_PNG)
+         button_view = pbtn.PlateButton(self, BUTTON_VIEW, "",
+-                                        BMP_FRONT, size=(24,24),
++                                        BMP_FRONT, size=(32,32),
+                                         style=pbtn.PB_STYLE_SQUARE)
+         self.button_view = button_view
+ 
+         # VOLUME COLOUR BUTTON
+         if sys.platform == 'linux2':
+-            size = (28,28)
++            size = (32,32)
+             sp = 2
+         else:
+             size = (24,24)
+diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py
+index c6d7271..af1dc66 100644
+--- a/invesalius/gui/dialogs.py
++++ b/invesalius/gui/dialogs.py
+@@ -214,7 +214,7 @@ def ShowOpenProjectDialog():
+     dlg = wx.FileDialog(None, message=_("Open InVesalius 3 project..."),
+                         defaultDir="",
+                         defaultFile="", wildcard=WILDCARD_OPEN,
+-                        style=wx.OPEN|wx.CHANGE_DIR)
++                        style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
+ 
+     # inv3 filter is default
+     dlg.SetFilterIndex(0)
+@@ -242,7 +242,7 @@ def ShowOpenAnalyzeDialog():
+     dlg = wx.FileDialog(None, message=_("Open Analyze file"),
+                         defaultDir="",
+                         defaultFile="", wildcard=WILDCARD_ANALYZE,
+-                        style=wx.OPEN|wx.CHANGE_DIR)
++                        style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
+ 
+     # inv3 filter is default
+     dlg.SetFilterIndex(0)
+@@ -312,7 +312,7 @@ def ShowSaveAsProjectDialog(default_filename=None):
+                         "", # last used directory
+                         default_filename,
+                         _("InVesalius project (*.inv3)|*.inv3"),
+-                        wx.SAVE|wx.OVERWRITE_PROMPT)
++                        wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+     #dlg.SetFilterIndex(0) # default is VTI
+ 
+     filename = None
+@@ -779,7 +779,8 @@ def ShowAboutDialog(parent):
+                        "Tatiana Al-Chueyr (former)",
+                        "Guilherme Cesar Soares Ruppert (former)",
+                        "Fabio de Souza Azevedo (former)",
+-                       "Bruno Lara Bottazzini (contributor)"]
++                       "Bruno Lara Bottazzini (contributor)",
++                       "Olly Betts (patches to support wxPython3)"]
+ 
+     info.Translators = ["Alex P. Natsios",
+                         "Andreas Loupasakis",
+@@ -972,7 +973,7 @@ def ExportPicture(type_=""):
+                         "", # last used directory
+                         project_name, # filename
+                         WILDCARD_SAVE_PICTURE,
+-                        wx.SAVE|wx.OVERWRITE_PROMPT)
++                        wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+     dlg.SetFilterIndex(1) # default is VTI
+ 
+     if dlg.ShowModal() == wx.ID_OK:
+diff --git a/invesalius/gui/frame.py b/invesalius/gui/frame.py
+index 9f5b5c4..458e994 100644
+--- a/invesalius/gui/frame.py
++++ b/invesalius/gui/frame.py
+@@ -68,6 +68,7 @@ class Frame(wx.Frame):
+         if sys.platform != 'darwin':
+             self.Maximize()
+         
++        self.sizeChanged = True
+         #Necessary update AUI (statusBar in special)
+         #when maximized in the Win 7 and XP
+         self.SetSize(self.GetSize())
+@@ -114,6 +115,7 @@ class Frame(wx.Frame):
+         Bind normal events from wx (except pubsub related).
+         """
+         self.Bind(wx.EVT_SIZE, self.OnSize)
++        self.Bind(wx.EVT_IDLE, self.OnIdle)
+         self.Bind(wx.EVT_MENU, self.OnMenuClick)
+         self.Bind(wx.EVT_CLOSE, self.OnClose)
+ 
+@@ -375,8 +377,17 @@ class Frame(wx.Frame):
+         """
+         Refresh GUI when frame is resized.
+         """
+-        Publisher.sendMessage(('ProgressBar Reposition'))
+         evt.Skip()
++        self.Reposition()
++        self.sizeChanged = True
++
++    def OnIdle(self, evt):
++        if self.sizeChanged:
++            self.Reposition()
++
++    def Reposition(self):
++        Publisher.sendMessage(('ProgressBar Reposition'))
++        self.sizeChanged = False
+ 
+     def ShowPreferences(self):
+ 
+@@ -560,13 +571,13 @@ class MenuBar(wx.MenuBar):
+ 
+             file_edit_item_undo = wx.MenuItem(file_edit, wx.ID_UNDO,  _("Undo\tCtrl+Z"))
+             file_edit_item_undo.SetBitmap(self.BMP_UNDO)
+-            file_edit_item_undo.Enable(False)
+             file_edit.AppendItem(file_edit_item_undo)
++            file_edit_item_undo.Enable(False)
+ 
+             file_edit_item_redo = wx.MenuItem(file_edit, wx.ID_REDO,  _("Redo\tCtrl+Y"))
+             file_edit_item_redo.SetBitmap(self.BMP_REDO)
+-            file_edit_item_redo.Enable(False)
+             file_edit.AppendItem(file_edit_item_redo)
++            file_edit_item_redo.Enable(False)
+         else:
+             file_edit.Append(wx.ID_UNDO, _("Undo\tCtrl+Z")).Enable(False)
+             file_edit.Append(wx.ID_REDO, _("Redo\tCtrl+Y")).Enable(False)
+@@ -691,9 +702,10 @@ class ProgressBar(wx.Gauge):
+         """
+         Compute new size and position, according to parent resize
+         """
+-        rect = self.parent.GetFieldRect(2)
++        rect = self.Parent.GetFieldRect(2)
+         self.SetPosition((rect.x + 2, rect.y + 2))
+         self.SetSize((rect.width - 4, rect.height - 4))
++        self.Show()
+ 
+     def SetPercentage(self, value):
+         """
+diff --git a/invesalius/gui/import_panel.py b/invesalius/gui/import_panel.py
+index c52b21f..2ea7af2 100644
+--- a/invesalius/gui/import_panel.py
++++ b/invesalius/gui/import_panel.py
+@@ -110,16 +110,16 @@ class InnerPanel(wx.Panel):
+ 
+         sizer = wx.BoxSizer(wx.VERTICAL)
+         sizer.Add(splitter, 20, wx.EXPAND)
+-        sizer.Add(panel, 1, wx.EXPAND|wx.LEFT, 90)
+-
+-        self.SetSizer(sizer)
+-        sizer.Fit(self)
++        sizer.Add(panel, 0, wx.EXPAND|wx.LEFT, 90)
+ 
+         self.text_panel = TextPanel(splitter)
+         splitter.AppendWindow(self.text_panel, 250)
+ 
+         self.image_panel = ImagePanel(splitter)
+         splitter.AppendWindow(self.image_panel, 250)
++        
++        self.SetSizer(sizer)
++        sizer.Fit(self)
+ 
+         self.Layout()
+         self.Update()
+diff --git a/invesalius/gui/task_exporter.py b/invesalius/gui/task_exporter.py
+index e11620d..ecd293b 100644
+--- a/invesalius/gui/task_exporter.py
++++ b/invesalius/gui/task_exporter.py
+@@ -160,26 +160,28 @@ class InnerTaskPanel(wx.Panel):
+         if sys.platform == 'darwin':
+             BMP_EXPORT_SURFACE = wx.Bitmap(\
+                                   "../icons/surface_export_original.png",
+-                                  wx.BITMAP_TYPE_PNG)
++                                  wx.BITMAP_TYPE_PNG).ConvertToImage()\
++                                          .Rescale(25, 25).ConvertToBitmap()
+             BMP_TAKE_PICTURE = wx.Bitmap(\
+                                  "../icons/tool_photo_original.png",
+-                                 wx.BITMAP_TYPE_PNG)
++                                 wx.BITMAP_TYPE_PNG).ConvertToImage()\
++                                          .Rescale(25, 25).ConvertToBitmap()
++
+             #BMP_EXPORT_MASK = wx.Bitmap("../icons/mask.png",
+             #                            wx.BITMAP_TYPE_PNG)
+         else:
+             BMP_EXPORT_SURFACE = wx.Bitmap("../icons/surface_export.png",
+-                                        wx.BITMAP_TYPE_PNG)
++                                        wx.BITMAP_TYPE_PNG).ConvertToImage()\
++                                          .Rescale(25, 25).ConvertToBitmap()
++
+             BMP_TAKE_PICTURE = wx.Bitmap("../icons/tool_photo.png",
+-                                     wx.BITMAP_TYPE_PNG)
++                                     wx.BITMAP_TYPE_PNG).ConvertToImage()\
++                                          .Rescale(25, 25).ConvertToBitmap()
++
+             #BMP_EXPORT_MASK = wx.Bitmap("../icons/mask_small.png",
+             #                            wx.BITMAP_TYPE_PNG)
+ 
+ 
+-        bmp_list = [BMP_TAKE_PICTURE, BMP_EXPORT_SURFACE]#,
+-        #            BMP_EXPORT_MASK]
+-        for bmp in bmp_list:
+-            bmp.SetWidth(25)
+-            bmp.SetHeight(25)
+ 
+         # Buttons related to hyperlinks
+         button_style = pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT
+@@ -276,7 +278,7 @@ class InnerTaskPanel(wx.Panel):
+                             "", # last used directory
+                             project_name, # filename
+                             WILDCARD_SAVE_MASK,
+-                            wx.SAVE|wx.OVERWRITE_PROMPT)
++                            wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+         dlg.SetFilterIndex(0) # default is VTI
+                                 
+         if dlg.ShowModal() == wx.ID_OK:
+@@ -312,7 +314,7 @@ class InnerTaskPanel(wx.Panel):
+                                 "", # last used directory
+                                 project_name, # filename
+                                 WILDCARD_SAVE_3D,
+-                                wx.SAVE|wx.OVERWRITE_PROMPT)
++                                wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+             dlg.SetFilterIndex(3) # default is STL
+                                 
+             if dlg.ShowModal() == wx.ID_OK:
+diff --git a/invesalius/gui/task_importer.py b/invesalius/gui/task_importer.py
+index 8dad9fe..0cf763a 100644
+--- a/invesalius/gui/task_importer.py
++++ b/invesalius/gui/task_importer.py
+@@ -94,9 +94,9 @@ class InnerTaskPanel(wx.Panel):
+         BMP_OPEN_PROJECT = wx.Bitmap("../icons/file_open.png", wx.BITMAP_TYPE_PNG)
+ 
+         bmp_list = [BMP_IMPORT, BMP_NET, BMP_OPEN_PROJECT]
+-        for bmp in bmp_list:
+-            bmp.SetWidth(25)
+-            bmp.SetHeight(25)
++        #for bmp in bmp_list:
++            #bmp.SetWidth(25)
++            #bmp.SetHeight(25)
+ 
+         # Buttons related to hyperlinks
+         button_style = pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT
+diff --git a/invesalius/gui/task_slice.py b/invesalius/gui/task_slice.py
+index ea81462..78ff21d 100644
+--- a/invesalius/gui/task_slice.py
++++ b/invesalius/gui/task_slice.py
+@@ -70,8 +70,8 @@ class InnerTaskPanel(wx.Panel):
+ 
+         # Image(s) for buttons
+         BMP_ADD = wx.Bitmap("../icons/object_add.png", wx.BITMAP_TYPE_PNG)
+-        BMP_ADD.SetWidth(25)
+-        BMP_ADD.SetHeight(25)
++        #BMP_ADD.SetWidth(25)
++        #BMP_ADD.SetHeight(25)
+ 
+         # Button for creating new surface
+         button_new_mask = pbtn.PlateButton(self, BTN_NEW, "", BMP_ADD, style=\
+@@ -126,7 +126,7 @@ class InnerTaskPanel(wx.Panel):
+         # Add line sizers into main sizer
+         main_sizer = wx.BoxSizer(wx.VERTICAL)
+         main_sizer.Add(line_new, 0,wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, 5)
+-        main_sizer.Add(fold_panel, 6, wx.GROW|wx.EXPAND|wx.ALL, 5)
++        main_sizer.Add(fold_panel, 5, wx.GROW|wx.EXPAND|wx.ALL, 5)
+         main_sizer.AddSizer(line_sizer, 1, wx.GROW|wx.EXPAND)
+         main_sizer.Fit(self)
+ 
+@@ -313,7 +313,7 @@ class MaskProperties(wx.Panel):
+         # Combo related to mask naem
+         combo_mask_name = wx.ComboBox(self, -1, "", choices= MASK_LIST,
+                                      style=wx.CB_DROPDOWN|wx.CB_READONLY)
+-        combo_mask_name.SetSelection(0) # wx.CB_SORT
++        #combo_mask_name.SetSelection(0) # wx.CB_SORT
+         if sys.platform != 'win32':
+             combo_mask_name.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
+         self.combo_mask_name = combo_mask_name
+@@ -327,19 +327,21 @@ class MaskProperties(wx.Panel):
+         line1.Add(combo_mask_name, 1, wx.EXPAND|wx.GROW|wx.TOP|wx.RIGHT, 2)
+         line1.Add(button_colour, 0, wx.TOP|wx.LEFT|wx.RIGHT, 2)
+ 
+-        ## LINE 2
++        ### LINE 2
+         text_thresh = wx.StaticText(self, -1,
+                                     _("Set predefined or manual threshold:"))
+ 
+-        ## LINE 3
+-        combo_thresh = wx.ComboBox(self, -1, "", size=(15,-1),
+-                                   choices=[],#THRESHOLD_LIST
++        ### LINE 3
++        THRESHOLD_LIST = ["",]
++        combo_thresh = wx.ComboBox(self, -1, "", #size=(15,-1),
++                                   choices=THRESHOLD_LIST,
+                                    style=wx.CB_DROPDOWN|wx.CB_READONLY)
+         combo_thresh.SetSelection(0)
+         if sys.platform != 'win32':
+             combo_thresh.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
+         self.combo_thresh = combo_thresh
+ 
++
+         ## LINE 4
+         gradient = grad.GradientCtrl(self, -1, -5000, 5000, 0, 5000,
+                                            (0, 255, 0, 100))
+@@ -347,9 +349,9 @@ class MaskProperties(wx.Panel):
+ 
+         # Add all lines into main sizer
+         sizer = wx.BoxSizer(wx.VERTICAL)
+-        sizer.Add(line1, 1, wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, 5)
+-        sizer.Add(text_thresh, 1, wx.GROW|wx.EXPAND|wx.ALL, 5)
+-        sizer.Add(combo_thresh, 1, wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT, 5)
++        sizer.Add(line1, 0, wx.GROW|wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, 5)
++        sizer.Add(text_thresh, 0, wx.GROW|wx.EXPAND|wx.ALL, 5)
++        sizer.Add(combo_thresh, 0, wx.EXPAND|wx.GROW|wx.TOP|wx.RIGHT, 2)
+         sizer.Add(gradient, 1, wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT|wx.BOTTOM, 6)
+         sizer.Fit(self)
+ 
+diff --git a/invesalius/gui/task_surface.py b/invesalius/gui/task_surface.py
+index 354314f..6166caf 100644
+--- a/invesalius/gui/task_surface.py
++++ b/invesalius/gui/task_surface.py
+@@ -73,8 +73,8 @@ class InnerTaskPanel(wx.Panel):
+ 
+ 
+         BMP_ADD = wx.Bitmap("../icons/object_add.png", wx.BITMAP_TYPE_PNG)
+-        BMP_ADD.SetWidth(25)
+-        BMP_ADD.SetHeight(25)
++        #BMP_ADD.SetWidth(25)
++        #BMP_ADD.SetHeight(25)
+ 
+         # Button for creating new surface
+         button_new_surface = pbtn.PlateButton(self, BTN_NEW, "", BMP_ADD, style=\
+@@ -384,7 +384,8 @@ class SurfaceProperties(wx.Panel):
+         ## LINE 1
+ 
+         # Combo related to mask naem
+-        combo_surface_name = wx.ComboBox(self, -1, "", choices= self.surface_dict.keys(),
++        combo_surface_name = wx.ComboBox(self, -1, "", choices=
++                                         self.surface_dict.keys() or ["", ],
+                                      style=wx.CB_DROPDOWN|wx.CB_READONLY)
+         combo_surface_name.SetSelection(0)
+         if sys.platform != 'win32':
+@@ -533,7 +534,9 @@ class QualityAdjustment(wx.Panel):
+ 
+         # LINE 1
+ 
+-        combo_quality = wx.ComboBox(self, -1, "", choices=const.SURFACE_QUALITY.keys(),
++        combo_quality = wx.ComboBox(self, -1, "",
++                                    choices=const.SURFACE_QUALITY.keys() or
++                                    ["", ],
+                                      style=wx.CB_DROPDOWN|wx.CB_READONLY)
+         combo_quality.SetSelection(3)
+         combo_quality.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
+diff --git a/invesalius/invesalius.py b/invesalius/invesalius.py
+index 883f090..5d2d4f1 100755
+--- a/invesalius/invesalius.py
++++ b/invesalius/invesalius.py
+@@ -30,8 +30,9 @@ if sys.platform == 'win32':
+ else:
+     if sys.platform != 'darwin':
+         import wxversion
+-        wxversion.ensureMinimal('2.8-unicode', optionsRequired=True)
+-        wxversion.select('2.8-unicode', optionsRequired=True)
++        #wxversion.ensureMinimal('2.8-unicode', optionsRequired=True)
++        #wxversion.select('2.8-unicode', optionsRequired=True)
++        wxversion.ensureMinimal('3.0')
+         
+ import wx
+ #from wx.lib.pubsub import setupv1 #new wx

Modified: trunk/packages/invesalius/trunk/debian/patches/series
===================================================================
--- trunk/packages/invesalius/trunk/debian/patches/series	2014-09-24 14:02:53 UTC (rev 18132)
+++ trunk/packages/invesalius/trunk/debian/patches/series	2014-09-24 17:26:35 UTC (rev 18133)
@@ -1,2 +1,3 @@
+10_wxpython3.patch
 10_sample_path.patch
 10_import_mips.patch




More information about the debian-med-commit mailing list