def checkNowCallback(self, sender): from drawBot.updater import Updater oldValue = getDefault("DrawBotCheckForUpdatesAtStartup", True) setDefault("DrawBotCheckForUpdatesAtStartup", True) updater = Updater(self.w) if not updater.needsUpdate: self.showMessage("You have the latest version!", "DrawBot %s is currently the newest version" % updater.__version__) setDefault("DrawBotCheckForUpdatesAtStartup", oldValue)
def applicationDidFinishLaunching_(self, notification): self._debugger = DebugWindowController() Updater() if sys.argv[1:]: import re pat = re.compile("--testScript=(.*)") for arg in sys.argv[1:]: m = pat.match(arg) if m is None: continue testScript = m.group(1) self._runTestScript_(testScript) AppKit.NSApp().terminate_(None)
def applicationDidFinishLaunching_(self, notification): retrieveCheckEventQueueForUserCancelFromCarbon() self._debugger = DebugWindowController() Updater() if sys.argv[1:]: import re pat = re.compile("--testScript=(.*)") for arg in sys.argv[1:]: m = pat.match(arg) if m is None: continue AppKit.NSApp().activateIgnoringOtherApps_(True) testScript = m.group(1) self.performSelector_withObject_afterDelay_("_runTestScript:", testScript, 0.25)
def checkNowCallback(self, sender): from drawBot.updater import Updater oldValue = getDefault("DrawBotCheckForUpdatesAtStartup", True) setDefault("DrawBotCheckForUpdatesAtStartup", True) updater = Updater(self.w) if updater.currentVersionErrors: self.showMessage( "Cannot retrieve the version number from the DrawBot repository.", "\n".join(updater.currentVersionErrors)) elif not updater.needsUpdate: self.showMessage( "You have the latest version!", "DrawBot %s is currently the newest version" % updater.__version__) setDefault("DrawBotCheckForUpdatesAtStartup", oldValue)
def applicationDidFinishLaunching_(self, notification): self._debugger = DebugWindowController() Updater()