enable use of wxWidgets-3.0
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 18 Apr 2016 19:18:11 +0300
changeset 1483 004f9c52f7d8
parent 1482 5d4543ee5a5d
child 1484 d5efbb20927e
enable use of wxWidgets-3.0
Beremiz.py
--- a/Beremiz.py	Mon Apr 18 19:17:22 2016 +0300
+++ b/Beremiz.py	Mon Apr 18 19:18:11 2016 +0300
@@ -36,7 +36,7 @@
 beremiz_dir = os.path.dirname(os.path.realpath(__file__))
 
 import wxversion
-wxversion.select('2.8')
+wxversion.select(['2.8', '3.0'])
 import wx
 from wx.lib.agw.advancedsplash import AdvancedSplash
 
@@ -84,9 +84,14 @@
     else :
         __builtin__.__dict__["BMZ_DBG"] = False
 
-    app = wx.PySimpleApp(redirect=BMZ_DBG)
+    if wx.VERSION >= (3, 0, 0):
+        app = wx.App(redirect=BMZ_DBG)
+    else:
+        app = wx.PySimpleApp(redirect=BMZ_DBG)
+
     app.SetAppName('beremiz')
-    wx.InitAllImageHandlers()
+    if wx.VERSION < (3, 0, 0):
+	wx.InitAllImageHandlers()
 
     # popup splash
     bmp = wx.Image(Bpath("images", "splash.png")).ConvertToBitmap()