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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 21 05:51:23 EDT 2008


Author: martinl
Date: 2008-08-21 05:51:22 -0400 (Thu, 21 Aug 2008)
New Revision: 32960

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: 'add layer' checkbox only for rasters and vectors
cosmetics in MultiImportDialog layout
(merge from devbr6, r32959)


Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2008-08-21 09:48:07 UTC (rev 32959)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2008-08-21 09:51:22 UTC (rev 32960)
@@ -763,7 +763,7 @@
                                                      buttonText=_('Browse'),
                                                      startDirectory=os.getcwd(),
                                                      changeCallback=self.OnSetInput)
-            self.formatText = wx.StaticText(self.panel, id=wx.ID_ANY, label=_("Choose file extension:"))
+            self.formatText = wx.StaticText(self.panel, id=wx.ID_ANY, label=_("Select file extension:"))
             self.format = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY, size=(100, -1),
                                       value="")
             if self.inputType == 'gdal':
@@ -808,22 +808,22 @@
         inputBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
                                 label=" %s " % self.inputTitle)
         inputSizer = wx.StaticBoxSizer(inputBox, wx.HORIZONTAL)
-        gridSizer = wx.GridBagSizer(vgap=5, hgap=5)
         
+        gridSizer = wx.FlexGridSizer(cols=2, vgap=5, hgap=5)
+       
         gridSizer.Add(item=self.inputText,
-                      flag=wx.ALIGN_CENTER_VERTICAL, pos=(0, 0))
+                      flag=wx.ALIGN_CENTER_VERTICAL)
+        gridSizer.AddGrowableCol(1)
         gridSizer.Add(item=self.input,
-                      flag=wx.EXPAND, pos=(0, 1))
+                      flag=wx.EXPAND | wx.ALL)
         
         if self.inputType != 'dxf':
             gridSizer.Add(item=self.formatText,
-                          flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
-            gridSizer.Add(item=self.format,
-                          pos=(1, 1))
+                          flag=wx.ALIGN_CENTER_VERTICAL)
+            gridSizer.Add(item=self.format)
         
-        gridSizer.AddGrowableCol(1)
-        inputSizer.Add(item=gridSizer, proportion=0,
-                       flag=wx.EXPAND)
+        inputSizer.Add(item=gridSizer, proportion=1,
+                       flag=wx.EXPAND | wx.ALL)
         
         dialogSizer.Add(item=inputSizer, proportion=0,
                         flag=wx.ALL | wx.EXPAND, border=5)

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-08-21 09:48:07 UTC (rev 32959)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-08-21 09:51:22 UTC (rev 32960)
@@ -700,7 +700,7 @@
                 if p.get('name', '') == 'output':
                     self.outputType = p.get('prompt', None)
                     break
-            if self.outputType:
+            if self.outputType in ('raster', 'vector', '3d-raster'):
                 # add newly created map into layer tree
                 self.addbox = wx.CheckBox(parent=self.panel,
                                           label=_('Add created map into layer tree'), style = wx.NO_BORDER)



More information about the grass-commit mailing list