diff options
author | sr55 <[email protected]> | 2017-12-25 16:06:19 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2017-12-25 16:06:27 +0000 |
commit | 0ee7c489ca5c0408877d304b65cb1d92160af807 (patch) | |
tree | 17c456ad203749060c2f1db812f384026ea37bc4 /win/CS | |
parent | 903ceebfcd0eb6cd8b4c6651b3ec93520c25d18e (diff) |
WinGui: Disable Subtitle Burn In Checkbox for PGS + MP4 #1077
Diffstat (limited to 'win/CS')
4 files changed, 16 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index dea2d44d0..0e2d5c5ea 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -162,6 +162,7 @@ <Compile Include="Converters\OptionTabConverter.cs" />
<Compile Include="Converters\PresetsMenuConverter.cs" />
<Compile Include="Converters\Queue\PictureSettingsDescConveter.cs" />
+ <Compile Include="Converters\Subtitles\CanBurnSubtitleConverter.cs" />
<Compile Include="Converters\Subtitles\SubtitleBurnInBehaviourConverter.cs" />
<Compile Include="Converters\Subtitles\SubtitleBehaviourConverter.cs" />
<Compile Include="Converters\Video\VideoOptionsTooltipConverter.cs" />
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs index d29709310..e481907bb 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs @@ -171,8 +171,10 @@ namespace HandBrakeWPF.Services.Encode.Model.Models if (this.sourceTrack != null) { this.Track = this.sourceTrack.ToString(); + this.SubtitleType = this.sourceTrack.SubtitleType; } - + + this.NotifyOfPropertyChange(() => this.SubtitleType); this.NotifyOfPropertyChange(() => this.CanBeBurned); this.NotifyOfPropertyChange(() => this.CanBeForced); diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index c05fda5e5..bc8ba1ce2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -576,7 +576,7 @@ namespace HandBrakeWPF.ViewModels SubtitleTrack track = new SubtitleTrack
{
- SubtitleType = SubtitleType.VobSub,
+ SubtitleType = source.SubtitleType,
SourceTrack = source,
};
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 2268d5aaa..2d4d7492d 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -10,12 +10,14 @@ xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:splitButton="clr-namespace:HandBrakeWPF.Controls.SplitButton"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ xmlns:subtitles="clr-namespace:HandBrakeWPF.Converters.Subtitles"
d:DesignHeight="350"
d:DesignWidth="500"
mc:Ignorable="d"
x:Name="subTab">
<UserControl.Resources>
<Converters:BooleanToVisibilityConverter x:Key="booleanToVisConverter" />
+ <subtitles:CanBurnSubtitleConverter x:Key="canBurnSubtitleConverter" />
<Style x:Key="LongToolTip" TargetType="TextBlock">
<Setter Property="Width" Value="400" />
@@ -102,7 +104,7 @@ <!-- Row 2 -->
<ListBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
- Margin="10,10,10,10"
+ Margin="10,10,10,10" x:Name="subtitleListBox"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
@@ -175,7 +177,14 @@ <CheckBox Grid.Column="3" Margin="5,0,5,0" VerticalAlignment="Center" IsEnabled="{Binding CanBeForced}" IsChecked="{Binding Forced}" />
<TextBlock Grid.Column="4" VerticalAlignment="Center" FontWeight="Bold" Text="Burn In" />
- <CheckBox Grid.Column="5" Margin="5,0,5,0" VerticalAlignment="Center" IsChecked="{Binding Burned}" IsEnabled="{Binding CanBeBurned}">
+ <CheckBox Grid.Column="5" Margin="5,0,5,0" VerticalAlignment="Center" IsChecked="{Binding Burned}" x:Name="burnInCheckbox">
+ <CheckBox.IsEnabled>
+ <MultiBinding Converter="{StaticResource canBurnSubtitleConverter}">
+ <Binding Path="CanBeBurned" />
+ <Binding Path="SubtitleType" />
+ <Binding ElementName="subtitleListBox" Path="DataContext.Task" />
+ </MultiBinding>
+ </CheckBox.IsEnabled>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="SetBurnedToFalseForAllExcept">
|