From 99e504846045ef66f51d52e57f670f2aa8fc30ad Mon Sep 17 00:00:00 2001 From: tatiana Date: Mon, 5 Apr 2010 20:09:35 +0000 Subject: [PATCH] ENH: Splash under Windows --- invesalius/invesalius.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/invesalius/invesalius.py b/invesalius/invesalius.py index 95687c8..9680831 100755 --- a/invesalius/invesalius.py +++ b/invesalius/invesalius.py @@ -26,8 +26,7 @@ import sys if sys.platform == 'win32': import _winreg - -if sys.platform != 'win32': +else: import wxversion wxversion.ensureMinimal('2.8-unicode', optionsRequired=True) wxversion.select('2.8-unicode', optionsRequired=True) @@ -35,6 +34,10 @@ if sys.platform != 'win32': import wx import wx.lib.pubsub as ps import wx.lib.agw.advancedsplash as agw +if sys.platform == 'win32': + _SplashScreen = wx.SpashScreen +else: + _SplashScreen = agw.AdvancedSplash import gui.language_dialog as lang_dlg import i18n @@ -67,7 +70,7 @@ class InVesalius(wx.App): # ------------------------------------------------------------------ -class SplashScreen(agw.AdvancedSplash): +class SplashScreen(_SplashScreen): """ Splash screen to be shown in InVesalius initialization. """ @@ -129,7 +132,7 @@ class SplashScreen(agw.AdvancedSplash): style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ wx.FRAME_SHAPED - agw.AdvancedSplash.__init__(self, + _SplashScreen.__init__(self, bitmap=bmp, style=style, timeout=5000, -- libgit2 0.21.2