summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-02-06 15:29:34 +0000
committersr55 <[email protected]>2016-02-06 15:29:34 +0000
commit8ce01f3f60df3e2065e44bdf2629f81b7b10b2b6 (patch)
tree3dbce92cee59bcd7b3ff09e8dbce0a7f140ef1c4 /win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
parent3053ec908dab32b4da6ce9ec022215087a28a37e (diff)
WinGui:
- Refractor the Audio and Subtitle Defaults into their own View/ViewModel - Add a new PopupWindow container system. - Add "Edit Defaults" for Audio and Subtitles on the Add Preset Pane to make the feature more discoverable. (Note, this does not change the existing settings on the Audio/Subtitle Tabs)
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml163
1 files changed, 163 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
new file mode 100644
index 000000000..835ca65a9
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
@@ -0,0 +1,163 @@
+<UserControl x:Class="HandBrakeWPF.Views.AudioDefaultsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:Audio="clr-namespace:HandBrakeWPF.Converters.Audio"
+ xmlns:cal="http://www.caliburnproject.org"
+ xmlns:Conveters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
+ xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ d:DesignHeight="360"
+ d:DesignWidth="770"
+ mc:Ignorable="d"
+ x:Name="audioDefaultsTab">
+
+ <UserControl.Resources>
+ <Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
+ <Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" />
+ <Audio:AudioTrackDefaultBehaviourConverter x:Key="audioTrackDefaultBehaviourConverter" />
+ </UserControl.Resources>
+
+ <Grid VerticalAlignment="Top">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Row 2 -->
+ <StackPanel Grid.Row="0" Grid.Column="0" Margin="10,0,0,0"
+ Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, FallbackValue=Visible}">
+
+ <Grid Margin="0,0,0,0" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Audio -->
+ <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSelectionBehaviour}" Grid.Column="0" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="autoAudioMode" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left"
+ ItemsSource="{Binding AudioBehaviourModeList, Converter={StaticResource audioBehaviourConverter}}"
+ SelectedItem="{Binding AudioBehaviours.SelectedBehaviour, Converter={StaticResource audioBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
+
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_TrackSettingDefaultBehaviour}" Grid.Column="0" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="audioTrackBeahaviorMode" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left"
+ ItemsSource="{Binding AudioTrackDefaultBehaviourModeList, Converter={StaticResource audioTrackDefaultBehaviourConverter}}"
+ SelectedItem="{Binding AudioBehaviours.SelectedTrackDefaultBehaviour, Converter={StaticResource audioTrackDefaultBehaviourConverter}}" Width="210" Margin="0,5,5,0" />
+ </Grid>
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChooseLanguages}" Margin="5,10,0,0" />
+
+ <Grid Margin="20,5,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Vertical" Grid.Column="0">
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_AvailableLanguages}" Margin="0,0,0,5"/>
+ <ListBox Name="availableLanguages" ItemsSource="{Binding AvailableLanguages}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedAvailableToMove}"
+ SelectionMode="Extended" Width="140" Height="120" />
+ </StackPanel>
+
+ <DockPanel Grid.Column="1" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveRight}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveRight]" MaxWidth="90" />
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_MoveLeft}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageMoveLeft]" MaxWidth="90" />
+ <Button Content="{x:Static Properties:ResourcesUI.Generic_Clear}" VerticalAlignment="Center" Margin="0,0,0,5" cal:Message.Attach="[Event Click] = [Action LanguageClearAll]" Width="80"/>
+ </StackPanel>
+ </DockPanel>
+
+ <StackPanel Orientation="Vertical" Grid.Column="2">
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Shared_ChosenLangages}" Margin="0,0,0,5"/>
+ <ListBox Name="selectedLangauges" ItemsSource="{Binding AudioBehaviours.SelectedLangauges}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedLangaugesToMove}"
+ SelectionMode="Extended" Width="140" Height="120"
+ dd:DragDrop.DropHandler="{Binding}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"/>
+ </StackPanel>
+ </Grid>
+ </StackPanel>
+ </Grid>
+
+ <TextBlock Text="{x:Static Properties:ResourcesUI.AudioView_AutoPassthruBehaviour}" FontWeight="Bold" Margin="0,10,0,5" />
+ <StackPanel Margin="10,5,0,0"
+ Orientation="Vertical">
+ <TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_WhenAutoPassthru}" VerticalAlignment="Center" />
+ <TextBlock Margin="5,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_AllowPassThruOf}" VerticalAlignment="Center" />
+ </StackPanel>
+ <StackPanel Margin="15,5,0,0"
+ Orientation="Horizontal">
+ <CheckBox Margin="0,0,5,0"
+ Content="MP3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowMP3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="AAC" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAACPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="AC3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowAC3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="E-AC3" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowEAC3Pass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="DTS" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="DTSHD" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowDTSHDPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="TrueHD" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowTrueHDPass}" />
+ <CheckBox Margin="0,0,5,0"
+ Content="FLAC" VerticalAlignment="Center"
+ IsChecked="{Binding Task.AllowedPassthruOptions.AudioAllowFlacPass}" />
+
+ <TextBlock Margin="15,0,5,0" Text="{x:Static Properties:ResourcesUI.AudioView_OtherwiseFallbackEncoder}" />
+
+ <ComboBox VerticalAlignment="Center" Width="105" Height="22" Margin="5,0,5,0">
+ <ComboBox.SelectedItem>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="Task.AllowedPassthruOptions.AudioEncoderFallback" />
+ </MultiBinding>
+ </ComboBox.SelectedItem>
+ <ComboBox.ItemsSource>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}" ConverterParameter="True">
+ <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>
+
+ </StackPanel>
+
+ </StackPanel>
+
+
+ </Grid>
+</UserControl>