chiark / gitweb /
Fix the splashscreen overlaying on the first run wizard on mac.
authorDaid <Daid303@gmail.com>
Mon, 29 Oct 2012 09:27:13 +0000 (10:27 +0100)
committerDaid <Daid303@gmail.com>
Mon, 29 Oct 2012 09:27:13 +0000 (10:27 +0100)
Cura/cura.py
Cura/gui/mainWindow.py
Cura/gui/splashScreen.py

index 24c43c0ed1405824e8408ce1ae86a392a8365fdf..35fb8f68fc222f20593074d1c6e9781bec7c922f 100644 (file)
@@ -78,9 +78,9 @@ def main():
                from gui import splashScreen
                splashScreen.showSplash(mainWindowRunCallback)
 
-def mainWindowRunCallback():
+def mainWindowRunCallback(splash):
        from gui import mainWindow
-       mainWindow.main()
+       mainWindow.main(splash)
 
 if __name__ == '__main__':
        main()
index ca6cc04d308ec531984e4454d0dcc3d7f654c22e..0c318ec86764d4afb349e9ad48b5661b404c44d2 100644 (file)
@@ -24,7 +24,7 @@ from util import version
 from util import sliceRun
 from util import meshLoader
 
-def main():
+def main(splash):
        #app = wx.App(False)
        if profile.getPreference('machine_type') == 'unknown':
                if platform.system() == "Darwin":
@@ -38,6 +38,7 @@ def main():
                                for filename in glob.glob(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', '*.*'))):
                                        shutil.copy(filename, os.path.join(os.path.dirname(exampleFile), os.path.basename(filename)))
                                profile.putPreference('lastFile', exampleFile)
+               splash.Show(False)
                configWizard.configWizard()
        if profile.getPreference('startMode') == 'Simple':
                simpleMode.simpleModeWindow()
index ee9a94559c19471368a5b69ce3d36883ec5f7e7d..cfa4792b8a0fcb27a8781e82226c508ecfcfed96 100644 (file)
@@ -17,7 +17,7 @@ class splashScreen(wx.SplashScreen):
                wx.CallAfter(self.DoCallback)
        
        def DoCallback(self):
-               self.callback()
+               self.callback(self)
                self.Destroy()
 
 def showSplash(callback):
@@ -25,7 +25,7 @@ def showSplash(callback):
        splashScreen(callback)
        app.MainLoop()
 
-def testCallback():
+def testCallback(splashscreen):
        print "Callback!"
        import time
        time.sleep(2)