Commit 99e504846045ef66f51d52e57f670f2aa8fc30ad
1 parent
3599f736
Exists in
master
and in
6 other branches
ENH: Splash under Windows
Showing
1 changed file
with
7 additions
and
4 deletions
Show diff stats
invesalius/invesalius.py
... | ... | @@ -26,8 +26,7 @@ import sys |
26 | 26 | |
27 | 27 | if sys.platform == 'win32': |
28 | 28 | import _winreg |
29 | - | |
30 | -if sys.platform != 'win32': | |
29 | +else: | |
31 | 30 | import wxversion |
32 | 31 | wxversion.ensureMinimal('2.8-unicode', optionsRequired=True) |
33 | 32 | wxversion.select('2.8-unicode', optionsRequired=True) |
... | ... | @@ -35,6 +34,10 @@ if sys.platform != 'win32': |
35 | 34 | import wx |
36 | 35 | import wx.lib.pubsub as ps |
37 | 36 | import wx.lib.agw.advancedsplash as agw |
37 | +if sys.platform == 'win32': | |
38 | + _SplashScreen = wx.SpashScreen | |
39 | +else: | |
40 | + _SplashScreen = agw.AdvancedSplash | |
38 | 41 | |
39 | 42 | import gui.language_dialog as lang_dlg |
40 | 43 | import i18n |
... | ... | @@ -67,7 +70,7 @@ class InVesalius(wx.App): |
67 | 70 | |
68 | 71 | # ------------------------------------------------------------------ |
69 | 72 | |
70 | -class SplashScreen(agw.AdvancedSplash): | |
73 | +class SplashScreen(_SplashScreen): | |
71 | 74 | """ |
72 | 75 | Splash screen to be shown in InVesalius initialization. |
73 | 76 | """ |
... | ... | @@ -129,7 +132,7 @@ class SplashScreen(agw.AdvancedSplash): |
129 | 132 | |
130 | 133 | style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ |
131 | 134 | wx.FRAME_SHAPED |
132 | - agw.AdvancedSplash.__init__(self, | |
135 | + _SplashScreen.__init__(self, | |
133 | 136 | bitmap=bmp, |
134 | 137 | style=style, |
135 | 138 | timeout=5000, | ... | ... |