[GRASS-SVN] r71341 - in grass/trunk/gui/wxpython: . core

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 8 06:09:46 PDT 2017


Author: martinl
Date: 2017-08-08 06:09:45 -0700 (Tue, 08 Aug 2017)
New Revision: 71341

Modified:
   grass/trunk/gui/wxpython/core/globalvar.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
revert r71332 since it causes GUI startup crash on Debian (wxPython 3.0.2) 


Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2017-08-08 12:39:42 UTC (rev 71340)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2017-08-08 13:09:45 UTC (rev 71341)
@@ -55,17 +55,10 @@
 def CheckWxVersion(version):
     """Check wx version"""
     ver = wx.__version__
-    try:
-        split_ver = ver.split('.')
-        parsed_version = list(map(int, split_ver))
-    except ValueError:
-        # wxPython 4.0.0aX
-        for i, c in enumerate(split_ver[-1]):
-            if not c.isdigit():
-                break
-        parsed_version = list(map(int, split_ver[:-1])) + [int(split_ver[-1][:i])]
-
-    if parsed_version < version:
+    # don't fail on wxPython 4.0.0aX
+    if 'a' in ver: # can be removed when 4.0.0 will be out
+        ver = ver[0:ver.find('a')]
+    if list(map(int, ver.split('.'))) < version:
         return False
 
     return True

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2017-08-08 12:39:42 UTC (rev 71340)
+++ grass/trunk/gui/wxpython/wxgui.py	2017-08-08 13:09:45 UTC (rev 71341)
@@ -77,21 +77,12 @@
                     weight=wx.BOLD))
             splash.SetTextPosition((150, 430))
         else:
-            if globalvar.wxPythonPhoenix:
-                import wx.adv
-                wx.adv.SplashScreen(
-                    bitmap=introBmp,
-                    splashStyle=wx.adv.SPLASH_CENTRE_ON_SCREEN | wx.adv.SPLASH_TIMEOUT,
-                    milliseconds=2000,
-                    parent=None,
-                    id=wx.ID_ANY)
-            else:
-                wx.SplashScreen(
-                    bitmap=introBmp,
-                    splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
-                    milliseconds=2000,
-                    parent=None,
-                    id=wx.ID_ANY)
+            wx.SplashScreen(
+                bitmap=introBmp,
+                splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
+                milliseconds=2000,
+                parent=None,
+                id=wx.ID_ANY)
 
         wx.Yield()
 



More information about the grass-commit mailing list