]> granicus.if.org Git - handbrake/commitdiff
option to disable preview on summary tab (issue #1267)
authorSebastian Janning <janning@innovista.de>
Tue, 10 Apr 2018 13:41:04 +0000 (15:41 +0200)
committerScott <628593+sr55@users.noreply.github.com>
Tue, 10 Apr 2018 18:03:29 +0000 (19:03 +0100)
win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
win/CS/HandBrakeWPF/UserSettingConstants.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs
win/CS/HandBrakeWPF/Views/OptionsView.xaml
win/CS/HandBrakeWPF/Views/SummaryView.xaml

index 6c09b67bdf355ca185d172730e7b07a581d8d740..a331ce7a1cd5499b3b41d3e86f313b84380b0f5d 100644 (file)
@@ -1689,6 +1689,15 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Show previews on summary tab..\r
+        /// </summary>\r
+        public static string OptionsView_ShowPreviewOnSummaryTab {\r
+            get {\r
+                return ResourceManager.GetString("OptionsView_ShowPreviewOnSummaryTab", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Show the encode status in the application title bar..\r
         /// </summary>\r
index 16fc60bed356b0f81e693f6a6e6e1afc5a50be42..e0b83221cc7eaf91e52118c1e794b760c5b8d1e0 100644 (file)
@@ -1022,4 +1022,7 @@ This will not affect your current settings in the Subtitle tab.</value>
   <data name="MainView_ShowPreview" xml:space="preserve">\r
     <value>Preview</value>\r
   </data>\r
+  <data name="OptionsView_ShowPreviewOnSummaryTab" xml:space="preserve">\r
+    <value>Show previews on summary tab.</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 0d9270d784fb0f332c5fbae648a0d8313d2d757d..34d24d25d312f6ae03ec9819b713e708be82e17c 100644 (file)
@@ -236,6 +236,11 @@ namespace HandBrakeWPF
         /// </summary>\r
         public const string ShowStatusInTitleBar = "ShowStatusInTitleBar";\r
 \r
+        /// <summary>\r
+        /// Setting to turn on/off the ability to show previews in the summary tab.\r
+        /// </summary>\r
+        public const string ShowPreviewOnSummaryTab = "ShowPreviewOnSummaryTab";\r
+\r
         /// <summary>\r
         /// Setting to turn on/off the ability to play a sound when an encodeis done.\r
         /// </summary>\r
index b0a47cde0910bd37cff6f81ebc72b1a76979bfba..19209101f0983f83ff1341914070356cee5c5e56 100644 (file)
@@ -75,7 +75,7 @@ namespace HandBrakeWPF.ViewModels
         private int selectedVerbosity;\r
         private bool sendFileAfterEncode;\r
         private string sendFileTo;\r
-        private string sendFileToPath;       \r
+        private string sendFileToPath;\r
         private string vlcPath;\r
         private string whenDone;\r
         private BindingList<string> whenDoneOptions = new BindingList<string>();\r
@@ -95,6 +95,7 @@ namespace HandBrakeWPF.ViewModels
         private long pauseOnLowDiskspaceLevel;\r
         private bool useQsvDecodeForNonQsvEnc;\r
         private bool showStatusInTitleBar;\r
+        private bool showPreviewOnSummaryTab;\r
 \r
         private string whenDoneAudioFile;\r
         private bool playSoundWhenDone;\r
@@ -379,6 +380,23 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether to show previews in the summary tab.\r
+        /// </summary>\r
+        public bool ShowPreviewOnSummaryTab\r
+        {\r
+            get\r
+            {\r
+                return this.showPreviewOnSummaryTab;\r
+            }\r
+            set\r
+            {\r
+                if (value == this.showPreviewOnSummaryTab) return;\r
+                this.showPreviewOnSummaryTab = value;\r
+                this.NotifyOfPropertyChange(() => this.ShowPreviewOnSummaryTab);\r
+            }\r
+        }\r
+\r
         /// <summary>\r
         /// When Done Audio File\r
         /// </summary>\r
@@ -484,8 +502,8 @@ namespace HandBrakeWPF.ViewModels
             {\r
                 if (this.IsValidAutonameFormat(value, false))\r
                 {\r
-                    this.autonameFormat = value;   \r
-                } \r
+                    this.autonameFormat = value;\r
+                }\r
 \r
                 this.NotifyOfPropertyChange("AutonameFormat");\r
             }\r
@@ -1280,6 +1298,7 @@ namespace HandBrakeWPF.ViewModels
             this.ResetWhenDoneAction = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ResetWhenDoneAction);\r
             this.ShowQueueInline = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowQueueInline);\r
             this.ShowStatusInTitleBar = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowStatusInTitleBar);\r
+            this.ShowPreviewOnSummaryTab = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowPreviewOnSummaryTab);\r
             this.WhenDoneAudioFile = Path.GetFileNameWithoutExtension(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenDoneAudioFile)) ?? string.Empty;\r
             this.WhenDoneAudioFileFullPath = this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenDoneAudioFile);\r
             this.PlaySoundWhenDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenDone);\r
@@ -1443,6 +1462,7 @@ namespace HandBrakeWPF.ViewModels
             this.userSettingService.SetUserSetting(UserSettingConstants.ResetWhenDoneAction, this.ResetWhenDoneAction);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.ShowStatusInTitleBar, this.ShowStatusInTitleBar);\r
+            this.userSettingService.SetUserSetting(UserSettingConstants.ShowPreviewOnSummaryTab, this.ShowPreviewOnSummaryTab);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenDone, this.PlaySoundWhenDone);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenQueueDone, this.PlaySoundWhenQueueDone);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.WhenDoneAudioFile, this.WhenDoneAudioFileFullPath);\r
index ac12baf2c91e3914ce5ff43a3a5702a535785ac1..e2a294009bbb552894474cb0afb46e6c4d874be9 100644 (file)
@@ -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<int>(UserSettingConstants.PreviewScanCount));
             this.NotifyOfPropertyChange(() => this.PreviewInfo);
+
+            this.ShowPreview = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowPreviewOnSummaryTab);
         }
 
         private string GetFilterDescription()
index 0743e0b9d5f58175742c78f87299841c6d7cd8a1..cf2c877e52bd53d7bb6faf532f558b98e5d241a8 100644 (file)
                             <CheckBox Content="{x:Static Properties:ResourcesUI.Options_AdvancedTab}" IsChecked="{Binding ShowAdvancedTab}" />\r
                             <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ShowQueueInline}" IsChecked="{Binding ShowQueueInline}" Visibility="Collapsed" />\r
                             <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />\r
+                            <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_ShowPreviewOnSummaryTab}" IsChecked="{Binding ShowPreviewOnSummaryTab}" />\r
                         </StackPanel>\r
                     </StackPanel>\r
                 </StackPanel>\r
index 884216802ff06cf7b629d35847273986036607a2..edfbd1faca6dbd4b588c659d2542bb4dd6990110 100644 (file)
@@ -95,7 +95,9 @@
         </Grid>
 
         <!-- Column 2 -->
-        <Grid Grid.Column="1" Margin="10,0,0,5">
+        <Grid Grid.Column="1"
+              Margin="10,0,0,5"
+              Visibility="{Binding ShowPreview, Converter={StaticResource boolToVisConverter}}">
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="Auto" />
                 <ColumnDefinition Width="*" />