Skip to content
Browse files

Fixes BOOL user defaults lookup for registered defaults on Tiger.

  • Loading branch information...
1 parent b3f3944 commit a31dc3a102e517d158374ee6b5a0204af02c92e6 @andymatuschak andymatuschak committed Jul 17, 2008
Showing with 5 additions and 2 deletions.
  1. +5 −2 SUHost.m
View
7 SUHost.m
@@ -140,15 +140,18 @@ - (void)setObject:(id)value forUserDefaultsKey:(NSString *)defaultName;
- (BOOL)boolForUserDefaultsKey:(NSString *)defaultName
{
+ if (bundle == [NSBundle mainBundle])
+ return [[NSUserDefaults standardUserDefaults] boolForKey:defaultName];
+
BOOL value;
CFPropertyListRef plr = CFPreferencesCopyAppValue((CFStringRef)defaultName, (CFStringRef)[bundle bundleIdentifier]);
if (plr == NULL)
value = NO;
- else {
+ else
+ {
value = (BOOL)CFBooleanGetValue((CFBooleanRef)plr);
CFRelease(plr);
}
-
return value;
}

0 comments on commit a31dc3a

Please sign in to comment.
Something went wrong with that request. Please try again.