From: dynaflash Date: Thu, 12 Apr 2007 20:31:57 +0000 (+0000) Subject: MacGui: Attempt to fix x264 options in Presets. X-Git-Tag: 0.8.5-beta.1~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=934b350d0a4a77b75bca5bf1ab8053e2a0bcda15;p=handbrake MacGui: Attempt to fix x264 options in Presets. - 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 --- diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 67aad48d4..4225d3672 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -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 */ diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index f2a88638b..69337d2a3 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -20,7 +20,6 @@ IBOpenObjects 29 - 1867 21 IBSystem Version diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib index 91f2abb92..da48dff94 100644 Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ