Fix the splashscreen overlaying on the first run wizard on mac.

master
Daid 2012-10-29 10:27:13 +01:00
parent e662a4214f
commit afd27022de
3 changed files with 6 additions and 5 deletions

View 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()

View 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()

View 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)