diff options
author | dynaflash <[email protected]> | 2008-03-06 13:57:37 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-03-06 13:57:37 +0000 |
commit | 4b3169b04dbc66e41af3ae8c38cf7b986215b610 (patch) | |
tree | d06c54fc9bb7552dc01fc5efe29af0e1f899cedd /macosx/Controller.mm | |
parent | 7b5f3f2c095c62a8e5f462aab6e45997c1501bff (diff) |
MacGui: move the presets sorting into a new method "-sortPresets" so it can be done independently of adding a preset in preparation for drag and drop preset arranging capability.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1329 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r-- | macosx/Controller.mm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index a64afe76d..719acad1b 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -3737,6 +3737,16 @@ if (item == nil) - (void)addPreset { + [self sortPresets]; + /* We Reload the New Table data for presets */ + [fPresetsOutlineView reloadData]; + /* We save all of the preset data here */ + [self savePreset]; +} + +- (void)sortPresets +{ + /* We Sort the Presets By Factory or Custom */ NSSortDescriptor * presetTypeDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"Type" @@ -3748,11 +3758,7 @@ if (item == nil) NSArray *sortedArray=[UserPresets sortedArrayUsingDescriptors:sortDescriptors]; [UserPresets setArray:sortedArray]; - - /* We Reload the New Table data for presets */ - [fPresetsOutlineView reloadData]; - /* We save all of the preset data here */ - [self savePreset]; + } - (IBAction)insertPreset:(id)sender |