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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 6 12:01:45 EST 2008


Author: martinl
Date: 2008-03-06 12:01:44 -0500 (Thu, 06 Mar 2008)
New Revision: 30488

Modified:
   grass/trunk/gui/wxpython/gui_modules/menuform.py
   grass/trunk/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI (preferences) verbosity level for command dialogs


Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-03-06 16:53:58 UTC (rev 30487)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-03-06 17:01:44 UTC (rev 30488)
@@ -917,6 +917,9 @@
             chk.Bind(wx.EVT_CHECKBOX, self.OnSetValue)
             if f['name'] in ('verbose', 'quiet'):
                 chk.Bind(wx.EVT_CHECKBOX, self.OnVerbosity)
+                vq = UserSettings.Get(group='cmd', key='verbosity', subkey='selection')
+                if f['name'] == vq:
+                    chk.SetValue(True)
             elif f['name'] == 'overwrite':
                 chk.SetValue(UserSettings.Get(group='cmd', key='overwrite', subkey='enabled'))
                 

Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-03-06 16:53:58 UTC (rev 30487)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-03-06 17:01:44 UTC (rev 30488)
@@ -80,7 +80,7 @@
             'cmd': {
             'overwrite' : { 'enabled' : False },
             'closeDlg' : { 'enabled' : False },
-            'verbosity' : { 'verbose' : 'grassenv' },
+            'verbosity' : { 'selection' : 'grassenv' },
             },
             #
             # vdigit
@@ -523,12 +523,20 @@
                       pos=(row, 0), span=(1, 2))
         row += 1
         # verbosity
+        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
+                                         label=_("Verbosity level:")),
+                      flag=wx.ALIGN_LEFT |
+                      wx.ALIGN_CENTER_VERTICAL,
+                      pos=(row, 0))
         verbosity = wx.Choice(parent=panel, id=wx.ID_ANY, size=(200, -1),
-                              choices=self.settings.Get(group='general', key='verbosity', subkey='choices', internal=True),
-                              name="GetSelection")
-        mapsetPath.SetSelection(self.settings.Get(group='general', key='mapsetPath', subkey='selection'))
-        self.winId['general:mapsetPath:selection'] = mapsetPath.GetId()
+                              choices=self.settings.Get(group='cmd', key='verbosity', subkey='choices', internal=True),
+                              name="GetStringSelection")
+        verbosity.SetStringSelection(self.settings.Get(group='cmd', key='verbosity', subkey='selection'))
+        self.winId['cmd:verbosity:selection'] = verbosity.GetId()
 
+        gridSizer.Add(item=verbosity,
+                      pos=(row, 1))
+
         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)
 



More information about the grass-commit mailing list