summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-04-09 12:21:38 +0000
committerRodeo <[email protected]>2013-04-09 12:21:38 +0000
commitf520603c7f0eefd5961b83d52d1fe3f9bf6eee21 (patch)
treeda0e8c2136f56090e3a46422a5c87b346e04bdfe
parent00685e5dbcb9754dfb2e2fe1ab4e88f2fbf3a7f0 (diff)
MacGui: when switching from the x264 system to the advanced panel, populate the advanced panel's options string with the unparsed x264 system options.
Also, don't reset the x264 system widgets, so that the x264 system settings are not lost when switching back. When loading a preset whic uses the advanced panel, do reset the x264 system widgets, however. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5388 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.m28
1 files changed, 17 insertions, 11 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index 51c4be181..10665fb31 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -5428,15 +5428,16 @@ the user is using "Custom" settings by determining the sender*/
{
// using advanced panel, enable if applicable
[fAdvancedOptions enableUI:enable];
- // TODO: set the advanced options string based on the previously
- // selected x264 system setting
- // reset x264 system widgets
- [fX264PresetsSlider setIntegerValue: fX264MediumPresetIndex];
- [fX264TunePopUp selectItemAtIndex:0];
- [fX264FastDecodeCheck setState:NSOffState];
- [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:@""];
- [fX264ProfilePopUp selectItemAtIndex:0];
- [fX264LevelPopUp selectItemAtIndex:0];
+ // set the advanced options string based on the previously selected
+ // x264 system setting
+ if (fX264PresetsUnparsedUTF8String != NULL)
+ {
+ [fAdvancedOptions setOptions:[NSString stringWithUTF8String:fX264PresetsUnparsedUTF8String]];
+ }
+ else
+ {
+ [fAdvancedOptions setOptions:@""];
+ }
}
// update and/or populate the widgets
@@ -6354,13 +6355,18 @@ return YES;
if ([chosenPreset objectForKey:@"x264Option"])
{
/* we set the advanced opt string here if applicable */
- [fAdvancedOptions setOptions:
- [chosenPreset objectForKey:@"x264Option"]];
+ [fAdvancedOptions setOptions: [chosenPreset objectForKey:@"x264Option"]];
}
else
{
[fAdvancedOptions setOptions:@""];
}
+ /* preset does not use the x264 system, reset the widgets */
+ [self setX264Preset: nil];
+ [self setX264Tune: nil];
+ [self setX264OptionExtra: nil];
+ [self setH264Profile: nil];
+ [self setH264Level: nil];
/* we enable the advanced panel and update the widgets */
[fx264UseAdvancedOptionsCheck setState: NSOnState];
[self updateX264Widgets:nil];