diff options
author | ritsuka <[email protected]> | 2015-05-14 19:37:49 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-05-14 19:37:49 +0000 |
commit | 2659b80cc0d4e078db19436f4f144b50525f2983 (patch) | |
tree | 54a8813f4a53c25e1630e6aa654c348e603f9ee8 /macosx/HBAppDelegate.m | |
parent | 970688a142998ddf68cf1950436bb92e0385139c (diff) |
MacGui: use libhb built-in presets and validation functions. Update the format and save the presets in UserPresets.json, the old presets are automatically imported if the new presets file is not found. The mac gui now requires 10.7 or later.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7181 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAppDelegate.m')
-rw-r--r-- | macosx/HBAppDelegate.m | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/macosx/HBAppDelegate.m b/macosx/HBAppDelegate.m index 03e10a921..39f6671ea 100644 --- a/macosx/HBAppDelegate.m +++ b/macosx/HBAppDelegate.m @@ -16,7 +16,7 @@ #import "HBCore.h" #import "HBController.h" -#define PRESET_FILE @"UserPresets.plist" +#define PRESET_FILE @"UserPresets.json" @interface HBAppDelegate () @@ -77,8 +77,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification { - // Updates built-ins presets if needed - [self checkBuiltInsForUpdates]; [self buildPresetsMenu]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildPresetsMenu) name:HBPresetsChangedNotification object:nil]; @@ -286,9 +284,9 @@ - (void)checkBuiltInsForUpdates { // if we have built in presets to update, then do so AlertBuiltInPresetUpdate - if ([self.presetsManager checkBuiltInsForUpdates]) - { - if( [[NSUserDefaults standardUserDefaults] boolForKey:@"AlertBuiltInPresetUpdate"] == YES) + //if ([self.presetsManager checkBuiltInsForUpdates]) + //{ + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AlertBuiltInPresetUpdate"] == YES) { // Show an alert window that built in presets will be updated [NSApp requestUserAttention:NSCriticalRequest]; @@ -297,9 +295,7 @@ [alert setInformativeText:@"HandBrake will now update your built-in presets."]; [alert runModal]; } - // when alert is dismissed, go ahead and update the built in presets - [self.presetsManager generateBuiltInPresets]; - } + //} } /** @@ -336,7 +332,7 @@ item.representedObject = obj; } // Make the default preset font bold. - if ([obj isDefault]) + if ([obj isEqualTo:self.presetsManager.defaultPreset]) { NSAttributedString *newTitle = [[NSAttributedString alloc] initWithString:[obj name] attributes:@{NSFontAttributeName: [NSFont boldSystemFontOfSize:14]}]; |