aboutsummaryrefslogtreecommitdiff
path: root/DWA140Menu/ViewController.swift
diff options
context:
space:
mode:
authorFivePixels <o5pxels@gmail.com>2019-01-07 18:34:24 -0600
committerFivePixels <o5pxels@gmail.com>2019-01-07 18:34:24 -0600
commitd292e75f5828b110ce7fde71ea941e9575326b1e (patch)
tree7e75e59ad6e2074d1dae46534e9423fa5c8c7de7 /DWA140Menu/ViewController.swift
parented4852501935cf85ebded5f58d0092925e38082a (diff)
downloaddwa140shortcut-d292e75f5828b110ce7fde71ea941e9575326b1e.tar.xz
dwa140shortcut-d292e75f5828b110ce7fde71ea941e9575326b1e.zip
LaunchAtLogin support is here :)
Diffstat (limited to 'DWA140Menu/ViewController.swift')
-rw-r--r--DWA140Menu/ViewController.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/DWA140Menu/ViewController.swift b/DWA140Menu/ViewController.swift
index ea3fe55..16968a0 100644
--- a/DWA140Menu/ViewController.swift
+++ b/DWA140Menu/ViewController.swift
@@ -6,6 +6,7 @@
//
import Cocoa
+import LaunchAtLogin
class ViewController: NSViewController {
@@ -30,6 +31,11 @@ class ViewController: NSViewController {
loginButton.state = !loginLaunch ? .on : .off
defaults.set(!loginLaunch, forKey: "loginLaunch")
loginLaunch = !loginLaunch
+ if loginLaunch {
+ LaunchAtLogin.isEnabled = true
+ } else {
+ LaunchAtLogin.isEnabled = false
+ }
}
@IBAction func loginButtonPressed(_ sender: NSButton) {