]> granicus.if.org Git - handbrake/commitdiff
MacGui: User Presets - sort presets alphabetically in drawer
authordynaflash <dynaflashtech@gmail.com>
Thu, 22 Feb 2007 21:17:44 +0000 (21:17 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Thu, 22 Feb 2007 21:17:44 +0000 (21:17 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.8.0_beta2_5.1@404 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm
macosx/English.lproj/MainMenu.nib/info.nib
macosx/English.lproj/MainMenu.nib/keyedobjects.nib

index 85d9071c2631c429cc59c2cf53af6198047e5aa1..d319ee5858841751905453670b25d5bdc8d0ec28 100644 (file)
@@ -1432,6 +1432,12 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow
 - (IBAction)addPreset:(id)sender
 {
     [UserPresets addObject:[self CreatePreset]];
+       /* We Sort the Presets Alphabetically by name */
+       NSSortDescriptor * lastNameDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"PresetName" 
+                                                    ascending:YES] autorelease];
+       NSArray *sortDescriptors=[NSArray arrayWithObject:lastNameDescriptor];
+       NSArray *sortedArray=[UserPresets sortedArrayUsingDescriptors:sortDescriptors];
+       [UserPresets setArray:sortedArray];
        
        /* We stop the modal window for the new preset */
        [fPresetNewName    setStringValue: @""];
index 24fe33cbe1cffe2d1188eb5b8f46d1599ef80a85..1783ad8596816ef78030cc195fd4a9d3051e73cb 100644 (file)
@@ -19,8 +19,9 @@
        </array>
        <key>IBOpenObjects</key>
        <array>
-               <integer>29</integer>
+               <integer>1843</integer>
                <integer>21</integer>
+               <integer>29</integer>
        </array>
        <key>IBSystem Version</key>
        <string>8L127</string>
index 80ed24763dc47602b86b16defa0c9d73af4404e2..c265c3b8de5442a72d9ccc2f2c1aa1acc722ea4a 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ