[GRASS-SVN] r32343 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 27 14:14:03 EDT 2008
Author: martinl
Date: 2008-07-27 14:14:03 -0400 (Sun, 27 Jul 2008)
New Revision: 32343
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
Log:
wxGUI: call wxversion.select() just once at the beginning (merged from trunk r32342)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py 2008-07-27 18:12:15 UTC (rev 32342)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py 2008-07-27 18:14:03 UTC (rev 32343)
@@ -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