From: Steven Abadie Date: Fri, 28 Aug 2015 19:21:47 +0000 (-0600) Subject: Removed splash screen X-Git-Tag: lulzbot-15.02.1-2.04~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a9071456ab12e31eeec6b8e41dabf323774ca969;p=cura.git Removed splash screen 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. --- diff --git a/Cura/gui/app.py b/Cura/gui/app.py index 9e5e8de6..cd5f3996 100644 --- a/Cura/gui/app.py +++ b/Cura/gui/app.py @@ -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 index a3568a0d..00000000 --- a/Cura/gui/splashScreen.py +++ /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 index b95c6a44..00000000 Binary files a/resources/images/splash.png and /dev/null differ