beremiz
Clone
Summary
Browse
Changes
Graph
enable use of wxWidgets-3.0
2016-04-18, Andrey Skvortsov
004f9c52f7d8
Parents
5d4543ee5a5d
Children
d5efbb20927e
enable use of wxWidgets-3.0
1 files changed, 8 insertions(+), 3 deletions(-)
+8
-3
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()