diff options
author | Damiano Galassi <[email protected]> | 2018-06-09 11:47:22 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2018-06-09 11:47:22 +0200 |
commit | 22bc857c23be1221f77ac0d5b84c45233acef56d (patch) | |
tree | a9f2f8f19488afa979ec4d12fc23a60d23235fbb /macosx | |
parent | 1cc73e44f30cacfd798fac8aac393baaaea2388a (diff) |
MacGui: avoid calling boolForKey on NSUserDefaults values.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBAppDelegate.m | 2 | ||||
-rw-r--r-- | macosx/HBUtilities.m | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/macosx/HBAppDelegate.m b/macosx/HBAppDelegate.m index 10a8cc0ca..53b89417c 100644 --- a/macosx/HBAppDelegate.m +++ b/macosx/HBAppDelegate.m @@ -50,7 +50,7 @@ [HBCore registerErrorHandler:^(NSString *error) { fprintf(stderr, "error: %s\n", error.UTF8String); }]; - [HBCore setDVDNav:[[[NSUserDefaults standardUserDefaults] objectForKey:@"UseDvdNav"] boolValue]]; + [HBCore setDVDNav:[[NSUserDefaults standardUserDefaults] boolForKey:@"UseDvdNav"]]; _outputPanel = [[HBOutputPanelController alloc] init]; diff --git a/macosx/HBUtilities.m b/macosx/HBUtilities.m index c40d14829..5794a712b 100644 --- a/macosx/HBUtilities.m +++ b/macosx/HBUtilities.m @@ -225,18 +225,18 @@ { if ([formatKey isEqualToString:@"{Source}"]) { - if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"HBAutoNamingRemoveUnderscore"] boolValue]) + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBAutoNamingRemoveUnderscore"]) { sourceName = [sourceName stringByReplacingOccurrencesOfString:@"_" withString:@" "]; } - if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"HBAutoNamingRemovePunctuation"] boolValue]) + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBAutoNamingRemovePunctuation"]) { sourceName = [sourceName stringByReplacingOccurrencesOfString:@"-" withString:@""]; sourceName = [sourceName stringByReplacingOccurrencesOfString:@"." withString:@""]; sourceName = [sourceName stringByReplacingOccurrencesOfString:@"," withString:@""]; sourceName = [sourceName stringByReplacingOccurrencesOfString:@";" withString:@""]; } - if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"HBAutoNamingTitleCase"] boolValue]) + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBAutoNamingTitleCase"]) { sourceName = [sourceName capitalizedString]; } |