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 | |
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
-rw-r--r-- | macosx/Controller.h | 1 | ||||
-rw-r--r-- | macosx/Controller.mm | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index 4994e8149..22ce107ae 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -309,6 +309,7 @@ - (IBAction)setDefaultPreset:(id)sender; - (IBAction)selectDefaultPreset:(id)sender; - (void) savePreset; +- (void)sortPresets; - (IBAction)addFactoryPresets:(id)sender; - (IBAction)deleteFactoryPresets:(id)sender; - (IBAction)addUserPreset:(id)sender; 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 |