Browse Source

wxGUI: define missing SetFilter for GPrompt

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47205 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 years ago
parent
commit
9e05c39104
1 changed files with 16 additions and 1 deletions
  1. 16 1
      gui/wxpython/gui_modules/prompt.py

+ 16 - 1
gui/wxpython/gui_modules/prompt.py

@@ -500,7 +500,6 @@ class GPrompt(object):
         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 @@ class GPrompt(object):
         """!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):