From f15d4cb2e2cf4aac27b63314f5f28d486aae1eb6 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Thu, 3 Jan 2013 00:16:17 +0000 Subject: MacGui: fix queue editing after adding the x264 preset system. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5137 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'macosx') diff --git a/macosx/Controller.m b/macosx/Controller.m index 27d3bd354..9eb594c66 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2991,11 +2991,30 @@ fWorkingCount = 0; /* Mux mp4 with http optimization */ [fDstMp4HttpOptFileCheck setState:[[queueToApply objectForKey:@"Mp4HttpOptimize"] intValue]]; - /* Video encoder */ - /* We set the advanced opt string here if applicable*/ + /* video encoder */ [fVidEncoderPopUp selectItemWithTitle:[queueToApply objectForKey:@"VideoEncoder"]]; - [fAdvancedOptions setOptions:[queueToApply objectForKey:@"x264Option"]]; - [fAdvancedOptions setLavcOptions:[queueToApply objectForKey:@"lavcOption"]]; + [fAdvancedOptions setLavcOptions: [queueToApply objectForKey:@"lavcOption"]]; + /* advanced x264 options */ + if ([[queueToApply objectForKey:@"x264UseAdvancedOptions"] intValue]) + { + // we are using the advanced panel + [fAdvancedOptions setOptions:[queueToApply objectForKey:@"x264Option"]]; + // enable the advanced panel and update the widgets + [fx264UseAdvancedOptionsCheck setState: NSOnState]; + [self updateX264Widgets:nil]; + } + else + { + // we are using the x264 system + [self setX264Preset: [queueToApply objectForKey:@"x264Preset"]]; + [self setX264Tune: [queueToApply objectForKey:@"x264Tune"]]; + [self setX264OptionExtra: [queueToApply objectForKey:@"x264OptionExtra"]]; + [self setH264Profile: [queueToApply objectForKey:@"h264Profile"]]; + [self setH264Level: [queueToApply objectForKey:@"h264Level"]]; + // disable the advanced panel and update the widgets + [fx264UseAdvancedOptionsCheck setState: NSOffState]; + [self updateX264Widgets:nil]; + } /* Lets run through the following functions to get variables set there */ [self videoEncoderPopUpChanged:nil]; @@ -6302,7 +6321,7 @@ return YES; [self setX264OptionExtra: [chosenPreset objectForKey:@"x264OptionExtra"]]; [self setH264Profile: [chosenPreset objectForKey:@"h264Profile"]]; [self setH264Level: [chosenPreset objectForKey:@"h264Level"]]; - /* we enable the advanced panel and update the widgets */ + /* we disable the advanced panel and update the widgets */ [fx264UseAdvancedOptionsCheck setState: NSOffState]; [self updateX264Widgets:nil]; } -- cgit v1.2.3