[GRASS-SVN] r36295 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 9 19:01:39 EDT 2009


Author: cmbarton
Date: 2009-03-09 19:01:39 -0400 (Mon, 09 Mar 2009)
New Revision: 36295

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
Log:
Fix for Mac freeze (putting static box definition BEFORE contents).

Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2009-03-09 22:05:55 UTC (rev 36294)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2009-03-09 23:01:39 UTC (rev 36295)
@@ -826,11 +826,20 @@
 
         self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
 
+        if self.inputType == 'dxf':
+            self.inputTitle = _("Input DXF file")
+        else:
+            self.inputTitle = _("Input directory")
+
+        self.inputBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
+                                label=" %s " % self.inputTitle)
+        self.layerBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
+                                label=_(" List of %s layers ") % self.inputType.upper())
+
         #
         # input
         #
         if self.inputType == 'dxf':
-            self.inputTitle = _("Input DXF file")
             self.inputText = wx.StaticText(self.panel, id=wx.ID_ANY, label=_("Choose DXF file:"))
             self.input = filebrowse.FileBrowseButton(parent=self.panel, id=wx.ID_ANY, 
                                                      size=globalvar.DIALOG_GSELECT_SIZE, labelText='',
@@ -840,7 +849,6 @@
                                                      changeCallback=self.OnSetInput,
                                                      fileMask="*.dxf")
         else:
-            self.inputTitle = _("Input directory")
             self.inputText = wx.StaticText(self.panel, id=wx.ID_ANY, label=_("Choose directory:"))
             self.input = filebrowse.DirBrowseButton(parent=self.panel, id=wx.ID_ANY, 
                                                      size=globalvar.DIALOG_GSELECT_SIZE, labelText='',
@@ -890,9 +898,7 @@
         #
         # input
         #
-        inputBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
-                                label=" %s " % self.inputTitle)
-        inputSizer = wx.StaticBoxSizer(inputBox, wx.HORIZONTAL)
+        inputSizer = wx.StaticBoxSizer(self.inputBox, wx.HORIZONTAL)
         
         gridSizer = wx.FlexGridSizer(cols=2, vgap=5, hgap=5)
        
@@ -916,9 +922,7 @@
         #
         # list of DXF layers
         #
-        layerBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
-                                label=_(" List of %s layers ") % self.inputType.upper())
-        layerSizer = wx.StaticBoxSizer(layerBox, wx.HORIZONTAL)
+        layerSizer = wx.StaticBoxSizer(self.layerBox, wx.HORIZONTAL)
 
         layerSizer.Add(item=self.list, proportion=1,
                       flag=wx.ALL | wx.EXPAND, border=5)



More information about the grass-commit mailing list