[GRASS-SVN] r37424 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 24 10:08:45 EDT 2009
Author: martinl
Date: 2009-05-24 10:08:45 -0400 (Sun, 24 May 2009)
New Revision: 37424
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI/prompt: parse only GRASS modules
(merge from trunk, r37423)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py 2009-05-24 14:06:59 UTC (rev 37423)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py 2009-05-24 14:08:45 UTC (rev 37424)
@@ -355,21 +355,23 @@
pattern = str(text)
if len(cmd) > 1:
# search for module's options
- if not self._module:
+ if cmd[0] in self._choicesCmd and not self._module:
self._module = menuform.GUI().ParseInterface(cmd = cmd)
- if len(cmd[-1].split('=', 1)) == 1:
- # new option
- if cmd[-1][0] == '-':
- # -> flags
- self.SetChoices(self._module.get_list_flags(), type = 'flag')
- pattern = cmd[-1].lstrip('-')
+
+ if self._module:
+ if len(cmd[-1].split('=', 1)) == 1:
+ # new option
+ if cmd[-1][0] == '-':
+ # -> flags
+ self.SetChoices(self._module.get_list_flags(), type = 'flag')
+ pattern = cmd[-1].lstrip('-')
+ else:
+ # -> options
+ self.SetChoices(self._module.get_list_params(), type = 'param')
+ pattern = cmd[-1]
else:
- # -> options
- self.SetChoices(self._module.get_list_params(), type = 'param')
- pattern = cmd[-1]
- else:
- # value
- pattern = cmd[-1].split('=', 1)[1]
+ # value
+ pattern = cmd[-1].split('=', 1)[1]
else:
# search for GRASS modules
if self._module:
More information about the grass-commit
mailing list