[GRASS-SVN] r53660 - grass/branches/develbranch_6/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 2 04:57:17 PDT 2012
Author: martinl
Date: 2012-11-02 04:57:17 -0700 (Fri, 02 Nov 2012)
New Revision: 53660
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py
grass/branches/develbranch_6/gui/wxpython/gui_core/menu.py
Log:
wxGUI: fix OnSearchModule (SearchModuleWindow)
(merge r53659 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py 2012-11-02 11:55:23 UTC (rev 53659)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py 2012-11-02 11:57:17 UTC (rev 53660)
@@ -92,15 +92,15 @@
gridSizer.Add(item = self.search,
flag = wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, pos = (0, 1))
row = 1
+ if self.showChoice:
+ gridSizer.Add(item = self.searchChoice,
+ flag = wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, pos = (row, 0), span = (1, 2))
+ row += 1
if self.showTip:
gridSizer.Add(item = self.searchTip,
flag = wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, pos = (row, 0), span = (1, 2))
row += 1
- if self.showChoice:
- gridSizer.Add(item = self.searchChoice,
- flag = wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, pos = (row, 0), span = (1, 2))
-
sizer.Add(item = gridSizer, proportion = 1)
self.SetSizer(sizer)
@@ -126,7 +126,7 @@
event.Skip()
return
- text = event.GetString()
+ text = event.GetEventObject().GetValue()
if not text:
self.cmdPrompt.SetFilter(None)
mList = self.cmdPrompt.GetCommandItems()
@@ -164,8 +164,9 @@
self.cmdPrompt.SetFilter(modules)
self.searchChoice.SetItems(self.cmdPrompt.GetCommandItems())
+ self.searchChoice.SetSelection(0)
if self.showTip:
- self.searchTip.SetLabel(_("%d modules found") % iFound)
+ self.searchTip.SetLabel(_("%d modules match") % iFound)
event.Skip()
@@ -174,7 +175,7 @@
cmd = event.GetString().split(' ', 1)[0]
text = cmd + ' '
pos = len(text)
-
+
if self.cmdPrompt:
self.cmdPrompt.SetText(text)
self.cmdPrompt.SetSelectionStart(pos)
@@ -184,7 +185,7 @@
desc = self.cmdPrompt.GetCommandDesc(cmd)
if self.showTip:
self.searchTip.SetLabel(desc)
-
+
def Reset(self):
"""!Reset widget"""
self.searchBy.SetSelection(0)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/menu.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/menu.py 2012-11-02 11:55:23 UTC (rev 53659)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/menu.py 2012-11-02 11:57:17 UTC (rev 53660)
@@ -149,9 +149,8 @@
self.btnRun.Bind(wx.EVT_BUTTON, self.OnRun)
self.tree.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnItemActivated)
self.tree.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnItemSelected)
-# self.search.GetCtrl().Bind(wx.EVT_TEXT_ENTER, self.OnShowItem)
- self.search.GetCtrl().Bind(wx.EVT_TEXT, self.OnUpdateStatusBar)
- self.search.GetCtrl().Bind(wx.EVT_KEY_UP, self.OnKeyUp)
+ self.search.GetCtrl().Bind(wx.EVT_TEXT, self.OnUpdateStatusBar)
+ self.search.GetCtrl().Bind(wx.EVT_KEY_UP, self.OnKeyUp)
self._layout()
More information about the grass-commit
mailing list