summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/AudioView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-05-19 21:02:08 +0000
committersr55 <[email protected]>2012-05-19 21:02:08 +0000
commita8c98d2da676d507a0754ec191d53a1122a40220 (patch)
treeae847166896db64e8e7c1d78b1962f909bc19a6c /win/CS/HandBrakeWPF/Views/AudioView.xaml
parentb5a8be6d070e651d475978e06459a1f565d855f5 (diff)
WinGui: When Changing the output format, limit to only valid choices in the video and audio encoder dropdowns.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4688 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/AudioView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml19
1 files changed, 16 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index ea112a750..15bf24113 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -15,6 +15,7 @@
<Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Conveters:BooleanToHiddenVisibilityConverter x:Key="boolToHiddenVisConverter" />
<Audio:AudioBitrateConverter x:Key="audioBitrateConverter" />
+ <Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
@@ -102,9 +103,21 @@
SelectedItem="{Binding ScannedTrack}"/>
<TextBlock Text="Codec" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center" />
- <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
- ItemsSource="{Binding DataContext.AudioEncoders, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding Encoder, Converter={StaticResource enumComboConverter}}"/>
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22">
+ <ComboBox.SelectedItem>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="Encoder" />
+ </MultiBinding>
+ </ComboBox.SelectedItem>
+ <ComboBox.ItemsSource>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="DataContext.AudioEncoders"
+ RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ <Binding Path="DataContext.Task"
+ RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ </MultiBinding>
+ </ComboBox.ItemsSource>
+ </ComboBox>
<TextBlock Text="Bitrate" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center"
Visibility="{Binding IsPassthru, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />