diff options
author | ritsuka <[email protected]> | 2014-11-23 12:54:31 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-11-23 12:54:31 +0000 |
commit | 9e0dcb82bdbf0801b79b84241ab67088c2fb0553 (patch) | |
tree | 7eb8845516a8e3bb091e07a0eaa40e8459c1a93e /macosx/HBPresetsManager.m | |
parent | 20e1a9b2e253fe2d59dbf64a878e735a8d4d7c91 (diff) |
MacGui: moved the "add preset" window to its own window controller class. Keep the current settings when changing title or scanning a new file.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6538 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPresetsManager.m')
-rw-r--r-- | macosx/HBPresetsManager.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/macosx/HBPresetsManager.m b/macosx/HBPresetsManager.m index 86bd7f4fa..778963b7d 100644 --- a/macosx/HBPresetsManager.m +++ b/macosx/HBPresetsManager.m @@ -229,7 +229,7 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification"; return retValue; } -- (void)addPreset:(NSDictionary *)preset +- (void)addPresetFromDictionary:(NSDictionary *)preset { HBPreset *presetNode = [[HBPreset alloc] initWithName:preset[@"PresetName"] content:preset @@ -241,6 +241,13 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification"; [self savePresets]; } +- (void)addPreset:(HBPreset *)preset +{ + [self.root insertObject:preset inChildrenAtIndex:[self.root countOfChildren]]; + + [self savePresets]; +} + - (void)deletePresetAtIndexPath:(NSIndexPath *)idx { HBPreset *parentNode = self.root; |