diff options
author | jbrjake <[email protected]> | 2009-02-11 22:46:30 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2009-02-11 22:46:30 +0000 |
commit | 167a208d331e3c376ad8c672de4f308ea2d58394 (patch) | |
tree | a0e4e574ae65fdd0704dfa0f8bf5102cb15177cb | |
parent | 15d43ce2e6d27a8cebafc01efe96fcf3ab50ea01 (diff) |
MacGui: Some changes to the method that fades in and out different widgets, to avoid looping on invalid input. It's still really messy, though, and needs a real reworking.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2143 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/HBAdvancedController.m | 78 |
1 files changed, 50 insertions, 28 deletions
diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m index d211f4a2d..b1c269f6e 100644 --- a/macosx/HBAdvancedController.m +++ b/macosx/HBAdvancedController.m @@ -445,14 +445,19 @@ if ( [fX264optCabacSwitch state] == false) { - /* Without CABAC entropy coding, trellis doesn't run. */ - [[fX264optTrellisPopUp animator] setHidden:YES]; - [[fX264optTrellisLabel animator] setHidden:YES]; - [fX264optTrellisPopUp selectItemAtIndex:0]; - if ( (sender != fX264optTrellisPopUp) && (sender != fX264optPsyTrellisSlider) ) - [[fX264optTrellisPopUp cell] performClick:self]; + if( [fX264optTrellisPopUp isHidden] == false ) + { + /* Without CABAC entropy coding, trellis doesn't run. */ + [[fX264optTrellisPopUp animator] setHidden:YES]; + [[fX264optTrellisLabel animator] setHidden:YES]; + [fX264optTrellisPopUp selectItemAtIndex:0]; + if ( (sender != fX264optTrellisPopUp) && (sender != fX264optPsyTrellisSlider) ) + { + [[fX264optTrellisPopUp cell] performClick:self]; + } + } } - else + else if( [fX264optTrellisPopUp isHidden] == true) { [[fX264optTrellisPopUp animator] setHidden:NO]; [[fX264optTrellisLabel animator] setHidden:NO]; @@ -507,25 +512,37 @@ if( [fX264optSubmePopUp indexOfSelectedItem] != 0 && [fX264optSubmePopUp indexOfSelectedItem] < 7 ) { /* No Psy-RDO or Psy=trel if subme < 6. */ - [[fX264optPsyRDSlider animator] setHidden:YES]; - [[fX264optPsyRDLabel animator] setHidden:YES]; - [[fX264optPsyRDSlider animator] setFloatValue:1]; - if ( (sender != fX264optPsyRDSlider) && (sender != fX264optPsyTrellisSlider) ) - [[fX264optPsyRDSlider cell] performClick:self]; - - [[fX264optPsyTrellisSlider animator] setHidden:YES]; - [[fX264optPsyTrellisLabel animator] setHidden:YES]; - [[fX264optPsyTrellisSlider animator] setFloatValue:0]; - if ( (sender != fX264optPsyTrellisSlider) && (sender != fX264optPsyRDSlider) && (sender != fX264optTrellisPopUp) ) - [[fX264optPsyTrellisSlider cell] performClick:self]; + if( [fX264optPsyRDSlider isHidden] == false ) + { + [[fX264optPsyRDSlider animator] setHidden:YES]; + [[fX264optPsyRDLabel animator] setHidden:YES]; + [[fX264optPsyRDSlider animator] setFloatValue:1]; + if ( (sender != fX264optPsyRDSlider) && (sender != fX264optPsyTrellisSlider) ) + { + [[fX264optPsyRDSlider cell] performClick:self]; + } + } + if( [fX264optPsyTrellisSlider isHidden] == false) + { + [[fX264optPsyTrellisSlider animator] setHidden:YES]; + [[fX264optPsyTrellisLabel animator] setHidden:YES]; + [[fX264optPsyTrellisSlider animator] setFloatValue:0]; + if ( (sender != fX264optPsyTrellisSlider) && (sender != fX264optPsyRDSlider) ) + { + [[fX264optPsyTrellisSlider cell] performClick:self]; + } + } } else { - [[fX264optPsyRDSlider animator] setHidden:NO]; - [[fX264optPsyRDLabel animator] setHidden:NO]; + if( [fX264optPsyRDSlider isHidden] == true ) + { + [[fX264optPsyRDSlider animator] setHidden:NO]; + [[fX264optPsyRDLabel animator] setHidden:NO]; + } - if( [fX264optTrellisPopUp indexOfSelectedItem] >= 2 ) + if( [fX264optTrellisPopUp indexOfSelectedItem] >= 2 && [fX264optCabacSwitch state] == true && [fX264optPsyTrellisSlider isHidden] == true ) { [[fX264optPsyTrellisSlider animator] setHidden:NO]; [[fX264optPsyTrellisLabel animator] setHidden:NO]; @@ -534,16 +551,21 @@ if( [fX264optTrellisPopUp indexOfSelectedItem] < 2 ) { - /* No Psy-trellis without trellis. */ - [[fX264optPsyTrellisSlider animator] setHidden:YES]; - [[fX264optPsyTrellisLabel animator] setHidden:YES]; - [[fX264optPsyTrellisSlider animator] setFloatValue:0]; - if ( (sender != fX264optTrellisPopUp) && (sender != fX264optPsyTrellisSlider) ) - [[fX264optPsyTrellisSlider cell] performClick:self]; + if( [fX264optPsyTrellisSlider isHidden] == false ) + { + /* No Psy-trellis without trellis. */ + [[fX264optPsyTrellisSlider animator] setHidden:YES]; + [[fX264optPsyTrellisLabel animator] setHidden:YES]; + [[fX264optPsyTrellisSlider animator] setFloatValue:0]; + if ( (sender != fX264optTrellisPopUp) && (sender != fX264optPsyTrellisSlider) ) + { + [[fX264optPsyTrellisSlider cell] performClick:self]; + } + } } else { - if( [fX264optSubmePopUp indexOfSelectedItem] == 0 || [fX264optSubmePopUp indexOfSelectedItem] >= 7 ) + if( ( [fX264optSubmePopUp indexOfSelectedItem] == 0 || [fX264optSubmePopUp indexOfSelectedItem] >= 7 ) && [fX264optCabacSwitch state] == true && [fX264optPsyTrellisSlider isHidden] == true ) { [[fX264optPsyTrellisSlider animator] setHidden:NO]; [[fX264optPsyTrellisLabel animator] setHidden:NO]; |