mirror of
https://github.com/TermiT/Flycut.git
synced 2025-02-23 07:25:28 +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 {
|
-(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"] ) {
|
if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"loadOnStartup"] ) {
|
||||||
#ifdef SANDBOXING
|
#ifdef SANDBOXING
|
||||||
SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, YES);
|
SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, YES);
|
||||||
|
@ -695,7 +696,7 @@
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#ifdef SANDBOXING
|
#ifdef SANDBOXING
|
||||||
SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, YES);
|
SMLoginItemSetEnabled((__bridge CFStringRef)kFlycutHelperId, NO);
|
||||||
#else
|
#else
|
||||||
[UKLoginItemRegistry removeLoginItemWithPath:[[NSBundle mainBundle] bundlePath]];
|
[UKLoginItemRegistry removeLoginItemWithPath:[[NSBundle mainBundle] bundlePath]];
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue