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 from gui import splashScreen
splashScreen.showSplash(mainWindowRunCallback) splashScreen.showSplash(mainWindowRunCallback)
def mainWindowRunCallback(): def mainWindowRunCallback(splash):
from gui import mainWindow from gui import mainWindow
mainWindow.main() mainWindow.main(splash)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -24,7 +24,7 @@ from util import version
from util import sliceRun from util import sliceRun
from util import meshLoader from util import meshLoader
def main(): def main(splash):
#app = wx.App(False) #app = wx.App(False)
if profile.getPreference('machine_type') == 'unknown': if profile.getPreference('machine_type') == 'unknown':
if platform.system() == "Darwin": 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', '*.*'))): 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))) shutil.copy(filename, os.path.join(os.path.dirname(exampleFile), os.path.basename(filename)))
profile.putPreference('lastFile', exampleFile) profile.putPreference('lastFile', exampleFile)
splash.Show(False)
configWizard.configWizard() configWizard.configWizard()
if profile.getPreference('startMode') == 'Simple': if profile.getPreference('startMode') == 'Simple':
simpleMode.simpleModeWindow() simpleMode.simpleModeWindow()

View File

@ -17,7 +17,7 @@ class splashScreen(wx.SplashScreen):
wx.CallAfter(self.DoCallback) wx.CallAfter(self.DoCallback)
def DoCallback(self): def DoCallback(self):
self.callback() self.callback(self)
self.Destroy() self.Destroy()
def showSplash(callback): def showSplash(callback):
@ -25,7 +25,7 @@ def showSplash(callback):
splashScreen(callback) splashScreen(callback)
app.MainLoop() app.MainLoop()
def testCallback(): def testCallback(splashscreen):
print "Callback!" print "Callback!"
import time import time
time.sleep(2) time.sleep(2)