Commit 99e504846045ef66f51d52e57f670f2aa8fc30ad
1 parent
3599f736
Exists in
master
and in
68 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,8 +26,7 @@ import sys | ||
| 26 | 26 | ||
| 27 | if sys.platform == 'win32': | 27 | if sys.platform == 'win32': |
| 28 | import _winreg | 28 | import _winreg |
| 29 | - | ||
| 30 | -if sys.platform != 'win32': | 29 | +else: |
| 31 | import wxversion | 30 | import wxversion |
| 32 | wxversion.ensureMinimal('2.8-unicode', optionsRequired=True) | 31 | wxversion.ensureMinimal('2.8-unicode', optionsRequired=True) |
| 33 | wxversion.select('2.8-unicode', optionsRequired=True) | 32 | wxversion.select('2.8-unicode', optionsRequired=True) |
| @@ -35,6 +34,10 @@ if sys.platform != 'win32': | @@ -35,6 +34,10 @@ if sys.platform != 'win32': | ||
| 35 | import wx | 34 | import wx |
| 36 | import wx.lib.pubsub as ps | 35 | import wx.lib.pubsub as ps |
| 37 | import wx.lib.agw.advancedsplash as agw | 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 | import gui.language_dialog as lang_dlg | 42 | import gui.language_dialog as lang_dlg |
| 40 | import i18n | 43 | import i18n |
| @@ -67,7 +70,7 @@ class InVesalius(wx.App): | @@ -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 | Splash screen to be shown in InVesalius initialization. | 75 | Splash screen to be shown in InVesalius initialization. |
| 73 | """ | 76 | """ |
| @@ -129,7 +132,7 @@ class SplashScreen(agw.AdvancedSplash): | @@ -129,7 +132,7 @@ class SplashScreen(agw.AdvancedSplash): | ||
| 129 | 132 | ||
| 130 | style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ | 133 | style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ |
| 131 | wx.FRAME_SHAPED | 134 | wx.FRAME_SHAPED |
| 132 | - agw.AdvancedSplash.__init__(self, | 135 | + _SplashScreen.__init__(self, |
| 133 | bitmap=bmp, | 136 | bitmap=bmp, |
| 134 | style=style, | 137 | style=style, |
| 135 | timeout=5000, | 138 | timeout=5000, |