mirror of
https://github.com/TermiT/Flycut.git
synced 2025-02-21 22:43:15 +08:00
Fix issue #253 and add documentation
This commit is contained in:
parent
acb100268d
commit
c41711599e
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue