From: Sebastian Janning Date: Tue, 10 Apr 2018 13:41:04 +0000 (+0200) Subject: option to disable preview on summary tab (issue #1267) X-Git-Tag: 1.2.0~521 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f799bbdf4ed34636fe9fb4cec6e17fe13ffbcae;p=handbrake option to disable preview on summary tab (issue #1267) --- diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs index 6c09b67bd..a331ce7a1 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs @@ -1689,6 +1689,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Show previews on summary tab.. + /// + public static string OptionsView_ShowPreviewOnSummaryTab { + get { + return ResourceManager.GetString("OptionsView_ShowPreviewOnSummaryTab", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show the encode status in the application title bar.. /// diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx index 16fc60bed..e0b83221c 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx @@ -1022,4 +1022,7 @@ This will not affect your current settings in the Subtitle tab. Preview + + Show previews on summary tab. + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 0d9270d78..34d24d25d 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -236,6 +236,11 @@ namespace HandBrakeWPF /// public const string ShowStatusInTitleBar = "ShowStatusInTitleBar"; + /// + /// Setting to turn on/off the ability to show previews in the summary tab. + /// + public const string ShowPreviewOnSummaryTab = "ShowPreviewOnSummaryTab"; + /// /// Setting to turn on/off the ability to play a sound when an encodeis done. /// diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index b0a47cde0..19209101f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -75,7 +75,7 @@ namespace HandBrakeWPF.ViewModels private int selectedVerbosity; private bool sendFileAfterEncode; private string sendFileTo; - private string sendFileToPath; + private string sendFileToPath; private string vlcPath; private string whenDone; private BindingList whenDoneOptions = new BindingList(); @@ -95,6 +95,7 @@ namespace HandBrakeWPF.ViewModels private long pauseOnLowDiskspaceLevel; private bool useQsvDecodeForNonQsvEnc; private bool showStatusInTitleBar; + private bool showPreviewOnSummaryTab; private string whenDoneAudioFile; private bool playSoundWhenDone; @@ -379,6 +380,23 @@ namespace HandBrakeWPF.ViewModels } } + /// + /// Gets or sets a value indicating whether to show previews in the summary tab. + /// + public bool ShowPreviewOnSummaryTab + { + get + { + return this.showPreviewOnSummaryTab; + } + set + { + if (value == this.showPreviewOnSummaryTab) return; + this.showPreviewOnSummaryTab = value; + this.NotifyOfPropertyChange(() => this.ShowPreviewOnSummaryTab); + } + } + /// /// When Done Audio File /// @@ -484,8 +502,8 @@ namespace HandBrakeWPF.ViewModels { if (this.IsValidAutonameFormat(value, false)) { - this.autonameFormat = value; - } + this.autonameFormat = value; + } this.NotifyOfPropertyChange("AutonameFormat"); } @@ -1280,6 +1298,7 @@ namespace HandBrakeWPF.ViewModels this.ResetWhenDoneAction = this.userSettingService.GetUserSetting(UserSettingConstants.ResetWhenDoneAction); this.ShowQueueInline = this.userSettingService.GetUserSetting(UserSettingConstants.ShowQueueInline); this.ShowStatusInTitleBar = this.userSettingService.GetUserSetting(UserSettingConstants.ShowStatusInTitleBar); + this.ShowPreviewOnSummaryTab = this.userSettingService.GetUserSetting(UserSettingConstants.ShowPreviewOnSummaryTab); this.WhenDoneAudioFile = Path.GetFileNameWithoutExtension(this.userSettingService.GetUserSetting(UserSettingConstants.WhenDoneAudioFile)) ?? string.Empty; this.WhenDoneAudioFileFullPath = this.userSettingService.GetUserSetting(UserSettingConstants.WhenDoneAudioFile); this.PlaySoundWhenDone = this.userSettingService.GetUserSetting(UserSettingConstants.PlaySoundWhenDone); @@ -1443,6 +1462,7 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.ResetWhenDoneAction, this.ResetWhenDoneAction); this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline); this.userSettingService.SetUserSetting(UserSettingConstants.ShowStatusInTitleBar, this.ShowStatusInTitleBar); + this.userSettingService.SetUserSetting(UserSettingConstants.ShowPreviewOnSummaryTab, this.ShowPreviewOnSummaryTab); this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenDone, this.PlaySoundWhenDone); this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenQueueDone, this.PlaySoundWhenQueueDone); this.userSettingService.SetUserSetting(UserSettingConstants.WhenDoneAudioFile, this.WhenDoneAudioFileFullPath); diff --git a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs index ac12baf2c..e2a294009 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs @@ -48,6 +48,8 @@ namespace HandBrakeWPF.ViewModels private bool isPreviousPreviewControlVisible; private bool isNextPreviewControlVisible; + private bool showPreview; + public SummaryViewModel(IScan scanService, IUserSettingService userSettingService) { this.scanService = scanService; @@ -174,6 +176,20 @@ namespace HandBrakeWPF.ViewModels } } + public bool ShowPreview + { + get + { + return this.showPreview; + } + set + { + if (value == this.showPreview) return; + this.showPreview = value; + this.NotifyOfPropertyChange(() => this.ShowPreview); + } + } + #endregion #region Task Properties @@ -492,6 +508,8 @@ namespace HandBrakeWPF.ViewModels // Preview this.PreviewInfo = string.Format(ResourcesUI.SummaryView_PreviewInfo, this.selectedPreview, this.userSettingService.GetUserSetting(UserSettingConstants.PreviewScanCount)); this.NotifyOfPropertyChange(() => this.PreviewInfo); + + this.ShowPreview = this.userSettingService.GetUserSetting(UserSettingConstants.ShowPreviewOnSummaryTab); } private string GetFilterDescription() diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 0743e0b9d..cf2c877e5 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -175,6 +175,7 @@ + diff --git a/win/CS/HandBrakeWPF/Views/SummaryView.xaml b/win/CS/HandBrakeWPF/Views/SummaryView.xaml index 884216802..edfbd1fac 100644 --- a/win/CS/HandBrakeWPF/Views/SummaryView.xaml +++ b/win/CS/HandBrakeWPF/Views/SummaryView.xaml @@ -95,7 +95,9 @@ - +