From 1e46eb3751f357f64001e2c48ae5d74eef6e8420 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Tue, 27 Oct 2020 22:11:24 +0100 Subject: [PATCH] Upgrading further parts to wxPython4. --- gui/Gui/Scytherthread.py | 2 +- gui/scyther-gui.py | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gui/Gui/Scytherthread.py b/gui/Gui/Scytherthread.py index 89d0d92..9db1391 100644 --- a/gui/Gui/Scytherthread.py +++ b/gui/Gui/Scytherthread.py @@ -185,7 +185,7 @@ class VerificationWindow(wx.Dialog): sizer.Add(label, 0, wx.ALIGN_CENTRE|wx.ALL, 5) line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL) - sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5) + sizer.Add(line, 0, wx.GROW|wx.RIGHT|wx.TOP, 5) btnsizer = wx.StdDialogButtonSizer() diff --git a/gui/scyther-gui.py b/gui/scyther-gui.py index 863f35b..c292b32 100755 --- a/gui/scyther-gui.py +++ b/gui/scyther-gui.py @@ -94,6 +94,19 @@ The exact error was: #--------------------------------------------------------------------------- +global WXPYTHON4 +global WXPYTHONINFREQ +WXPYTHON4 = False +WXPYTHONINFREQ = wx + +try: + import wx.adv + + WXPYTHON4 = True + WXPYTHONINFREQ = wx.adv +except ImportError: + pass + """ import externals """ import sys import os @@ -139,7 +152,7 @@ def parseArgs(): #--------------------------------------------------------------------------- -class MySplashScreen(wx.adv.SplashScreen): +class MySplashScreen(WXPYTHONINFREQ.SplashScreen): def __init__(self,basedir): path = os.path.join(basedir,"Images") image = os.path.join(path,"scyther-splash.png")