diff options
author | Grant Limberg <glimberg@gmail.com> | 2016-07-26 20:04:59 -0700 |
---|---|---|
committer | Grant Limberg <glimberg@gmail.com> | 2016-07-26 20:04:59 -0700 |
commit | 36a9aff2836da56f2d6eadf832f0272d89e4ecac (patch) | |
tree | 4ddf7234b4b5ed42602a93a616c705874943184f | |
parent | e1755e569e6b8f1e94259fc2e8355579acc0ef70 (diff) | |
download | infinitytier-36a9aff2836da56f2d6eadf832f0272d89e4ecac.tar.gz infinitytier-36a9aff2836da56f2d6eadf832f0272d89e4ecac.zip |
Show "About" view on first run.
Still needs some work to show up in the right place
-rw-r--r-- | ZeroTier One/AppDelegate.swift | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ZeroTier One/AppDelegate.swift b/ZeroTier One/AppDelegate.swift index 584b54ae..224f4d24 100644 --- a/ZeroTier One/AppDelegate.swift +++ b/ZeroTier One/AppDelegate.swift @@ -38,8 +38,9 @@ class AppDelegate: NSObject, NSApplicationDelegate { let defaultsDict = ["firstRun": true] defaults.registerDefaults(defaultsDict) + let firstRun = defaults.boolForKey("firstRun") - if defaults.boolForKey("firstRun") { + if firstRun { defaults.setBool(false, forKey: "firstRun") defaults.synchronize() @@ -78,6 +79,12 @@ class AppDelegate: NSObject, NSApplicationDelegate { aboutPopover.contentViewController = AboutViewController( nibName: "AboutViewController", bundle: nil) aboutPopover.behavior = .Transient + + if firstRun { + NSOperationQueue.mainQueue().addOperationWithBlock() { + self.showAbout() + } + } } func applicationWillTerminate(aNotification: NSNotification) { |