Index: macosx/HBAdvancedController.h =================================================================== --- macosx/HBAdvancedController.h (revision 1146) +++ macosx/HBAdvancedController.h (working copy) @@ -64,6 +64,7 @@ - (void) setHidden: (BOOL) hide; - (IBAction) X264AdvancedOptionsSet: (id) sender; - (IBAction) X264AdvancedOptionsStandardizeOptString: (id) sender; +- (IBAction) X264AdvancedOptionsAnimate: (id) sender; - (IBAction) X264AdvancedOptionsSetCurrentSettings: (id) sender; - (NSString *) X264AdvancedOptionsStandardizeOptNames:(NSString *) cleanOptNameString; - (IBAction) X264AdvancedOptionsChanged: (id) sender; Index: macosx/HBAdvancedController.m =================================================================== --- macosx/HBAdvancedController.m (revision 1146) +++ macosx/HBAdvancedController.m (working copy) @@ -163,15 +163,20 @@ /*Weighted B-Frame Prediction fX264optWeightBSwitch BOOLEAN*/ [fX264optWeightBSwitch setState:0]; + [fX264optWeightBSwitch setWantsLayer:YES]; /*B-Frame Rate Distortion Optimization fX264optBRDOSwitch BOOLEAN*/ [fX264optBRDOSwitch setState:0]; + [fX264optBRDOSwitch setWantsLayer:YES]; + /*B-frame Pyramids fX264optBPyramidSwitch BOOLEAN*/ [fX264optBPyramidSwitch setState:0]; + [fX264optBPyramidSwitch setWantsLayer:YES]; /*Bidirectional Motion Estimation Refinement fX264optBiMESwitch BOOLEAN*/ [fX264optBiMESwitch setState:0]; + [fX264optBiMESwitch setWantsLayer:YES]; /*Direct B-Frame Prediction Mode fX264optDirectPredPopUp*/ [fX264optDirectPredPopUp removeAllItems]; @@ -180,6 +185,7 @@ [fX264optDirectPredPopUp addItemWithTitle:@"Spatial"]; [fX264optDirectPredPopUp addItemWithTitle:@"Temporal"]; [fX264optDirectPredPopUp addItemWithTitle:@"Automatic"]; + [fX264optDirectPredPopUp setWantsLayer:YES]; /*Alpha Deblock*/ [fX264optAlphaDeblockPopUp removeAllItems]; @@ -214,6 +220,9 @@ /* Set Current GUI Settings based on newly standardized string */ [self X264AdvancedOptionsSetCurrentSettings: NULL]; + + /* Fade out options that don't apply */ + [self X264AdvancedOptionsAnimate: NULL]; } /** @@ -365,6 +374,33 @@ } /** + * Fades options in and out depending on whether they're available.. + */ +- (IBAction) X264AdvancedOptionsAnimate: (id) sender +{ + if ( [fX264optBframesPopUp indexOfSelectedItem ] < 2) + { + /* If the b-frame widget is at 0 or 1, the user has chosen + not to use b-frames at all. So disable the options + that can only be used when b-frames are enabled. */ + [[fX264optWeightBSwitch animator] setAlphaValue:0.2]; + [[fX264optBRDOSwitch animator] setAlphaValue:0.2]; + [[fX264optBPyramidSwitch animator] setAlphaValue:0.2]; + [[fX264optBiMESwitch animator] setAlphaValue:0.2]; + [[fX264optDirectPredPopUp animator] setAlphaValue:0.2]; + } + else + { + [[fX264optWeightBSwitch animator] setAlphaValue:1]; + [[fX264optBRDOSwitch animator] setAlphaValue:1]; + [[fX264optBPyramidSwitch animator] setAlphaValue:1]; + [[fX264optBiMESwitch animator] setAlphaValue:1]; + [[fX264optDirectPredPopUp animator] setAlphaValue:1]; + } + +} + +/** * Resets the GUI widgets to the contents of the option string. */ - (IBAction) X264AdvancedOptionsSetCurrentSettings: (id) sender