old_contents: __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
  
  import wx._core #We only need the core here, which speeds up the import. As we want to show the splashscreen ASAP.
  
  from Cura.util.resources import getPathForImage
  
  class splashScreen(wx.SplashScreen):
  	def __init__(self, callback):
  		self.callback = callback
  		bitmap = wx.Bitmap(getPathForImage('splash.png'))
  		super(splashScreen, self).__init__(bitmap, wx.SPLASH_CENTRE_ON_SCREEN, 0, None)
  		wx.CallAfter(self.DoCallback)
  
  	def DoCallback(self):
  		self.callback()
  		self.Destroy()
  
new_contents: __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
  
  import wx._core #We only need the core here, which speeds up the import. As we want to show the splashscreen ASAP.
  
  from Cura.util.resources import getPathForImage
  
  class splashScreen(wx.SplashScreen):
  	def __init__(self, callback):
  		self.callback = callback
  		bitmap = wx.Bitmap(getPathForImage('splash.png'))
  		super(splashScreen, self).__init__(bitmap, wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, 100, None)
  		# Add a timeout and call the callback in the close event to avoid having the callback called
  		# before the splashscreen paint events which could cause it not to appear or to appear as a grey
  		# rectangle while the app is loading
  		self.Bind(wx.EVT_CLOSE, self.OnClose)
  
  	def DoDestroy(self):
  		self.Destroy()
  
  	def OnClose(self, e):
  		if self.callback:
  				# Avoid calling the callback twice
  				self.callback()
  				self.callback = None
  		wx.CallAfter(self.DoDestroy)
  
subject: Add a 100ms timeout to the splash screen to allow it to show Without it, the callback would get called before the splash screen events got processed (such as Paint?) which will cause the splash screen not to appear or to appear as a grey rectangle without the image This could potentially fix issue #14