[GRASS-SVN] r44281 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 9 08:28:58 EST 2010


Author: martinl
Date: 2010-11-09 05:28:58 -0800 (Tue, 09 Nov 2010)
New Revision: 44281

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: interactive input can be optionally disabled


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-11-09 11:46:12 UTC (rev 44280)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-11-09 13:28:58 UTC (rev 44281)
@@ -1561,8 +1561,8 @@
                     # a textctl and a button;
                     # we have to target the button here
                     p['wxId'] = [ fbb.GetChildren()[1].GetId() ]
-
-                    if p.get('age', 'new_file') == 'old_file':
+                    if p.get('age', 'new_file') == 'old_file' and \
+                            UserSettings.Get(group='cmd', key='interactiveInput', subkey='enabled'):
                         # widget for interactive input
                         ifbb = wx.TextCtrl(parent = which_panel, id = wx.ID_ANY,
                                            style = wx.TE_MULTILINE,

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2010-11-09 11:46:12 UTC (rev 44280)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2010-11-09 13:28:58 UTC (rev 44281)
@@ -227,6 +227,9 @@
                 'addNewLayer' : {
                     'enabled' : True,
                     },
+                'interactiveInput' : {
+                    'enabled' : True,
+                    },
                 },
             #
             # Workspace
@@ -1403,10 +1406,21 @@
                           name="IsChecked")
         add.SetValue(self.settings.Get(group='cmd', key='addNewLayer', subkey='enabled'))
         self.winId['cmd:addNewLayer:enabled'] = add.GetId()
-        
+    
         gridSizer.Add(item=add,
                       pos=(row, 0), span=(1, 2))
+        
         row += 1
+        # interactive input
+        interactive = wx.CheckBox(parent = panel, id = wx.ID_ANY,
+                                  label = _("Allow interactive input"),
+                                  name = "IsChecked")
+        interactive.SetValue(self.settings.Get(group='cmd', key='interactiveInput', subkey='enabled'))
+        self.winId['cmd:interactiveInput:enabled'] = interactive.GetId()
+        gridSizer.Add(item = interactive,
+                      pos = (row, 0), span = (1, 2))
+        
+        row += 1
         # verbosity
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Verbosity level:")),



More information about the grass-commit mailing list