From fa5011f9aa660ed4d076628dfb5caf8233b94991 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 2 Dec 2016 13:37:24 -0500 Subject: MainMenu.xib: Bind "Start at login" checkbox to NSUserDefaultsController Add a Key-Value Binding in Interface Builder to `NSUserDefaultsController` so that the checkbox value gets persisted between launches of the app. This fixes the bug mentioned in a77a053f90a7b2588dbaabedbf25f908680f2f30 such that now unchecking the box and closing the app will result in the checkbox being unchecked on the next launch. Wow, that was super easy! --- Low Battery Yup/en.lproj/MainMenu.xib | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Low Battery Yup/en.lproj/MainMenu.xib b/Low Battery Yup/en.lproj/MainMenu.xib index 5e48c4e..54cde7c 100644 --- a/Low Battery Yup/en.lproj/MainMenu.xib +++ b/Low Battery Yup/en.lproj/MainMenu.xib @@ -17,6 +17,7 @@ NSCustomView NSMenu NSMenuItem + NSUserDefaultsController NSView NSWindowTemplate @@ -1323,6 +1324,7 @@ {{82, 32}, {104, 18}} + _NS:9 YES @@ -1369,6 +1371,9 @@ NSFontManager + + YES + @@ -2076,6 +2081,22 @@ 545 + + + value: values.StartAtLogin + + + + + + value: values.StartAtLogin + value + values.StartAtLogin + 2 + + + 552 + @@ -3097,6 +3118,11 @@ + + 546 + + + @@ -3245,6 +3271,7 @@ 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 @@ -3264,7 +3291,7 @@ - 545 + 552 -- cgit v1.2.3