[GRASS-SVN] r37421 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 24 09:58:07 EDT 2009
Author: martinl
Date: 2009-05-24 09:58:07 -0400 (Sun, 24 May 2009)
New Revision: 37421
Modified:
grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI: disable autocomplete prompt mode on Mac
reason: missing wx.PopupWindow() on this platform
Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py 2009-05-24 13:49:34 UTC (rev 37420)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py 2009-05-24 13:58:07 UTC (rev 37421)
@@ -8,6 +8,9 @@
- PromptListCtrl
- TextCtrlAutoComplete
+ at todo: fix TextCtrlAutoComplete to work also on Macs (missing
+wx.PopupWindow())
+
(C) 2009 by the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
@@ -18,6 +21,7 @@
import sys
import shlex
+import platform
import wx
import wx.lib.mixins.listctrl as listmix
@@ -41,12 +45,20 @@
label = wx.Button(parent = cmdprompt, id = wx.ID_ANY,
label = _("Cmd >"), size = (-1, 25))
label.SetToolTipString(_("Click for erasing command prompt"))
+
+ ### todo: fix TextCtrlAutoComplete to work also on Macs
+ ### reason: missing wx.PopupWindow()
+ if not platform.mac_ver()[0]:
+ cmdinput = TextCtrlAutoComplete(parent = cmdprompt, id = wx.ID_ANY,
+ value = "",
+ style = wx.TE_LINEWRAP | wx.TE_PROCESS_ENTER,
+ size = (-1, 25))
+ else:
+ cmdinput = wx.TextCtrl(parent = cmdprompt, id = wx.ID_ANY,
+ value = "",
+ style=wx.TE_LINEWRAP | wx.TE_PROCESS_ENTER,
+ size = (-1, 25))
- cmdinput = TextCtrlAutoComplete(parent = cmdprompt, id = wx.ID_ANY,
- value = "",
- style = wx.TE_LINEWRAP | wx.TE_PROCESS_ENTER,
- size = (-1, 25))
-
cmdinput.SetFont(wx.Font(10, wx.FONTFAMILY_MODERN, wx.NORMAL, wx.NORMAL, 0, ''))
wx.CallAfter(cmdinput.SetInsertionPoint, 0)
More information about the grass-commit
mailing list