chiark / gitweb /
Removed splash screen
authorSteven Abadie <steven@alephobjects.com>
Fri, 28 Aug 2015 19:21:47 +0000 (13:21 -0600)
committerSteven Abadie <steven@alephobjects.com>
Fri, 28 Aug 2015 19:21:47 +0000 (13:21 -0600)
We had feedback that the splash screen did not serve much purpose so we removed it until we find a better reason to have it.

Cura/gui/app.py
Cura/gui/splashScreen.py [deleted file]
resources/images/splash.png [deleted file]

index 9e5e8de66dc90e8376f057e1eb98e5397699f432..cd5f399683c9e1c38789afa77cfabd8375a12146 100644 (file)
@@ -24,7 +24,6 @@ class CuraApp(wx.App):
                        super(CuraApp, self).__init__(redirect=False)
 
                self.mainWindow = None
-               self.splash = None
                self.loadFiles = files
 
                if platform.system() == "Darwin":
@@ -55,12 +54,7 @@ class CuraApp(wx.App):
                        socketListener.daemon = True
                        socketListener.start()
 
-               if sys.platform.startswith('darwin'):
-                       #Do not show a splashscreen on OSX, as by Apple guidelines
-                       self.afterSplashCallback()
-               else:
-                       from Cura.gui import splashScreen
-                       self.splash = splashScreen.splashScreen(self.afterSplashCallback)
+               self.afterSplashCallback()
 
        def MacOpenFile(self, path):
                try:
@@ -99,12 +93,6 @@ class CuraApp(wx.App):
                except:
                        pass
 
-       def destroySplashScreen(self):
-               if self.splash is not None:
-                       self.splash.Show(False)
-                       self.splash.Destroy()
-                       self.splash = None
-
        def afterSplashCallback(self):
                #These imports take most of the time and thus should be done after showing the splashscreen
                import webbrowser
@@ -140,13 +128,11 @@ class CuraApp(wx.App):
                        exampleFile = os.path.normpath(os.path.join(resources.resourceBasePath, 'example', 'Rocktopus.stl'))
 
                        self.loadFiles = [exampleFile]
-                       self.destroySplashScreen()
                        configWizard.ConfigWizard()
 
                if profile.getPreference('check_for_updates') == 'True':
                        newVersion = version.checkForNewerVersion()
                        if newVersion is not None:
-                               self.destroySplashScreen()
                                if wx.MessageBox(_("A new version of Cura is available, would you like to download?"), _("New version available"), wx.YES_NO | wx.ICON_INFORMATION) == wx.YES:
                                        webbrowser.open(newVersion)
                                        return
@@ -161,7 +147,6 @@ class CuraApp(wx.App):
                        profile.performVersionUpgrade()
 
                self.mainWindow = mainWindow.mainWindow()
-               self.destroySplashScreen()
                self.SetTopWindow(self.mainWindow)
                self.mainWindow.Show()
                self.mainWindow.OnDropFiles(self.loadFiles)
diff --git a/Cura/gui/splashScreen.py b/Cura/gui/splashScreen.py
deleted file mode 100644 (file)
index a3568a0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-__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 OnClose(self, e):
-               if self.callback:
-                       # Avoid calling the callback twice
-                       cb = self.callback
-                       self.callback = None
-                       # The callback will destroy us
-                       wx.CallAfter(cb)
-
-               e.Skip()
diff --git a/resources/images/splash.png b/resources/images/splash.png
deleted file mode 100644 (file)
index b95c6a4..0000000
Binary files a/resources/images/splash.png and /dev/null differ