Added watch mode
This commit is contained in:
@@ -157,45 +157,6 @@ def parseArgs():
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class MySplashScreen(WXPYTHONINFREQ.SplashScreen):
|
||||
def __init__(self,basedir):
|
||||
path = os.path.join(basedir,"Images")
|
||||
image = os.path.join(path,"scyther-splash.png")
|
||||
bmp = wx.Image(image).ConvertToBitmap()
|
||||
wx.SplashScreen.__init__(self, bmp,
|
||||
wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
|
||||
5000, None, -1)
|
||||
self.Bind(wx.EVT_CLOSE, self.OnClose)
|
||||
self.fc = wx.FutureCall(2000, self.ShowMain)
|
||||
|
||||
def OnClose(self, evt):
|
||||
# Make sure the default handler runs too so this window gets
|
||||
# destroyed
|
||||
evt.Skip()
|
||||
self.Hide()
|
||||
|
||||
# if the timer is still running then go ahead and show the
|
||||
# main frame now
|
||||
if self.fc.IsRunning():
|
||||
self.fc.Stop()
|
||||
self.ShowMain()
|
||||
|
||||
|
||||
def ShowMain(self):
|
||||
if self.fc.IsRunning():
|
||||
self.Raise()
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def isSplashNeeded(opts):
|
||||
if not opts.command:
|
||||
if opts.splashscreen and not (Preference.get('splashscreen') in ['false','off','disable','0']):
|
||||
return True
|
||||
return False
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class ScytherApp(wx.App):
|
||||
def OnInit(self):
|
||||
import os, inspect
|
||||
@@ -232,11 +193,6 @@ class ScytherApp(wx.App):
|
||||
self.SetTopWindow(self.mainWindow)
|
||||
self.mainWindow.Show()
|
||||
|
||||
if isSplashNeeded(opts):
|
||||
dlg = About.AboutScyther(self.mainWindow,basedir)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
return True
|
||||
|
||||
#def OnExit(self):
|
||||
|
||||
Reference in New Issue
Block a user