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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 16 15:28:50 EDT 2008


Author: martinl
Date: 2008-03-16 15:28:50 -0400 (Sun, 16 Mar 2008)
New Revision: 30590

Modified:
   grass/trunk/gui/wxpython/gui_modules/preferences.py
   grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: (preferences) rasterOverlay moved to 'cmd' section

Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-03-16 17:52:13 UTC (rev 30589)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-03-16 19:28:50 UTC (rev 30590)
@@ -57,7 +57,6 @@
             #
             'display': {
                 'displayFont' : { 'value' : '' },
-                'rasterOverlay' : { 'enabled' : False },
                 },
             #
             # advanced
@@ -81,6 +80,7 @@
             'overwrite' : { 'enabled' : False },
             'closeDlg' : { 'enabled' : False },
             'verbosity' : { 'selection' : 'grassenv' },
+            'rasterOverlay' : { 'enabled' : False },
             },
             #
             # vdigit
@@ -332,7 +332,7 @@
 
 class PreferencesDialog(wx.Dialog):
     """User preferences dialog"""
-    def __init__(self, parent, title=_("User settings"),
+    def __init__(self, parent, title=_("User GUI settings"),
                  settings=globalSettings,
                  style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER):
         self.parent = parent # GMFrame
@@ -453,7 +453,7 @@
         row = 0
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Default font for GRASS displays:")),
-                       flag=wx.ALIGN_LEFT |
+                      flag=wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
         fontButton = wx.Button(parent=panel, id=wx.ID_ANY,
@@ -466,31 +466,6 @@
         sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
         border.Add(item=sizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=3)
 
-        #
-        # raster settings
-        #
-        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Raster settings"))
-        sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
-
-        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
-        gridSizer.AddGrowableCol(0)
-
-        #
-        # raster overlay
-        #
-        row = 0
-        rasterOverlay = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                    label=_("Overlay raster maps"),
-                                    name='IsChecked')
-        rasterOverlay.SetValue(self.settings.Get(group='display', key='rasterOverlay', subkey='enabled'))
-        self.winId['display:rasterOverlay:enabled'] = rasterOverlay.GetId()
-
-        gridSizer.Add(item=rasterOverlay,
-                      pos=(row, 0), span=(1, 2))
-        
-        sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
-        border.Add(item=sizer, proportion=0, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=3)
-
         panel.SetSizer(border)
         
         # bindings
@@ -552,6 +527,31 @@
         sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
         border.Add(item=sizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=3)
 
+        #
+        # raster settings
+        #
+        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Raster settings"))
+        sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
+
+        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer.AddGrowableCol(0)
+
+        #
+        # raster overlay
+        #
+        row = 0
+        rasterOverlay = wx.CheckBox(parent=panel, id=wx.ID_ANY,
+                                    label=_("Overlay raster maps"),
+                                    name='IsChecked')
+        rasterOverlay.SetValue(self.settings.Get(group='cmd', key='rasterOverlay', subkey='enabled'))
+        self.winId['cmd:rasterOverlay:enabled'] = rasterOverlay.GetId()
+
+        gridSizer.Add(item=rasterOverlay,
+                      pos=(row, 0), span=(1, 2))
+        
+        sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
+        border.Add(item=sizer, proportion=0, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=3)
+
         panel.SetSizer(border)
         
         return panel
@@ -627,7 +627,7 @@
         pageSizer.Add(item=dataBrowserSizer,
                       proportion=0,
                       flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
-                      border=5)
+                      border=3)
 
         panel.SetSizer(pageSizer)
 

Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-03-16 17:52:13 UTC (rev 30589)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-03-16 19:28:50 UTC (rev 30590)
@@ -557,7 +557,7 @@
             self.GetPyData(layer)[0]['cmd'] = cmdValidated
         elif ltype == 'raster':
             cmd = ['d.rast']
-            if UserSettings.Get(group='display', key='rasterOverlay', subkey='enabled'):
+            if UserSettings.Get(group='cmd', key='rasterOverlay', subkey='enabled'):
                 cmd.append('-o')
             menuform.GUI().ParseCommand(cmd, completed=(self.GetOptData,layer,params),
                                         parentframe=self)



More information about the grass-commit mailing list