summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-12-25 16:05:52 +0000
committersr55 <[email protected]>2017-12-25 16:06:27 +0000
commit903ceebfcd0eb6cd8b4c6651b3ec93520c25d18e (patch)
tree56db2aae2465f44045dc9717bcf27e71f3ce4f01 /win
parent2adcc5dca5a2c0b0b10208700641c1c1b7140554 (diff)
WinGui: Toolbar Consistency pt2 #833
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Converters/Subtitles/CanBurnSubtitleConverter.cs47
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs9
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.resx3
3 files changed, 59 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Subtitles/CanBurnSubtitleConverter.cs b/win/CS/HandBrakeWPF/Converters/Subtitles/CanBurnSubtitleConverter.cs
new file mode 100644
index 000000000..36bd40892
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Converters/Subtitles/CanBurnSubtitleConverter.cs
@@ -0,0 +1,47 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CanBurnSubtitleConverter.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>
+// <summary>
+// Subtitle Behaviour Converter
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters.Subtitles
+{
+ using System;
+ using System.Globalization;
+ using System.Windows.Data;
+
+ using HandBrakeWPF.Services.Encode.Model;
+ using HandBrakeWPF.Services.Encode.Model.Models;
+
+ public class CanBurnSubtitleConverter : IMultiValueConverter
+ {
+
+
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (values.Length >= 1)
+ {
+ bool sourceTrackCanBurn = (bool)values[0];
+ SubtitleType type = (SubtitleType)values[1];
+ EncodeTask task = values[2] as EncodeTask;
+
+ if (task != null && OutputFormat.Mp4.Equals(task.OutputFormat) && SubtitleType.PGS.Equals(type))
+ {
+ return false;
+ }
+
+ return sourceTrackCanBurn;
+ }
+
+ return true;
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
index 089502218..4868b37f5 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
@@ -1006,6 +1006,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Show Preview.
+ /// </summary>
+ public static string MainView_ShowPreview {
+ get {
+ return ResourceManager.GetString("MainView_ShowPreview", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Show Queue.
/// </summary>
public static string MainView_ShowQueue {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
index 0b8c69afa..8379ecb7d 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
@@ -1019,4 +1019,7 @@ This will not affect your current settings in the Subtitle tab.</value>
<data name="MainView_SaveNewPreset" xml:space="preserve">
<value>Save New Preset</value>
</data>
+ <data name="MainView_ShowPreview" xml:space="preserve">
+ <value>Show Preview</value>
+ </data>
</root> \ No newline at end of file