From c41711599ed91ae80185383a6680adebdb7cfc11 Mon Sep 17 00:00:00 2001 From: Mark Jerde Date: Sat, 15 Jan 2022 06:35:48 -0600 Subject: [PATCH] Fix issue #253 and add documentation --- AppController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AppController.m b/AppController.m index deeb452..63b3fc5 100755 --- a/AppController.m +++ b/AppController.m @@ -687,6 +687,7 @@ } -(IBAction)toggleLoadOnStartup:(id)sender { + // Since the control in Interface Builder is bound to User Defaults and sends this action, this method is called after User Defaults already reflects the newly-selected state and merely conveys that value to the relevant mechanisms rather than acting to negate the User Defaults state. if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"loadOnStartup"] ) { #ifdef SANDBOXING SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, YES); @@ -695,7 +696,7 @@ #endif } else { #ifdef SANDBOXING - SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, YES); + SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, NO); #else [UKLoginItemRegistry removeLoginItemWithPath:[[NSBundle mainBundle] bundlePath]]; #endif