OSDN Git Service

MacGui: Attempt to fix x264 options in Presets.
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 12 Apr 2007 20:31:57 +0000 (20:31 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
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://localhost/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 67aad48..4225d36 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 f2a8863..69337d2 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 91f2abb..da48dff 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ