From ceafd5714c628ec292dfc603dbe807fa23884009 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 14 Jul 2019 21:57:32 +0100 Subject: [PATCH] WinGui: Remove the experimental embedded queue. It's not been working right for a while and I don't intend to develop it out. --- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 7 - .../Properties/Resources.Designer.cs | 9 - win/CS/HandBrakeWPF/Properties/Resources.resx | 3 - win/CS/HandBrakeWPF/UserSettingConstants.cs | 1 - .../ViewModels/Interfaces/IQueueViewModel.cs | 2 - .../HandBrakeWPF/ViewModels/MainViewModel.cs | 37 +-- .../ViewModels/OptionsViewModel.cs | 25 -- .../HandBrakeWPF/ViewModels/QueueViewModel.cs | 2 - win/CS/HandBrakeWPF/Views/OptionsView.xaml | 1 - win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml | 284 ------------------ .../HandBrakeWPF/Views/Queue/Embedded.xaml.cs | 27 -- win/CS/HandBrakeWPF/defaultsettings.xml | 8 - 12 files changed, 9 insertions(+), 397 deletions(-) delete mode 100644 win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml delete mode 100644 win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml.cs diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 00a853bef..e612bb8e4 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -364,9 +364,6 @@ MiniView.xaml - - Embedded.xaml - ShellView.xaml @@ -575,10 +572,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - Designer MSBuild:Compile diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 9ad37148d..38f971306 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -2976,15 +2976,6 @@ namespace HandBrakeWPF.Properties { } } - /// - /// Looks up a localized string similar to Show Queue in line with the main UI. (Experimental Feature). - /// - public static string Options_ShowQueueInline { - get { - return ResourceManager.GetString("Options_ShowQueueInline", resourceCulture); - } - } - /// /// Looks up a localized string similar to Show 'Add All to Queue' on the toolbar. /// diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index e707d01e7..01f9b9c53 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -1300,9 +1300,6 @@ Would you like to overwrite it? Show the new experimental queue design. - - Show Queue in line with the main UI. (Experimental Feature) - Change case to Title Case diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index c5c9d5ad7..c591443b5 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -53,7 +53,6 @@ namespace HandBrakeWPF public const string SaveLogWithVideo = "SaveLogWithVideo"; public const string SaveLogCopyDirectory = "SaveLogCopyDirectory"; public const string ClearCompletedFromQueue = "ClearCompletedFromQueue"; - public const string ShowQueueInline = "ShowQueueInline"; public const string ForcePresetReset = "ForcePresetReset"; public const string PresetExpandedStateList = "PresetExpandedStateList"; public const string ShowStatusInTitleBar = "ShowStatusInTitleBar"; diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs index 0ee439e81..d01353376 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs @@ -16,8 +16,6 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// public interface IQueueViewModel { - bool IsInline { set; } - /// /// The when done action after a queue completes. /// diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 731a2e090..8fc0dde59 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1265,41 +1265,22 @@ namespace HandBrakeWPF.ViewModels /// public void OpenQueueWindow() { - bool showQueueInline = this.userSettingService.GetUserSetting(UserSettingConstants.ShowQueueInline) && VersionHelper.IsNightly(); - this.QueueViewModel.IsInline = showQueueInline; + this.IsQueueShowingInLine = false; + this.NotifyOfPropertyChange(() => this.IsQueueShowingInLine); - if (showQueueInline) + Window window = Application.Current.Windows.Cast().FirstOrDefault(x => x.GetType() == typeof(QueueView)); + if (window != null) { - this.IsQueueShowingInLine = !this.IsQueueShowingInLine; - if (this.IsQueueShowingInLine) - { - this.QueueViewModel.Activate(); - } - else + if (window.WindowState == WindowState.Minimized) { - this.QueueViewModel.Deactivate(); + window.WindowState = WindowState.Normal; } - this.NotifyOfPropertyChange(() => this.IsQueueShowingInLine); + + window.Activate(); } else { - this.IsQueueShowingInLine = false; - this.NotifyOfPropertyChange(() => this.IsQueueShowingInLine); - - Window window = Application.Current.Windows.Cast().FirstOrDefault(x => x.GetType() == typeof(QueueView)); - if (window != null) - { - if (window.WindowState == WindowState.Minimized) - { - window.WindowState = WindowState.Normal; - } - - window.Activate(); - } - else - { - this.windowManager.ShowWindow(IoC.Get()); - } + this.windowManager.ShowWindow(IoC.Get()); } } diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index b8d9b89f2..4d44d192e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -91,7 +91,6 @@ namespace HandBrakeWPF.ViewModels private bool removePunctuation; private bool resetWhenDoneAction; private bool enableQuickSyncDecoding; - private bool showQueueInline; private bool pauseOnLowDiskspace; private long pauseOnLowDiskspaceLevel; private bool useQsvDecodeForNonQsvEnc; @@ -387,26 +386,6 @@ namespace HandBrakeWPF.ViewModels } } - /// - /// Gets or sets a value indicating whether show queue inline. - /// - public bool ShowQueueInline - { - get - { - return this.showQueueInline; - } - set - { - if (value == this.showQueueInline) - { - return; - } - this.showQueueInline = value; - this.NotifyOfPropertyChange(() => this.ShowQueueInline); - } - } - /// /// Gets or sets a value indicating whether to show encode status in the tile bar. /// @@ -1470,7 +1449,6 @@ namespace HandBrakeWPF.ViewModels this.CheckForUpdatesFrequency = 1; } - this.ShowQueueInline = this.userSettingService.GetUserSetting(UserSettingConstants.ShowQueueInline); this.ShowStatusInTitleBar = this.userSettingService.GetUserSetting(UserSettingConstants.ShowStatusInTitleBar); this.ShowPreviewOnSummaryTab = this.userSettingService.GetUserSetting(UserSettingConstants.ShowPreviewOnSummaryTab); this.ShowAddAllToQueue = this.userSettingService.GetUserSetting(UserSettingConstants.ShowAddAllToQueue); @@ -1683,9 +1661,6 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddAllToQueue, this.ShowAddAllToQueue); this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddSelectionToQueue, this.ShowAddSelectionToQueue); - /* Experiments */ - this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline); - /* When Done */ this.userSettingService.SetUserSetting(UserSettingConstants.WhenCompleteAction, (int)this.WhenDone); this.userSettingService.SetUserSetting(UserSettingConstants.ResetWhenDoneAction, this.ResetWhenDoneAction); diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index f82ec9621..0cb68435e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -248,8 +248,6 @@ namespace HandBrakeWPF.ViewModels } } - public bool IsInline { get; set; } - public bool StatsVisible { get diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index ce1db7a3b..3069acccb 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -121,7 +121,6 @@ - diff --git a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml deleted file mode 100644 index 85c52e811..000000000 --- a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml.cs b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml.cs deleted file mode 100644 index 74109f775..000000000 --- a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// Interaction logic for Embedded.xaml -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.Views.Queue -{ - using System.Windows.Controls; - - /// - /// Interaction logic for VideoView - /// - public partial class Embedded : UserControl - { - /// - /// Initializes a new instance of the class. - /// - public Embedded() - { - this.InitializeComponent(); - } - } -} diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 08ef76557..48918c95e 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -384,14 +384,6 @@ false - - - ShowQueueInline - - - false - - PauseOnLowDiskspace -- 2.40.0