Commit 07b8c8d2f7a769f719247109ceba5b0c1fc6bc92

Authored by tatiana
1 parent 99e50484

FIX: Splash under Windows

Showing 1 changed file with 13 additions and 4 deletions   Show diff stats
invesalius/invesalius.py
... ... @@ -34,10 +34,10 @@ else:
34 34 import wx
35 35 import wx.lib.pubsub as ps
36 36 import wx.lib.agw.advancedsplash as agw
37   -if sys.platform == 'win32':
38   - _SplashScreen = wx.SpashScreen
39   -else:
  37 +if sys.platform == 'linux2':
40 38 _SplashScreen = agw.AdvancedSplash
  39 +else:
  40 + _SplashScreen = wx.SplashScreen
41 41  
42 42 import gui.language_dialog as lang_dlg
43 43 import i18n
... ... @@ -132,12 +132,21 @@ class SplashScreen(_SplashScreen):
132 132  
133 133 style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\
134 134 wx.FRAME_SHAPED
135   - _SplashScreen.__init__(self,
  135 + if sys.platform == 'linux2':
  136 + _SplashScreen.__init__(self,
136 137 bitmap=bmp,
137 138 style=style,
138 139 timeout=5000,
139 140 id=-1,
140 141 parent=None)
  142 + else:
  143 + _SplashScreen.__init__(self,
  144 + bitmap=bmp,
  145 + splashStyle=style,
  146 + milliseconds=5000,
  147 + id=-1,
  148 + parent=None)
  149 +
141 150  
142 151 self.Bind(wx.EVT_CLOSE, self.OnClose)
143 152  
... ...