]> granicus.if.org Git - handbrake/commitdiff
MacGui: Attempt to fix x264 options in Presets.
authordynaflash <dynaflashtech@gmail.com>
Thu, 12 Apr 2007 20:31:57 +0000 (20:31 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Thu, 12 Apr 2007 20:31:57 +0000 (20:31 +0000)
- Empty the new preset opt string field right after creation.
- Verify new string are created in tact.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@501 b64f7644-9d1e-0410-96f1-a4d463321fa5

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

index 67aad48d4d17ea2fc6f5c5b69ddebb5dd8c68e6e..4225d3672fa47aa20ff295f10c839b0f80a3cca3 100644 (file)
@@ -1686,6 +1686,8 @@ the user is using "Custom" settings by determining the sender*/
 
 - (IBAction) ShowAddPresetPanel: (id) sender
 {
+    /* Deselect the currently selected Preset if there is one*/
+               [tableView deselectRow:[tableView selectedRow]];
     /* If we have MP4, AVC H.264 and x264 Main then we enable the x264 Options field for the
         Add Preset window we are about to open. We do this before we actually open the panel,
         as doing it after causes it to stick from the last selection for some reason. */
@@ -1699,7 +1701,9 @@ the user is using "Custom" settings by determining the sender*/
                [fPresetNewX264Opt setEditable: NO];
                [fPresetNewX264OptLabel setEnabled: NO];
        }
-       
+               /* Erase info from the input fields */
+       [fPresetNewName setStringValue: @""];
+       [fPresetNewX264Opt setString:@""];
        /* Show the panel */
        [NSApp beginSheet: fAddPresetPanel modalForWindow: fWindow
         modalDelegate: NULL didEndSelector: NULL contextInfo: NULL];
@@ -1711,6 +1715,9 @@ the user is using "Custom" settings by determining the sender*/
 }
 - (IBAction) CloseAddPresetPanel: (id) sender
 {
+       /* Erase info from the input fields */
+       [fPresetNewName setStringValue: @""];
+       [fPresetNewX264Opt setString:@""];
     [NSApp stopModal];
 }
    /* We use this method to recreate new, updated factory
@@ -1757,7 +1764,11 @@ the user is using "Custom" settings by determining the sender*/
 {
     /* Here we create a custom user preset */
        [UserPresets addObject:[self CreatePreset]];
+
+       /* We stop the modal window for the new preset */
+       [NSApp stopModal];
     [self AddPreset];
+       
 
 }
 - (void)AddPreset
@@ -1774,10 +1785,7 @@ the user is using "Custom" settings by determining the sender*/
        NSArray *sortedArray=[UserPresets sortedArrayUsingDescriptors:sortDescriptors];
        [UserPresets setArray:sortedArray];
        
-       /* We stop the modal window for the new preset */
-       [fPresetNewName setStringValue: @""];
-       //[fPresetNewX264Opt setStringValue: @""];
-       [NSApp stopModal];
+       
        /* We Reload the New Table data for presets */
     [tableView reloadData];
    /* We save all of the preset data here */
index f2a88638be4c80c4d5638f5c6c7ebbe95341846c..69337d2a31b3028d92f65abbde353aaedf340b6f 100644 (file)
@@ -20,7 +20,6 @@
        <key>IBOpenObjects</key>
        <array>
                <integer>29</integer>
-               <integer>1867</integer>
                <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
index 91f2abb922ca23ed9796c2c8498c770ea894b39c..da48dff94c18ea60aabb455587e2b57c6b7827bf 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ