[GRASS-SVN] r42232 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 12 04:22:29 EDT 2010
Author: martinl
Date: 2010-05-12 04:22:26 -0400 (Wed, 12 May 2010)
New Revision: 42232
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI: fix search module engine
(merge r42231 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py 2010-05-12 08:07:52 UTC (rev 42231)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py 2010-05-12 08:22:26 UTC (rev 42232)
@@ -157,12 +157,16 @@
iFound = 0
for module, data in self.cmdPrompt.moduleDesc.iteritems():
found = False
- if self.searchBy.GetSelection() == 0: # -> description
+ sel = self.searchBy.GetSelection()
+ if sel == 0: # -> description
if text in data['desc']:
found = True
- else: # -> keywords
+ elif sel == 1: # keywords
if self.cmdPrompt.CheckKey(text, data['keywords']):
found = True
+ else: # command
+ if text in module:
+ found = True
if found:
iFound += 1
@@ -176,9 +180,9 @@
modules[group].append(name)
self.cmdPrompt.SetFilter(modules)
+ self.searchChoice.SetItems(self.cmdPrompt.GetCommandItems())
if self.showTip:
self.searchTip.SetLabel(_("%d modules found") % iFound)
- self.searchChoice.SetItems(self.cmdPrompt.GetCommandItems())
event.Skip()
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py 2010-05-12 08:07:52 UTC (rev 42231)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py 2010-05-12 08:22:26 UTC (rev 42232)
@@ -556,7 +556,7 @@
"""!Get list of available commands"""
items = list()
- if self.autoCompFilter:
+ if self.autoCompFilter is not None:
mList = self.autoCompFilter
else:
mList = self.moduleList
More information about the grass-commit
mailing list