summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreferencesController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-01-09 07:40:00 +0000
committerritsuka <[email protected]>2015-01-09 07:40:00 +0000
commit49652651aacc104f48775780532df9ac332dccee (patch)
treecda754fb5c48e9e1fd1fbf0564f2162a92a03d07 /macosx/HBPreferencesController.m
parent8ceebaf185315102a412b0e645200df2992a8185 (diff)
MacGui: remove some NSString -> NSURL conversions. Added a default size value and folder expanded value for the presets drawer.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6698 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreferencesController.m')
-rw-r--r--macosx/HBPreferencesController.m16
1 files changed, 10 insertions, 6 deletions
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m
index 3e9666e6c..2325eb2c4 100644
--- a/macosx/HBPreferencesController.m
+++ b/macosx/HBPreferencesController.m
@@ -54,7 +54,8 @@
*/
+ (void)registerUserDefaults
{
- NSString *desktopDirectory = [@"~/Desktop" stringByExpandingTildeInPath];
+ NSString *desktopDirectory = [NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES) firstObject];
+ NSURL *desktopURL = [NSURL fileURLWithPath:desktopDirectory isDirectory:YES];
[[NSUserDefaults standardUserDefaults] registerDefaults:@{
@"LaunchSourceBehavior": @"Open Source",
@@ -62,8 +63,9 @@
@"DefaultMpegExtension": @"Auto",
@"UseDvdNav": @"YES",
@"HBDefaultPresetsDrawerShow": @YES,
- @"LastDestinationDirectory": desktopDirectory,
- @"LastSourceDirectory": desktopDirectory,
+ // Archive the URL because they aren't supported in plist.
+ @"HBLastDestinationDirectory": [NSKeyedArchiver archivedDataWithRootObject:desktopURL],
+ @"HBLastSourceDirectory": [NSKeyedArchiver archivedDataWithRootObject:desktopURL],
@"DefaultAutoNaming": @NO,
@"AlertWhenDone": @"Alert Window",
@"AlertWhenDoneSound": @"YES",
@@ -71,12 +73,14 @@
@"EncodeLogLocation": @"NO",
@"MinTitleScanSeconds": @"10",
@"PreviewsNumber": @"10",
- @"Drawer Size": @"",
- @"x264CqSliderFractional": @"0.25",
+ @"x264CqSliderFractional": @"0.50",
@"AlertBuiltInPresetUpdate": @"YES",
@"SendCompletedEncodeToApp": @"MetaX",
@"HBShowAdvancedTab": @NO,
- @"HBAutoNamingFormat": @[@"{Source}", @" ", @"{Title}"]
+ @"HBAutoNamingFormat": @[@"{Source}", @" ", @"{Title}"],
+ // Hash of the default folders, until there is a better way.
+ @"HBPreviewViewExpandedStatus": @[@(4097268371718322522), @(3576901712372066251)],
+ @"HBDrawerSize": NSStringFromSize(NSMakeSize(184, 591))
}];
}