From dcad77919ff5d188daf1bf07e545d3703811b4dd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 1 Dec 2016 13:50:59 -0500 Subject: Add a checkbox to the UI for whether to start at login This will enable and disable the daemon and set whether or not it starts at login. --- Low Battery Yup/AppDelegate.h | 1 + Low Battery Yup/en.lproj/MainMenu.xib | 70 ++++++++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/Low Battery Yup/AppDelegate.h b/Low Battery Yup/AppDelegate.h index 3998e46..395ce9a 100644 --- a/Low Battery Yup/AppDelegate.h +++ b/Low Battery Yup/AppDelegate.h @@ -13,6 +13,7 @@ @interface AppDelegate : NSObject { IBOutlet NSWindow *window; IBOutlet ShortcutView *_shortcut_view; + IBOutlet NSButton *_start_at_login; } @end diff --git a/Low Battery Yup/en.lproj/MainMenu.xib b/Low Battery Yup/en.lproj/MainMenu.xib index 4b01316..e649cab 100644 --- a/Low Battery Yup/en.lproj/MainMenu.xib +++ b/Low Battery Yup/en.lproj/MainMenu.xib @@ -11,6 +11,8 @@ 2844 + NSButton + NSButtonCell NSCustomObject NSCustomView NSMenu @@ -1311,9 +1313,45 @@ {{84, 83}, {313, 19}} + _NS:9 ShortcutView + + + 268 + {{82, 32}, {104, 18}} + + + _NS:9 + YES + + -2080374784 + 268435456 + Start at login + + LucidaGrande + 13 + 1044 + + _NS:9 + + 1211912448 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + NO + {480, 185} @@ -2022,6 +2060,14 @@ 541 + + + _start_at_login + + + + 544 + @@ -2548,6 +2594,7 @@ + @@ -3029,6 +3076,19 @@ + + 542 + + + + + + + + 543 + + + @@ -3175,6 +3235,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3194,7 +3256,7 @@ - 541 + 544 @@ -3203,6 +3265,7 @@ NSObject ShortcutView + NSButton MASShortcutView NSTextField NSWindow @@ -3212,6 +3275,10 @@ _shortcut_view ShortcutView + + _start_at_login + NSButton + customShortcutView MASShortcutView @@ -3255,6 +3322,7 @@ {11, 11} {10, 3} + {15, 15} -- cgit v1.2.3