diff options
author | maurj <[email protected]> | 2007-04-20 16:50:55 +0000 |
---|---|---|
committer | maurj <[email protected]> | 2007-04-20 16:50:55 +0000 |
commit | ed55d6902af1ed9d7f5ed41bcddb6d1729ade477 (patch) | |
tree | 3e4e6dc246dc239b1fb1b499e36b28a6c43970b8 /macosx/PrefsController.m | |
parent | 2cbb36a1ae00f97c9359f68cb7b9fce9d4e6c035 (diff) |
Fixed PrefsController.m so that the default prefs are correctly used when a user has never run HandBrake before.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@537 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/PrefsController.m')
-rw-r--r-- | macosx/PrefsController.m | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 6d42624f1..2af83fb33 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -10,38 +10,29 @@ /* Unless the user specified otherwise, default is to check for update DefAdvancedx264Flags*/ defaults = [NSUserDefaults standardUserDefaults]; - appDefaults = [NSDictionary dictionaryWithObject:@"YES" - forKey:@"CheckForUpdates"]; - appDefaults = [NSDictionary dictionaryWithObject:@"English" - forKey:@"DefaultLanguage"]; - appDefaults = [NSDictionary dictionaryWithObject:@"NO" - forKey:@"DefaultMpegName"]; - appDefaults = [NSDictionary dictionaryWithObject:@"YES" - forKey:@"DefaultCrf"]; - appDefaults = [NSDictionary dictionaryWithObject:@"NO" - forKey:@"DefaultDeinterlaceOn"]; - appDefaults = [NSDictionary dictionaryWithObject:@"YES" - forKey:@"DefaultPicSizeAutoiPod"]; - appDefaults = [NSDictionary dictionaryWithObject:@"NO" - forKey:@"PixelRatio"]; - appDefaults = [NSDictionary dictionaryWithObject:@"NO" - forKey:@"DefAdvancedx264FlagsShow"]; - appDefaults = [NSDictionary dictionaryWithObject:@"" - forKey:@"DefAdvancedx264Flags"]; - appDefaults = [NSDictionary dictionaryWithObject:@"YES" - forKey:@"DefaultPresetsDrawerShow"]; - NSString *defDestDirectory = @"~/Desktop"; + + NSString *defDestDirectory = @"~/Desktop"; defDestDirectory = [defDestDirectory stringByExpandingTildeInPath]; - appDefaults = [NSDictionary dictionaryWithObject:defDestDirectory forKey:@"LastDestinationDirectory"]; NSString *defSrcDirectory = @"~/Desktop"; defSrcDirectory = [defSrcDirectory stringByExpandingTildeInPath]; - appDefaults = [NSDictionary dictionaryWithObject:defSrcDirectory forKey:@"LastSourceDirectory"]; - - appDefaults = [NSDictionary dictionaryWithObject:@"NO" - forKey:@"DefaultAutoNaming"]; - appDefaults = [NSDictionary dictionaryWithObject:@"NO" - forKey:@"DefaultChapterMarkers"]; + + appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + @"YES", @"CheckForUpdates", + @"English", @"DefaultLanguage", + @"NO", @"DefaultMpegName", + @"YES", @"DefaultCrf", + @"NO", @"DefaultDeinterlaceOn", + @"YES", @"DefaultPicSizeAutoiPod", + @"NO", @"PixelRatio", + @"NO", @"DefAdvancedx264FlagsShow", + @"", @"DefAdvancedx264Flags", + @"YES", @"DefaultPresetsDrawerShow", + defDestDirectory, @"LastDestinationDirectory", + defSrcDirectory, @"LastSourceDirectory", + @"NO", @"DefaultAutoNaming", + @"NO", @"DefaultChapterMarkers", + nil]; [defaults registerDefaults: appDefaults]; |