From 4a75f67486474b024d2264481cbe9e172a3e98f4 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 13 Oct 2019 18:03:58 +0100 Subject: WinGui: Catchup some remaining strings that were not localisable. #2345 --- win/CS/HandBrake.Interop/Attributes/DisplayName.cs | 2 +- .../Converters/Options/Mp4BehaviourConverter.cs | 24 ++ .../Converters/Options/ProcessPriorityConverter.cs | 24 ++ .../Converters/Options/UpdateCheckConverter.cs | 19 ++ .../Converters/ResourceConverterBase.cs | 89 ++++++ win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 9 +- win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs | 8 +- .../Model/Audio/AudioBehaviourModes.cs | 8 +- .../Model/Audio/AudioTrackDefaultsMode.cs | 6 +- win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs | 28 ++ .../HandBrakeWPF/Model/Options/ProcessPriority.cs | 33 +++ win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs | 24 ++ win/CS/HandBrakeWPF/Model/OptionsTab.cs | 16 +- .../Model/Picture/PresetPictureSettingsMode.cs | 10 +- .../Model/Subtitles/SubtitleBehaviourModes.cs | 8 +- .../Subtitles/SubtitleBurnInBehaviourModes.cs | 10 +- .../HandBrakeWPF/Properties/Resources.Designer.cs | 299 ++++++++++++++++++++- win/CS/HandBrakeWPF/Properties/Resources.resx | 101 ++++++- .../Encode/Model/Models/PointToPointMode.cs | 10 +- .../HandBrakeWPF/Services/Scan/Model/Subtitle.cs | 3 +- win/CS/HandBrakeWPF/UserSettingConstants.cs | 2 +- .../HandBrakeWPF/ViewModels/ChaptersViewModel.cs | 2 +- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 13 +- win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 122 +++------ .../HandBrakeWPF/ViewModels/SubtitlesViewModel.cs | 2 +- win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs | 9 +- win/CS/HandBrakeWPF/Views/OptionsView.xaml | 10 +- win/CS/HandBrakeWPF/Views/SummaryView.xaml | 2 +- win/CS/HandBrakeWPF/defaultsettings.xml | 6 +- 29 files changed, 749 insertions(+), 150 deletions(-) create mode 100644 win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs create mode 100644 win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs create mode 100644 win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs create mode 100644 win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs create mode 100644 win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs create mode 100644 win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs create mode 100644 win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs diff --git a/win/CS/HandBrake.Interop/Attributes/DisplayName.cs b/win/CS/HandBrake.Interop/Attributes/DisplayName.cs index 07512fc3a..e359a7fba 100644 --- a/win/CS/HandBrake.Interop/Attributes/DisplayName.cs +++ b/win/CS/HandBrake.Interop/Attributes/DisplayName.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // diff --git a/win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs new file mode 100644 index 000000000..2ef6ad204 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/Mp4BehaviourConverter.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Process Priority Converter +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters.Options +{ + using System; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Windows.Data; + + using HandBrakeWPF.Model.Options; + using HandBrakeWPF.Utilities; + + public class Mp4BehaviourConverter : ResourceConverterBase, IValueConverter + { + } +} diff --git a/win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs new file mode 100644 index 000000000..2ab2bac66 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/ProcessPriorityConverter.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Process Priority Converter +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters.Options +{ + using System; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Windows.Data; + + using HandBrakeWPF.Model.Options; + using HandBrakeWPF.Utilities; + + public class ProcessPriorityConverter : ResourceConverterBase, IValueConverter + { + } +} diff --git a/win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs new file mode 100644 index 000000000..3f4de9df7 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/UpdateCheckConverter.cs @@ -0,0 +1,19 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Defines the UpdateCheckConverter type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters.Options +{ + using System.Windows.Data; + + using HandBrakeWPF.Model.Options; + + public class UpdateCheckConverter : ResourceConverterBase, IValueConverter + { + } +} diff --git a/win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs b/win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs new file mode 100644 index 000000000..36a588f59 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/ResourceConverterBase.cs @@ -0,0 +1,89 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Defines the ResourceConverterBase type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Converters +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + + using HandBrakeWPF.Model.Options; + using HandBrakeWPF.Utilities; + + public class ResourceConverterBase + { + /// + /// The convert. + /// + /// + /// The value. + /// + /// + /// The target type. + /// + /// + /// The parameter. + /// + /// + /// The culture. + /// + /// + /// The . + /// + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null && value.GetType() == typeof(BindingList)) + { + return + new BindingList( + EnumHelper.GetEnumDisplayValues(typeof(T)).ToList()); + } + + if (value != null && value.GetType() == typeof(T)) + { + return EnumHelper.GetDisplay((T)value); + } + + return null; + } + + /// + /// The convert back. + /// + /// + /// The value. + /// + /// + /// The target type. + /// + /// + /// The parameter. + /// + /// + /// The culture. + /// + /// + /// The . + /// + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + string name = value as string; + if (!string.IsNullOrEmpty(name)) + { + return EnumHelper.GetValue(name); + } + + return null; + } + } +} diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index fbb3669ca..de8fd7786 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -136,6 +136,11 @@ + + + + + @@ -173,14 +178,16 @@ + + - True True + True Resources.resx diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs index 9506fa0e9..ff76aee70 100644 --- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs @@ -179,15 +179,15 @@ namespace HandBrakeWPF.Helpers */ if (task.OutputFormat == OutputFormat.Mp4) { - switch (userSettingService.GetUserSetting(UserSettingConstants.UseM4v)) + switch ((Mp4Behaviour)userSettingService.GetUserSetting(UserSettingConstants.UseM4v)) { - case 0: // Automatic + case Mp4Behaviour.Auto: // Automatic destinationFilename += task.IncludeChapterMarkers || MP4Helper.RequiresM4v(task) ? ".m4v" : ".mp4"; break; - case 1: // Always MP4 + case Mp4Behaviour.MP4: // Always MP4 destinationFilename += ".mp4"; break; - case 2: // Always M4V + case Mp4Behaviour.M4V: // Always M4V destinationFilename += ".m4v"; break; } diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs index 7237c7c64..b1758c1d9 100644 --- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs +++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourModes.cs @@ -11,20 +11,22 @@ namespace HandBrakeWPF.Model.Audio { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// The audio behaviours. /// public enum AudioBehaviourModes { - [DisplayName("No Audio")] + [DisplayName(typeof(Resources), "AudioBehaviourModes_None")] [ShortName("none")] None = 0, - [DisplayName("First Matching Selected Language")] + [DisplayName(typeof(Resources), "AudioBehaviourModes_FirstMatch")] [ShortName("first")] FirstMatch, - [DisplayName("All Matching Selected Languages")] + [DisplayName(typeof(Resources), "AudioBehaviourModes_AllMatching")] [ShortName("all")] AllMatching, } diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs index b36a31ec5..43f91da16 100644 --- a/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs +++ b/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs @@ -11,15 +11,17 @@ namespace HandBrakeWPF.Model.Audio { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// The audio behaviours. /// public enum AudioTrackDefaultsMode { - [DisplayName("Use First Track as template")] + [DisplayName(typeof(Resources), "AudioBehaviourModes_FirstTrack")] FirstTrack = 0, - [DisplayName("Use All Tracks as templates")] + [DisplayName(typeof(Resources), "AudioBehaviourModes_AllTracks")] AllTracks, } } diff --git a/win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs b/win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs new file mode 100644 index 000000000..9844e25de --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Options/Mp4Behaviour.cs @@ -0,0 +1,28 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Defines the Mp4Behaviour type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Model.Options +{ + using HandBrake.Interop.Attributes; + + using HandBrakeWPF.Properties; + + public enum Mp4Behaviour + { + [DisplayName(typeof(Resources), "Mp4Behaviour_Auto")] + Auto = 0, + + [DisplayName(typeof(Resources), "Mp4Behaviour_UseMp4")] + MP4, + + [DisplayName(typeof(Resources), "Mp4Behaviour_UseM4v")] + M4V, + } +} + diff --git a/win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs b/win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs new file mode 100644 index 000000000..f39843d26 --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Options/ProcessPriority.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Defines the ProcessPriority type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Model.Options +{ + using HandBrake.Interop.Attributes; + + using HandBrakeWPF.Properties; + + public enum ProcessPriority + { + [DisplayName(typeof(Resources), "ProcessPriority_High")] + High = 0, + + [DisplayName(typeof(Resources), "ProcessPriority_AboveNormal")] + AboveNormal, + + [DisplayName(typeof(Resources), "ProcessPriority_Normal")] + Normal, + + [DisplayName(typeof(Resources), "ProcessPriority_BelowNormal")] + BelowNormal, + + [DisplayName(typeof(Resources), "ProcessPriority_Low")] + Low + } +} \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs b/win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs new file mode 100644 index 000000000..f762f3e6f --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/Options/UpdateCheck.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// Defines the UpdateCheck type. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Model.Options +{ + using HandBrake.Interop.Attributes; + + using HandBrakeWPF.Properties; + + public enum UpdateCheck + { + [DisplayName(typeof(Resources), "UpdateCheck_Monthly")] + Monthly = 0, + + [DisplayName(typeof(Resources), "UpdateCheck_Weekly")] + Weekly, + } +} diff --git a/win/CS/HandBrakeWPF/Model/OptionsTab.cs b/win/CS/HandBrakeWPF/Model/OptionsTab.cs index 1ca93ca10..bcdcb4e99 100644 --- a/win/CS/HandBrakeWPF/Model/OptionsTab.cs +++ b/win/CS/HandBrakeWPF/Model/OptionsTab.cs @@ -11,30 +11,32 @@ namespace HandBrakeWPF.Model { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// A enum representing each tab on the options screen. /// public enum OptionsTab { - [DisplayName("General")] + [DisplayName(typeof(Resources), "Options_General")] General = 0, - [DisplayName("Output Files")] + [DisplayName(typeof(Resources), "Options_OutputFiles")] OutputFiles, - [DisplayName("When Done")] + [DisplayName(typeof(Resources), "Options_WhenDone")] WhenDone, - [DisplayName("Video")] + [DisplayName(typeof(Resources), "Options_Video")] Video, - [DisplayName("Advanced")] + [DisplayName(typeof(Resources), "Options_Advanced")] Advanced, - [DisplayName("Updates")] + [DisplayName(typeof(Resources), "Options_Updates")] Updates, - [DisplayName("About HandBrake")] + [DisplayName(typeof(Resources), "Options_About")] About, } } diff --git a/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs b/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs index 7db70c79c..517da08ee 100644 --- a/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs +++ b/win/CS/HandBrakeWPF/Model/Picture/PresetPictureSettingsMode.cs @@ -11,16 +11,20 @@ namespace HandBrakeWPF.Model.Picture { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// Picture Settings Mode when adding presets /// public enum PresetPictureSettingsMode { - [DisplayName("None")] + [DisplayName(typeof(Resources), "PresetPictureSettingsMode_None")] None = 0, - [DisplayName("Custom")] + + [DisplayName(typeof(Resources), "PresetPictureSettingsMode_Custom")] Custom = 1, - [DisplayName("Always use Source Resolution")] + + [DisplayName(typeof(Resources), "PresetPictureSettingsMode_SourceMaximum")] SourceMaximum = 2, } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs index efdffc2aa..bbb98ee9c 100644 --- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBehaviourModes.cs @@ -11,20 +11,22 @@ namespace HandBrakeWPF.Model.Subtitles { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// The subtitle behaviours modes. /// public enum SubtitleBehaviourModes { - [DisplayName("None")] + [DisplayName(typeof(Resources), "SubtitleBehaviourModes_None")] [ShortName("none")] None = 0, - [DisplayName("First Matching Selected Language")] + [DisplayName(typeof(Resources), "SubtitleBehaviourModes_FirstMatching")] [ShortName("first")] FirstMatch, - [DisplayName("All Matching Selected Languages")] + [DisplayName(typeof(Resources), "SubtitleBehaviourModes_AllMatching")] [ShortName("all")] AllMatching, } diff --git a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs index 37088a4cb..ee846a248 100644 --- a/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs +++ b/win/CS/HandBrakeWPF/Model/Subtitles/SubtitleBurnInBehaviourModes.cs @@ -11,24 +11,26 @@ namespace HandBrakeWPF.Model.Subtitles { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// The subtitle behaviours modes. /// public enum SubtitleBurnInBehaviourModes { - [DisplayName("None")] + [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_None")] [ShortName("none")] None = 0, - [DisplayName("Foreign Audio Track")] + [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_ForeignAudioTrack")] [ShortName("foreign")] ForeignAudio, - [DisplayName("First Track")] + [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_FirstTrack")] [ShortName("first")] FirstTrack, - [DisplayName("Foreign Audio Preferred, else First")] + [DisplayName(typeof(Resources), "SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst")] [ShortName("foreign_first")] ForeignAudioPreferred, } diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 8e4931c68..e6b1887b1 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -220,6 +220,51 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to All Matching Selected Languages. + /// + public static string AudioBehaviourModes_AllMatching { + get { + return ResourceManager.GetString("AudioBehaviourModes_AllMatching", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use All Tracks as templates. + /// + public static string AudioBehaviourModes_AllTracks { + get { + return ResourceManager.GetString("AudioBehaviourModes_AllTracks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to First Matching Selected Language. + /// + public static string AudioBehaviourModes_FirstMatch { + get { + return ResourceManager.GetString("AudioBehaviourModes_FirstMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use First Track as template. + /// + public static string AudioBehaviourModes_FirstTrack { + get { + return ResourceManager.GetString("AudioBehaviourModes_FirstTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Audio. + /// + public static string AudioBehaviourModes_None { + get { + return ResourceManager.GetString("AudioBehaviourModes_None", resourceCulture); + } + } + /// /// Looks up a localized string similar to Add Track. /// @@ -690,6 +735,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Chapter {0}. + /// + public static string ChapterViewModel_Chapter { + get { + return ResourceManager.GetString("ChapterViewModel_Chapter", resourceCulture); + } + } + /// /// Looks up a localized string similar to The system clipboard is currently unavailable.. /// @@ -2593,6 +2647,33 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Automatic. + /// + public static string Mp4Behaviour_Auto { + get { + return ResourceManager.GetString("Mp4Behaviour_Auto", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Always use M4V. + /// + public static string Mp4Behaviour_UseM4v { + get { + return ResourceManager.GetString("Mp4Behaviour_UseM4v", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Always use MP4. + /// + public static string Mp4Behaviour_UseMp4 { + get { + return ResourceManager.GetString("Mp4Behaviour_UseMp4", resourceCulture); + } + } + /// /// Looks up a localized string similar to No Additional Information. /// @@ -2949,6 +3030,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Output Files. + /// + public static string Options_OutputFiles { + get { + return ResourceManager.GetString("Options_OutputFiles", resourceCulture); + } + } + /// /// Looks up a localized string similar to Path: . /// @@ -3238,7 +3328,7 @@ namespace HandBrakeWPF.Properties { } /// - /// Looks up a localized string similar to &#60; Back. + /// Looks up a localized string similar to < Back. /// public static string OptionsView_BackButton { get { @@ -3754,6 +3844,42 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Chapters. + /// + public static string PointToPointMode_Chapters { + get { + return ResourceManager.GetString("PointToPointMode_Chapters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frames. + /// + public static string PointToPointMode_Frames { + get { + return ResourceManager.GetString("PointToPointMode_Frames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preview. + /// + public static string PointToPointMode_Preview { + get { + return ResourceManager.GetString("PointToPointMode_Preview", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Seconds. + /// + public static string PointToPointMode_Seconds { + get { + return ResourceManager.GetString("PointToPointMode_Seconds", resourceCulture); + } + } + /// /// Looks up a localized string similar to Portable Mode: Unable to read portable.ini. There may be an error in this file. Please retry using portable.ini.template as a guide.. /// @@ -3869,6 +3995,33 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Custom. + /// + public static string PresetPictureSettingsMode_Custom { + get { + return ResourceManager.GetString("PresetPictureSettingsMode_Custom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None. + /// + public static string PresetPictureSettingsMode_None { + get { + return ResourceManager.GetString("PresetPictureSettingsMode_None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Always use Source Resolution. + /// + public static string PresetPictureSettingsMode_SourceMaximum { + get { + return ResourceManager.GetString("PresetPictureSettingsMode_SourceMaximum", resourceCulture); + } + } + /// /// Looks up a localized string similar to HandBrake is unable to upgrade your presets file to a new version format. ///Your preset file will be archived and new one created. You will need to re-create your own presets.. @@ -3955,6 +4108,51 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Above Normal. + /// + public static string ProcessPriority_AboveNormal { + get { + return ResourceManager.GetString("ProcessPriority_AboveNormal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Below Normal. + /// + public static string ProcessPriority_BelowNormal { + get { + return ResourceManager.GetString("ProcessPriority_BelowNormal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to High. + /// + public static string ProcessPriority_High { + get { + return ResourceManager.GetString("ProcessPriority_High", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Low. + /// + public static string ProcessPriority_Low { + get { + return ResourceManager.GetString("ProcessPriority_Low", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Normal. + /// + public static string ProcessPriority_Normal { + get { + return ResourceManager.GetString("ProcessPriority_Normal", resourceCulture); + } + } + /// /// Looks up a localized string similar to Question. /// @@ -5002,6 +5200,78 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Foreign Audio Scan. + /// + public static string Subtitle_ForeignAudioScan { + get { + return ResourceManager.GetString("Subtitle_ForeignAudioScan", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All Matching Selected Languages. + /// + public static string SubtitleBehaviourModes_AllMatching { + get { + return ResourceManager.GetString("SubtitleBehaviourModes_AllMatching", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to First Matching Selected Language. + /// + public static string SubtitleBehaviourModes_FirstMatching { + get { + return ResourceManager.GetString("SubtitleBehaviourModes_FirstMatching", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None. + /// + public static string SubtitleBehaviourModes_None { + get { + return ResourceManager.GetString("SubtitleBehaviourModes_None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to First Track. + /// + public static string SubtitleBurnInBehaviourModes_FirstTrack { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_FirstTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Foreign Audio Preferred, else First. + /// + public static string SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_ForeignAudioPreferredElseFirst", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Foreign Audio Track. + /// + public static string SubtitleBurnInBehaviourModes_ForeignAudioTrack { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_ForeignAudioTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None. + /// + public static string SubtitleBurnInBehaviourModes_None { + get { + return ResourceManager.GetString("SubtitleBurnInBehaviourModes_None", resourceCulture); + } + } + /// /// Looks up a localized string similar to None - Only tracks where the container does not support the format will be burned in. ///Foreign Audio Track - The Foreign Audio track will be burned in if available. @@ -5171,6 +5441,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Foreign Audio Search. + /// + public static string SubtitleViewModel_ForeignAudioSearch { + get { + return ResourceManager.GetString("SubtitleViewModel_ForeignAudioSearch", resourceCulture); + } + } + /// /// Looks up a localized string similar to Additional Audio Tracks. /// @@ -5379,6 +5658,24 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Monthly. + /// + public static string UpdateCheck_Monthly { + get { + return ResourceManager.GetString("UpdateCheck_Monthly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Weekly. + /// + public static string UpdateCheck_Weekly { + get { + return ResourceManager.GetString("UpdateCheck_Weekly", resourceCulture); + } + } + /// /// Looks up a localized string similar to Updated. /// diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index f5d81335b..576f10799 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -2070,9 +2070,108 @@ Where supported, any user presets will have been imported. Click 'Check for Updates' to check for new versions - &#60; Back + < Back Currently Paused + + Output Files + + + Chapters + + + Frames + + + Preview + + + Seconds + + + All Matching Selected Languages + + + First Matching Selected Language + + + None + + + First Track + + + Foreign Audio Preferred, else First + + + Foreign Audio Track + + + None + + + Foreign Audio Search + + + Foreign Audio Scan + + + All Matching Selected Languages + + + Use All Tracks as templates + + + First Matching Selected Language + + + Use First Track as template + + + No Audio + + + Chapter {0} + + + Automatic + + + Always use M4V + + + Always use MP4 + + + Custom + + + None + + + Always use Source Resolution + + + Above Normal + + + Below Normal + + + High + + + Low + + + Normal + + + Monthly + + + Weekly + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs index c68f49474..b928abfe5 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/PointToPointMode.cs @@ -11,24 +11,26 @@ namespace HandBrakeWPF.Services.Encode.Model.Models { using HandBrake.Interop.Attributes; + using HandBrakeWPF.Properties; + /// /// Point to Point Mode /// public enum PointToPointMode { - [DisplayName("Chapters")] + [DisplayName(typeof(Resources), "PointToPointMode_Chapters")] [ShortName("chapter")] Chapters = 0, - [DisplayName("Seconds")] + [DisplayName(typeof(Resources), "PointToPointMode_Seconds")] [ShortName("time")] Seconds, - [DisplayName("Frames")] + [DisplayName(typeof(Resources), "PointToPointMode_Frames")] [ShortName("frame")] Frames, - [DisplayName("Preview")] + [DisplayName(typeof(Resources), "PointToPointMode_Preview")] [ShortName("preview")] Preview, } diff --git a/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs b/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs index 1fade0311..ff3b946a9 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/Model/Subtitle.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.Services.Scan.Model using HandBrake.Interop.Utilities; + using HandBrakeWPF.Properties; using HandBrakeWPF.Services.Encode.Model.Models; using HandBrakeWPF.Utilities; @@ -122,7 +123,7 @@ namespace HandBrakeWPF.Services.Scan.Model /// A string formatted as: {track #} {language} public override string ToString() { - return this.SubtitleType == SubtitleType.ForeignAudioSearch ? "Foreign Audio Scan" : string.Format("{0} {1}", this.TrackNumber, this.Language); + return this.SubtitleType == SubtitleType.ForeignAudioSearch ? Resources.Subtitle_ForeignAudioScan : string.Format("{0} {1}", this.TrackNumber, this.Language); } /// diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 92832a124..9c3abc470 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -48,7 +48,7 @@ namespace HandBrakeWPF public const string PreviewScanCount = "previewScanCount"; public const string Verbosity = "Verbosity"; public const string MinScanDuration = "MinTitleScanDuration"; - public const string ProcessPriority = "ProcessPriority"; + public const string ProcessPriorityInt = "ProcessPriorityInt"; public const string SaveLogToCopyDirectory = "SaveLogToCopyDirectory"; public const string SaveLogWithVideo = "SaveLogWithVideo"; public const string SaveLogCopyDirectory = "SaveLogCopyDirectory"; diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index 30efc9200..b47b9dcee 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -348,7 +348,7 @@ namespace HandBrakeWPF.ViewModels foreach (Chapter chapter in this.SourceChapterList) { - string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName; + string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format(Resources.ChapterViewModel_Chapter, counter) : chapter.ChapterName; var marker = new ChapterMarker(chapter.ChapterNumber, chapterName, chapter.Duration); this.Chapters.Add(marker); diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 6d1ce70ce..92c9c53e5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -173,21 +173,18 @@ namespace HandBrakeWPF.ViewModels this.Drives = new BindingList(); // Set Process Priority - switch (this.userSettingService.GetUserSetting(UserSettingConstants.ProcessPriority)) + switch ((ProcessPriority)this.userSettingService.GetUserSetting(UserSettingConstants.ProcessPriorityInt)) { - case "Realtime": - Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime; - break; - case "High": + case ProcessPriority.High: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High; break; - case "Above Normal": + case ProcessPriority.AboveNormal: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal; break; - case "Normal": + case ProcessPriority.Normal: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal; break; - case "Low": + case ProcessPriority.Low: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle; break; default: diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index c3d407f92..bc8c241bd 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -55,8 +55,7 @@ namespace HandBrakeWPF.ViewModels private string autonameFormat; private bool changeToTitleCase; private bool checkForUpdates; - private BindingList checkForUpdatesFrequencies = new BindingList(); - private int checkForUpdatesFrequency; + private UpdateCheck checkForUpdatesFrequency; private bool clearOldOlgs; private BindingList constantQualityGranularity = new BindingList(); private bool copyLogToEncodeDirectory; @@ -66,22 +65,19 @@ namespace HandBrakeWPF.ViewModels private BindingList logVerbosityOptions = new BindingList(); private long minLength; private bool minimiseToTray; - private BindingList mp4ExtensionOptions = new BindingList(); private bool preventSleep; private BindingList previewPicturesToScan = new BindingList(); - private BindingList priorityLevelOptions = new BindingList(); private bool removeUnderscores; private string selectedGranulairty; - private int selectedMp4Extension; + private Mp4Behaviour selectedMp4Extension; private int selectedPreviewCount; - private string selectedPriority; + private ProcessPriority selectedPriority; private int selectedVerbosity; private bool sendFileAfterEncode; private string sendFileTo; private string sendFileToPath; private string vlcPath; private WhenDone whenDone; - private BindingList whenDoneOptions = new BindingList(); private bool clearQueueOnEncodeCompleted; private OptionsTab selectedTab; private string updateMessage; @@ -250,24 +246,18 @@ namespace HandBrakeWPF.ViewModels /// /// Gets or sets CheckForUpdatesFrequencies. /// - public BindingList CheckForUpdatesFrequencies + public BindingList CheckForUpdatesFrequencies { get { - return this.checkForUpdatesFrequencies; - } - - set - { - this.checkForUpdatesFrequencies = value; - this.NotifyOfPropertyChange("CheckForUpdatesFrequencies"); + return new BindingList(EnumHelper.GetEnumList().ToList()); } } /// /// Gets or sets a value indicating whether CheckForUpdatesFrequency. /// - public int CheckForUpdatesFrequency + public UpdateCheck CheckForUpdatesFrequency { get { @@ -277,7 +267,7 @@ namespace HandBrakeWPF.ViewModels set { this.checkForUpdatesFrequency = value; - this.NotifyOfPropertyChange("CheckForUpdatesFrequency"); + this.NotifyOfPropertyChange(() => this.CheckForUpdatesFrequency); } } @@ -585,43 +575,34 @@ namespace HandBrakeWPF.ViewModels } /// - /// Gets or sets Mp4ExtensionOptions. + /// Gets or sets a value indicating whether RemoveUnderscores. /// - public BindingList Mp4ExtensionOptions + public bool RemoveUnderscores { get { - return this.mp4ExtensionOptions; + return this.removeUnderscores; } set { - this.mp4ExtensionOptions = value; - this.NotifyOfPropertyChange("Mp4ExtensionOptions"); + this.removeUnderscores = value; + this.NotifyOfPropertyChange("RemoveUnderscores"); } } - /// - /// Gets or sets a value indicating whether RemoveUnderscores. - /// - public bool RemoveUnderscores + public BindingList Mp4ExtensionOptions { get { - return this.removeUnderscores; - } - - set - { - this.removeUnderscores = value; - this.NotifyOfPropertyChange("RemoveUnderscores"); + return new BindingList(EnumHelper.GetEnumList().ToList()); } } /// /// Gets or sets SelectedMp4Extension. /// - public int SelectedMp4Extension + public Mp4Behaviour SelectedMp4Extension { get { @@ -631,7 +612,7 @@ namespace HandBrakeWPF.ViewModels set { this.selectedMp4Extension = value; - this.NotifyOfPropertyChange("SelectedMp4Extension"); + this.NotifyOfPropertyChange(() => this.SelectedMp4Extension); } } @@ -851,20 +832,11 @@ namespace HandBrakeWPF.ViewModels } } - /// - /// Gets or sets PriorityLevelOptions. - /// - public BindingList PriorityLevelOptions + public BindingList PriorityLevelOptions { get { - return this.priorityLevelOptions; - } - - set - { - this.priorityLevelOptions = value; - this.NotifyOfPropertyChange("PriorityLevelOptions"); + return new BindingList(EnumHelper.GetEnumList().ToList()); } } @@ -888,7 +860,7 @@ namespace HandBrakeWPF.ViewModels /// /// Gets or sets SelectedPriority. /// - public string SelectedPriority + public ProcessPriority SelectedPriority { get { @@ -903,19 +875,19 @@ namespace HandBrakeWPF.ViewModels // Set the Process Priority switch (value) { - case "Realtime": - Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime; - break; - case "High": + case ProcessPriority.High: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High; break; - case "Above Normal": + case ProcessPriority.AboveNormal: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal; break; - case "Normal": + case ProcessPriority.Normal: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal; break; - case "Low": + case ProcessPriority.BelowNormal: + Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal; + break; + case ProcessPriority.Low: Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle; break; default: @@ -1439,18 +1411,7 @@ namespace HandBrakeWPF.ViewModels this.SelectedLanguage = InterfaceLanguageUtilities.FindInterfaceLanguage(culture); this.CheckForUpdates = this.userSettingService.GetUserSetting(UserSettingConstants.UpdateStatus); - - // Days between update checks - this.checkForUpdatesFrequencies.Clear(); - this.checkForUpdatesFrequencies.Add("Weekly"); - this.checkForUpdatesFrequencies.Add("Monthly"); - - this.CheckForUpdatesFrequency = this.userSettingService.GetUserSetting(UserSettingConstants.DaysBetweenUpdateCheck); - if (this.CheckForUpdatesFrequency > 1) - { - this.CheckForUpdatesFrequency = 1; - } - + this.CheckForUpdatesFrequency = (UpdateCheck)this.userSettingService.GetUserSetting(UserSettingConstants.DaysBetweenUpdateCheck); this.ShowStatusInTitleBar = this.userSettingService.GetUserSetting(UserSettingConstants.ShowStatusInTitleBar); this.ShowPreviewOnSummaryTab = this.userSettingService.GetUserSetting(UserSettingConstants.ShowPreviewOnSummaryTab); this.ShowAddAllToQueue = this.userSettingService.GetUserSetting(UserSettingConstants.ShowAddAllToQueue); @@ -1461,16 +1422,6 @@ namespace HandBrakeWPF.ViewModels // When Done // ############################# - // On Encode Completion Action - this.whenDoneOptions.Clear(); - this.whenDoneOptions.Add(WhenDone.DoNothing); - this.whenDoneOptions.Add(WhenDone.Shutdown); - this.whenDoneOptions.Add(WhenDone.Sleep); - this.whenDoneOptions.Add(WhenDone.Hibernate); - this.whenDoneOptions.Add(WhenDone.LockSystem); - this.whenDoneOptions.Add(WhenDone.LogOff); - this.whenDoneOptions.Add(WhenDone.QuickHandBrake); - this.WhenDone = (WhenDone)this.userSettingService.GetUserSetting(UserSettingConstants.WhenCompleteAction); if (this.userSettingService.GetUserSetting(UserSettingConstants.ResetWhenDoneAction)) { @@ -1505,11 +1456,7 @@ namespace HandBrakeWPF.ViewModels this.AutonameFormat = this.IsValidAutonameFormat(anf, true) ? anf : "{source}-{title}"; // Use iPod/iTunes friendly .m4v extension for MP4 files. - this.mp4ExtensionOptions.Clear(); - this.mp4ExtensionOptions.Add("Automatic"); - this.mp4ExtensionOptions.Add("Always use MP4"); - this.mp4ExtensionOptions.Add("Always use M4V"); - this.SelectedMp4Extension = this.userSettingService.GetUserSetting(UserSettingConstants.UseM4v); + this.SelectedMp4Extension = (Mp4Behaviour)this.userSettingService.GetUserSetting(UserSettingConstants.UseM4v); // Remove Underscores this.RemoveUnderscores = this.userSettingService.GetUserSetting(UserSettingConstants.AutoNameRemoveUnderscore); @@ -1550,15 +1497,7 @@ namespace HandBrakeWPF.ViewModels // ############################# // CLI // ############################# - - // Priority level for encodes - this.priorityLevelOptions.Clear(); - this.priorityLevelOptions.Add("High"); - this.priorityLevelOptions.Add("Above Normal"); - this.priorityLevelOptions.Add("Normal"); - this.priorityLevelOptions.Add("Below Normal"); - this.priorityLevelOptions.Add("Low"); - this.SelectedPriority = userSettingService.GetUserSetting(UserSettingConstants.ProcessPriority); + this.SelectedPriority = (ProcessPriority)userSettingService.GetUserSetting(UserSettingConstants.ProcessPriorityInt); this.PreventSleep = userSettingService.GetUserSetting(UserSettingConstants.PreventSleep); this.PauseOnLowDiskspace = userSettingService.GetUserSetting(UserSettingConstants.PauseOnLowDiskspace); @@ -1670,7 +1609,6 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenDone, this.PlaySoundWhenDone); this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenQueueDone, this.PlaySoundWhenQueueDone); this.userSettingService.SetUserSetting(UserSettingConstants.WhenDoneAudioFile, this.WhenDoneAudioFileFullPath); - /* Output Files */ this.userSettingService.SetUserSetting(UserSettingConstants.AutoNaming, this.AutomaticallyNameFiles); @@ -1697,7 +1635,7 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.EnableNvencEncoder, this.EnableNvencEncoder); /* System and Logging */ - this.userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority); + this.userSettingService.SetUserSetting(UserSettingConstants.ProcessPriorityInt, this.SelectedPriority); this.userSettingService.SetUserSetting(UserSettingConstants.PreventSleep, this.PreventSleep); this.userSettingService.SetUserSetting(UserSettingConstants.PauseOnLowDiskspace, this.PauseOnLowDiskspace); this.userSettingService.SetUserSetting(UserSettingConstants.PauseQueueOnLowDiskspaceLevel, this.PauseOnLowDiskspaceLevel); diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 21bd11013..7ec789905 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -72,7 +72,7 @@ namespace HandBrakeWPF.ViewModels this.Langauges = LanguageUtilities.MapLanguages().Keys; this.CharacterCodes = CharCodesUtilities.GetCharacterCodes(); - this.foreignAudioSearchTrack = new Subtitle { SubtitleType = SubtitleType.ForeignAudioSearch, Language = "Foreign Audio Search" }; + this.foreignAudioSearchTrack = new Subtitle { SubtitleType = SubtitleType.ForeignAudioSearch, Language = Resources.SubtitleViewModel_ForeignAudioSearch }; this.SourceTracks = new List { this.foreignAudioSearchTrack }; } diff --git a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs index 9e070e6e7..ce4e6969b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs @@ -24,6 +24,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.EventArgs; using HandBrakeWPF.Factories; using HandBrakeWPF.Helpers; + using HandBrakeWPF.Model.Options; using HandBrakeWPF.Properties; using HandBrakeWPF.Services.Encode.Model; using HandBrakeWPF.Services.Encode.Model.Models; @@ -455,15 +456,15 @@ namespace HandBrakeWPF.ViewModels // Make sure the output extension is set correctly based on the users preferences and selection. if (newExtension == ".mp4" || newExtension == ".m4v") { - switch (this.userSettingService.GetUserSetting(UserSettingConstants.UseM4v)) + switch ((Mp4Behaviour)this.userSettingService.GetUserSetting(UserSettingConstants.UseM4v)) { - case 0: // Auto + case Mp4Behaviour.Auto: // Auto newExtension = MP4Helper.RequiresM4v(this.Task) ? ".m4v" : ".mp4"; break; - case 1: // MP4 + case Mp4Behaviour.MP4: // MP4 newExtension = ".mp4"; break; - case 2: // M4v + case Mp4Behaviour.M4V: // M4v newExtension = ".m4v"; break; } diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index a3ce125a5..9f489a574 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -38,7 +38,9 @@ - + + + @@ -102,7 +104,7 @@ - + @@ -204,7 +206,7 @@ - + @@ -367,7 +369,7 @@ - + diff --git a/win/CS/HandBrakeWPF/Views/SummaryView.xaml b/win/CS/HandBrakeWPF/Views/SummaryView.xaml index 3b0f13d38..a6e5081f1 100644 --- a/win/CS/HandBrakeWPF/Views/SummaryView.xaml +++ b/win/CS/HandBrakeWPF/Views/SummaryView.xaml @@ -23,7 +23,7 @@ - + diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 1efd1113a..98e40d45e 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -42,10 +42,10 @@ - ProcessPriority + ProcessPriorityInt - Below Normal + 3 @@ -181,7 +181,7 @@ daysBetweenUpdateCheck - 1 + 0 -- cgit v1.2.3