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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 27 14:12:15 EDT 2008


Author: martinl
Date: 2008-07-27 14:12:15 -0400 (Sun, 27 Jul 2008)
New Revision: 32342

Modified:
   grass/trunk/gui/wxpython/gui_modules/globalvar.py
Log:
wxGUI: call wxversion.select() just once at the beginning

Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py	2008-07-27 17:26:08 UTC (rev 32341)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py	2008-07-27 18:12:15 UTC (rev 32342)
@@ -23,8 +23,15 @@
 import gettext
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
 
+# wxversion.select() called once at the beginning
+check = True
+
 def CheckForWx():
     """Try to import wx module and check its version"""
+    global check
+    if not check:
+        return
+    
     minVersion = [2, 8, 1, 1]
     try:
         import wxversion
@@ -42,6 +49,8 @@
         print >> sys.stderr, "Unable to set locale:", e
         os.environ['LC_ALL'] = ''
 
+    check = False
+
 CheckForWx()
 import wx
 import wx.lib.flatnotebook as FN



More information about the grass-commit mailing list