From 2b6a2d0478029c0f37169f25f236f040bba09dcb Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 22 Sep 2017 22:02:54 +0100 Subject: WinGui: Change the Preset Selection to a Menu based design as it offers faster navigation than 2 dropdowns. --- .../Properties/ResourcesUI.Designer.cs | 27 ++++++++++++++-------- win/CS/HandBrakeWPF/Properties/ResourcesUI.resx | 9 +++++--- .../HandBrakeWPF/Services/Presets/Model/Preset.cs | 10 ++++++++ win/CS/HandBrakeWPF/Views/MainView.xaml | 27 +++++++++++++++++++--- win/CS/HandBrakeWPF/Views/MainView.xaml.cs | 11 +++++++++ win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml | 1 - win/CS/HandBrakeWPF/Views/QueueView.xaml | 2 -- 7 files changed, 69 insertions(+), 18 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs index 29bf21352..58f88cf3b 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs @@ -1753,6 +1753,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Custom. + /// + public static string Preset_Custom { + get { + return ResourceManager.GetString("Preset_Custom", resourceCulture); + } + } + /// /// Looks up a localized string similar to Export to file. /// @@ -1771,6 +1780,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Official. + /// + public static string Preset_Official { + get { + return ResourceManager.GetString("Preset_Official", resourceCulture); + } + } + /// /// Looks up a localized string similar to Change the behaviour of the subtitle track selection for this preset. ///This will not affect your current settings in the Subtitle tab.. @@ -1907,15 +1925,6 @@ namespace HandBrakeWPF.Properties { } } - /// - /// Looks up a localized string similar to Import Queue. - /// - public static string QueueView_Import { - get { - return ResourceManager.GetString("QueueView_Import", resourceCulture); - } - } - /// /// Looks up a localized string similar to Lock System. /// diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx index 0fa80b85b..8efdc2de5 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx @@ -510,9 +510,6 @@ Hibernate - - Import Queue - Lock System @@ -980,4 +977,10 @@ This will not affect your current settings in the Subtitle tab. Delete Preset + + Custom + + + Official + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs index 1afeefb94..d0cd4c617 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs @@ -13,6 +13,7 @@ namespace HandBrakeWPF.Services.Presets.Model using HandBrakeWPF.Model.Audio; using HandBrakeWPF.Model.Subtitles; + using HandBrakeWPF.Properties; using HandBrakeWPF.Services.Presets.Interfaces; using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask; @@ -76,6 +77,15 @@ namespace HandBrakeWPF.Services.Presets.Model /// public bool IsExpanded { get; set; } + public string DisplayValue + { + get + { + string globalCateogry = this.IsBuildIn ? ResourcesUI.Preset_Official : ResourcesUI.Preset_Custom; + return string.Format("{0} > {1} > {2}", globalCateogry, this.Category, this.Name); + } + } + public bool IsSelected { get diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 34a7c159a..06e1904f4 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -104,7 +104,6 @@ - @@ -346,7 +345,29 @@