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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 24 13:56:38 EDT 2009


Author: martinl
Date: 2009-05-24 13:56:38 -0400 (Sun, 24 May 2009)
New Revision: 37437

Modified:
   grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
wx.PopupWindow fix


Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py	2009-05-24 17:55:29 UTC (rev 37436)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py	2009-05-24 17:56:38 UTC (rev 37437)
@@ -21,7 +21,6 @@
 
 import sys
 import shlex
-import platform
 
 import wx
 import wx.lib.mixins.listctrl as listmix
@@ -48,12 +47,14 @@
 
         ### todo: fix TextCtrlAutoComplete to work also on Macs
         ### reason: missing wx.PopupWindow()
-        if not platform.mac_ver()[0]:
+        try:
             cmdinput = TextCtrlAutoComplete(parent = cmdprompt, id = wx.ID_ANY,
                                             value = "",
                                             style = wx.TE_LINEWRAP | wx.TE_PROCESS_ENTER,
                                             size = (-1, 25))
-        else:
+        except NotImplementedError:
+            # wx.PopupWindow may be not available in wxMac
+            # see http://trac.wxwidgets.org/ticket/9377
             cmdinput = wx.TextCtrl(parent = cmdprompt, id = wx.ID_ANY,
                                    value = "",
                                    style=wx.TE_LINEWRAP | wx.TE_PROCESS_ENTER,



More information about the grass-commit mailing list