summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2020-06-19 20:26:35 +0100
committersr55 <[email protected]>2020-06-19 20:26:35 +0100
commite8d5cc79660cf7e3671c4cfab51da54451e5b14c (patch)
tree94d8421e26f6a4e710ff8522e519d408779cccca /win
parent0dc75f3ec8a6724a5c0315003948d1957dffe0f2 (diff)
WinGui: Minor tweaks to the queue summary screen.
- Added the same Filters summary that exists on the main window summary tab to the queue summary window. - Compacted the Advanced summary from 5 to 3 lines. - Match the mac UI and show default/forced on the subtitle tracks. Fixes #2922
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Converters/Queue/FilterSettingsDescConverter.cs80
-rw-r--r--win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs10
-rw-r--r--win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs3
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs27
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx9
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml22
6 files changed, 141 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Queue/FilterSettingsDescConverter.cs b/win/CS/HandBrakeWPF/Converters/Queue/FilterSettingsDescConverter.cs
new file mode 100644
index 000000000..d9ef55f22
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Converters/Queue/FilterSettingsDescConverter.cs
@@ -0,0 +1,80 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="FilterSettingsDescConverter.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters.Queue
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Windows.Data;
+ using HandBrake.Interop.Interop.Model.Encoding;
+
+ using HandBrakeWPF.Properties;
+ using HandBrakeWPF.Services.Encode.Model;
+ using HandBrakeWPF.Utilities;
+ using HandBrakeWPF.ViewModelItems.Filters;
+
+ public class FilterSettingsDescConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ EncodeTask task = value as EncodeTask;
+ if (task != null)
+ {
+ List<string> filters = new List<string>();
+
+ if (task.Detelecine != Detelecine.Off)
+ {
+ filters.Add(Resources.SummaryView_Detelecine);
+ }
+
+ if (task.DeinterlaceFilter != DeinterlaceFilter.Off)
+ {
+ filters.Add(EnumHelper<DeinterlaceFilter>.GetShortName(task.DeinterlaceFilter));
+ }
+
+ if (task.Denoise != Denoise.Off)
+ {
+ filters.Add(task.Denoise.ToString());
+ }
+
+ if (task.Sharpen != Sharpen.Off)
+ {
+ filters.Add(task.Sharpen.ToString());
+ }
+
+ if (task.DeblockPreset != null && task.DeblockPreset.Key != DeblockFilter.Off)
+ {
+ filters.Add(Resources.SummaryView_Deblock);
+ }
+
+ if (task.Grayscale)
+ {
+ filters.Add(Resources.SummaryView_Grayscale);
+ }
+
+ if (task.Rotation != 0 || task.FlipVideo)
+ {
+ filters.Add(Resources.SummaryView_Rotation);
+ }
+
+ if (filters.Count == 0)
+ {
+ return Resources.SummaryView_NoFilters;
+ }
+
+ return string.Join(", ", filters).TrimEnd(',').Trim();
+ }
+
+ return Resources.SummaryView_NoFilters;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs
index 42f336273..f0a64b7b6 100644
--- a/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Subtitles/SubtitlesQueueDisplayConverter.cs
@@ -53,6 +53,16 @@ namespace HandBrakeWPF.Converters.Subtitles
{
text = text + string.Format(", {0}", Resources.SummaryView_Burned);
}
+
+ if (track.Forced)
+ {
+ text = text + string.Format(", {0}", Resources.SummaryView_Forced);
+ }
+
+ if (track.Default)
+ {
+ text = text + string.Format(", {0}", Resources.SummaryView_Forced);
+ }
sutitleTracks.AppendLine(text);
}
diff --git a/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
index c66b339cc..3fcc3e384 100644
--- a/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
@@ -49,7 +49,8 @@ namespace HandBrakeWPF.Converters.Video
{
VideoTune tune = task.VideoTunes.FirstOrDefault();
- return string.Format("Preset: {0}{5}Tune: {1}{5}Profile: {2}{5}Level: {3}{5}Extra Arguments: {4}{5}",
+ return string.Format(
+ "Preset: {0}, Tune: {1}{5}Profile: {2}, Level: {3}{5}Extra Arguments: {4}{5}",
task.VideoPreset != null ? task.VideoPreset.ShortName : VideoPreset.None.DisplayName,
tune != null ? tune.ShortName : VideoTune.None.DisplayName,
task.VideoProfile != null ? task.VideoProfile.ShortName : VideoProfile.Auto.DisplayName,
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index f56f22cd0..0213629cc 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -4690,6 +4690,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Filters:.
+ /// </summary>
+ public static string QueueView_FilterSettings {
+ get {
+ return ResourceManager.GetString("QueueView_FilterSettings", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Import Queue.
/// </summary>
public static string QueueView_Import {
@@ -5771,6 +5780,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Default.
+ /// </summary>
+ public static string SummaryView_Default {
+ get {
+ return ResourceManager.GetString("SummaryView_Default", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Detelecine.
/// </summary>
public static string SummaryView_Detelecine {
@@ -5789,6 +5807,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Forced.
+ /// </summary>
+ public static string SummaryView_Forced {
+ get {
+ return ResourceManager.GetString("SummaryView_Forced", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Grayscale.
/// </summary>
public static string SummaryView_Grayscale {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index e9561f778..d869657b0 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -2271,4 +2271,13 @@ Please choose a different preset.</value>
<data name="OptionsView_Win10Only" xml:space="preserve">
<value>( Windows 10 Only! )</value>
</data>
+ <data name="QueueView_FilterSettings" xml:space="preserve">
+ <value>Filters:</value>
+ </data>
+ <data name="SummaryView_Default" xml:space="preserve">
+ <value>Default</value>
+ </data>
+ <data name="SummaryView_Forced" xml:space="preserve">
+ <value>Forced</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index c8b290118..cb30f44d6 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -29,13 +29,13 @@
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Converters:FullPathToFileNameConverter x:Key="filePathToFilenameConverter" />
<Converters:EnumComboConverter x:Key="enumComboConverter" />
- <Converters:QueueStatusToVisibilityConverter x:Key="queueStatusVisConverter" />
<Converters:InverseBooleanConverter x:Key="notBooleanConverter" />
<Audio:AudioQueueDisplayConverter x:Key="audioTrackDisplayConverter" />
<Subtitles:SubtitlesQueueDisplayConverter x:Key="subtitleTrackDisplayConverter" />
<video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" />
<video:VideoOptionsTooltipConverter x:Key="videoOptionsTooltipConverter" />
<queue:PictureSettingsDescConveter x:Key="pictureSettingsDescConverter" />
+ <queue:FilterSettingsDescConverter x:Key="filterSettingsDescConverter" />
<Converters:ThemeImageConverter x:Key="themeConverter" />
<main:PointToPointConverter x:Key="PointToPointConverter" />
@@ -417,6 +417,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -446,19 +447,22 @@
<TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" />
<TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="3" Grid.Column="1" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="4" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="4" Grid.Column="1" TextWrapping="Wrap" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_FilterSettings}" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource filterSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="4" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="5" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="5" Grid.Column="1" TextWrapping="Wrap" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="5" Grid.Column="0" VerticalAlignment="Top"/>
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="6" Grid.Column="0" VerticalAlignment="Top"/>
<TextBlock Text="{Binding SelectedTask.Task.AudioTracks, Converter={StaticResource audioTrackDisplayConverter}}"
- Grid.Row="5" Grid.Column="1" />
+ Grid.Row="6" Grid.Column="1" />
- <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="6" Grid.Column="0" />
+ <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="7" Grid.Column="0" />
<TextBlock Text="{Binding SelectedTask.Task.SubtitleTracks, Converter={StaticResource subtitleTrackDisplayConverter}}"
- Grid.Row="6" Grid.Column="1" />
+ Grid.Row="7" Grid.Column="1" />
- <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="7" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" />
- <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="7" Grid.Column="1" TextWrapping="Wrap" />
+ <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="8" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="8" Grid.Column="1" TextWrapping="Wrap" />
</Grid>
</StackPanel>