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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 21 08:32:14 EDT 2011


Author: martinl
Date: 2011-07-21 05:32:14 -0700 (Thu, 21 Jul 2011)
New Revision: 47205

Modified:
   grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI: define missing SetFilter for GPrompt


Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py	2011-07-21 12:07:07 UTC (rev 47204)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py	2011-07-21 12:32:14 UTC (rev 47205)
@@ -500,7 +500,6 @@
         self.cmdDesc = None
         self.cmdbuffer = self._readHistory()
         self.cmdindex = len(self.cmdbuffer)
-
         
     def _readHistory(self):
         """!Get list of commands from history file"""
@@ -627,6 +626,22 @@
         """!Get main prompt widget"""
         return self.input
     
+    def SetFilter(self, data, module = True):
+        """!Set filter
+
+        @param module True to filter modules, otherwise data
+        """
+        if module:
+            if data:
+                self.moduleList = data
+            else:
+                self.moduleList = self._getListOfModules()
+        else:
+            if data:
+                self.dataList = data
+            else:
+                self.dataList = self._getListOfMaps()
+        
 class GPromptPopUp(GPrompt, TextCtrlAutoComplete):
     """!Interactive wxGUI prompt - popup version"""
     def __init__(self, parent):



More information about the grass-commit mailing list