summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-04-24 15:48:22 +0000
committerdynaflash <[email protected]>2008-04-24 15:48:22 +0000
commit73b40603172f00dc3ad0aac546f40e1e30c737e6 (patch)
tree48a2a9e5d2171e30b3254748ecd6ee2d87eb3dfd /macosx
parentd78f17e7b51c3e6574d527a0bc666e79015f670a (diff)
MacGui: only enable audio tracks if the previous tracks have been chosen.
- prevents a scenario in which you could have track 1 and track 4 selected with 2 and 3 as "None". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1435 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm37
1 files changed, 34 insertions, 3 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index e091943bd..11cb25468 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -2828,10 +2828,41 @@ the user is using "Custom" settings by determining the sender*/
- (IBAction) setEnabledStateOfAudioMixdownControls: (id) sender
{
/* We will be setting the enabled/disabled state of each tracks audio controls based on
- * the settings of the source audio for that track. We leave the samplerate and bitrate
- *to audiotrackMixdownChanged
- */
+ * the settings of the source audio for that track. We leave the samplerate and bitrate
+ * to audiotrackMixdownChanged
+ */
+ /* We will first verify that a lower track number has been selected before enabling each track
+ * for example, make sure a track is selected for track 1 before enabling track 2, etc.
+ */
+ if ([fAudLang1PopUp indexOfSelectedItem] == 0)
+ {
+ [fAudLang2PopUp setEnabled: NO];
+ [fAudLang2PopUp selectItemAtIndex: 0];
+ }
+ else
+ {
+ [fAudLang2PopUp setEnabled: YES];
+ }
+
+ if ([fAudLang2PopUp indexOfSelectedItem] == 0)
+ {
+ [fAudLang3PopUp setEnabled: NO];
+ [fAudLang3PopUp selectItemAtIndex: 0];
+ }
+ else
+ {
+ [fAudLang3PopUp setEnabled: YES];
+ }
+ if ([fAudLang3PopUp indexOfSelectedItem] == 0)
+ {
+ [fAudLang4PopUp setEnabled: NO];
+ [fAudLang4PopUp selectItemAtIndex: 0];
+ }
+ else
+ {
+ [fAudLang4PopUp setEnabled: YES];
+ }
/* enable/disable the mixdown text and popupbutton for audio track 1 */
[fAudTrack1CodecPopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];
[fAudTrack1MixPopUp setEnabled: ([fAudLang1PopUp indexOfSelectedItem] == 0) ? NO : YES];