]> granicus.if.org Git - handbrake/commitdiff
WinGui: Make the toolbar customisation options more discoverable by making them prefe...
authorsr55 <sr55.hb@outlook.com>
Mon, 14 Jan 2019 21:18:29 +0000 (21:18 +0000)
committersr55 <sr55.hb@outlook.com>
Mon, 14 Jan 2019 21:18:29 +0000 (21:18 +0000)
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/Views/OptionsView.xaml

index 4f3e117025a943c954bf0e59d387173b277e528e..f63893372db36e6cd08b3b92a90b11107ff8f546 100644 (file)
@@ -2436,6 +2436,15 @@ namespace HandBrakeWPF.Properties {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Application Toolbar.
+        /// </summary>
+        public static string Options_ApplicaitonToolbar {
+            get {
+                return ResourceManager.GetString("Options_ApplicaitonToolbar", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Arguments:.
         /// </summary>
@@ -2843,6 +2852,24 @@ namespace HandBrakeWPF.Properties {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Show &apos;Add All to Queue&apos; on the toolbar.
+        /// </summary>
+        public static string Options_ShowToolbarAddAll {
+            get {
+                return ResourceManager.GetString("Options_ShowToolbarAddAll", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Show &apos;Add Selection to Queue&apos; on the toolbar.
+        /// </summary>
+        public static string Options_ShowToolbarAddSelection {
+            get {
+                return ResourceManager.GetString("Options_ShowToolbarAddSelection", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Change case to Title Case.
         /// </summary>
index b432b9eebac141f9422155058ac5bd391c41c3ff..f611f00205853f0249920ac8097a124c83098c76 100644 (file)
@@ -1888,4 +1888,13 @@ This will not affect your current settings in the Subtitle tab.</value>
   <data name="QueueView_PlayMediaFile" xml:space="preserve">\r
     <value>Play File</value>\r
   </data>\r
+  <data name="Options_ApplicaitonToolbar" xml:space="preserve">\r
+    <value>Application Toolbar</value>\r
+  </data>\r
+  <data name="Options_ShowToolbarAddAll" xml:space="preserve">\r
+    <value>Show 'Add All to Queue' on the toolbar</value>\r
+  </data>\r
+  <data name="Options_ShowToolbarAddSelection" xml:space="preserve">\r
+    <value>Show 'Add Selection to Queue' on the toolbar</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 4c6f3ad4cebab985c8eab3e140a6e5d02eed111e..857ce9c42910860c9f29cb5f5aa6c6d94a7add92 100644 (file)
@@ -2606,15 +2606,16 @@ namespace HandBrakeWPF.ViewModels
                 case UserSettingConstants.WhenCompleteAction:\r
                     this.QueueViewModel.WhenDone(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction), false);\r
                     break;\r
-            }\r
-\r
 \r
-            this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);\r
-            this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);\r
-            this.NotifyOfPropertyChange(() => this.ShowAddAllMenuName);\r
-            this.NotifyOfPropertyChange(() => this.ShowAddSelectionMenuName);\r
+                case UserSettingConstants.ShowAddAllToQueue:\r
+                case UserSettingConstants.ShowAddSelectionToQueue:\r
+                    this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);\r
+                    this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);\r
+                    this.NotifyOfPropertyChange(() => this.ShowAddAllMenuName);\r
+                    this.NotifyOfPropertyChange(() => this.ShowAddSelectionMenuName);\r
+                    break;\r
+            }\r
         }\r
-\r
         #endregion\r
     }\r
 }
\ No newline at end of file
index e180746819789c76f915c51e001c3a1326ae8a2c..cf63d1daf806851e90ae4fad181c6aa701c56a44 100644 (file)
@@ -104,6 +104,10 @@ namespace HandBrakeWPF.ViewModels
 \r
         private InterfaceLanguage selectedLanguage;\r
 \r
+        private bool showAddSelectionToQueue;\r
+\r
+        private bool showAddAllToQueue;\r
+\r
         #endregion\r
 \r
         #region Constructors and Destructors\r
@@ -491,6 +495,28 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        public bool ShowAddSelectionToQueue\r
+        {\r
+            get => this.showAddSelectionToQueue;\r
+            set\r
+            {\r
+                if (value == this.showAddSelectionToQueue) return;\r
+                this.showAddSelectionToQueue = value;\r
+                this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);\r
+            }\r
+        }\r
+\r
+        public bool ShowAddAllToQueue\r
+        {\r
+            get => this.showAddAllToQueue;\r
+            set\r
+            {\r
+                if (value == this.showAddAllToQueue) return;\r
+                this.showAddAllToQueue = value;\r
+                this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #region Output Files\r
@@ -1351,7 +1377,7 @@ namespace HandBrakeWPF.ViewModels
                 this.CheckForUpdatesFrequency = 1;\r
             }\r
 \r
-            // On Encode Completeion Action\r
+            // On Encode Completion Action\r
             this.whenDoneOptions.Clear();\r
             this.whenDoneOptions.Add("Do nothing");\r
             this.whenDoneOptions.Add("Shutdown");\r
@@ -1379,7 +1405,10 @@ namespace HandBrakeWPF.ViewModels
             this.PlaySoundWhenDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenDone);\r
             this.PlaySoundWhenQueueDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenQueueDone);\r
             this.ShowExperimentalQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowExperimentalQueue);\r
-            \r
+\r
+            this.ShowAddAllToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddAllToQueue);\r
+            this.ShowAddSelectionToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddSelectionToQueue);\r
+\r
             // #############################\r
             // Output Settings\r
             // #############################\r
@@ -1545,6 +1574,8 @@ namespace HandBrakeWPF.ViewModels
             this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenQueueDone, this.PlaySoundWhenQueueDone);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.WhenDoneAudioFile, this.WhenDoneAudioFileFullPath);\r
             this.userSettingService.SetUserSetting(UserSettingConstants.UiLanguage, this.SelectedLanguage?.Culture);\r
+            this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddAllToQueue, this.ShowAddAllToQueue);\r
+            this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddSelectionToQueue, this.ShowAddSelectionToQueue);\r
 \r
             /* Experiments */\r
             this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline);\r
index 2df373a0c0039ec5e1c62c1ec6234ea175971478..a4502e5ba15e0a0cce0c61aba5b3443db3e12bee 100644 (file)
                             <CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />\r
                             <CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowPreviewOnSummaryTab}" IsChecked="{Binding ShowPreviewOnSummaryTab}" />\r
                         </StackPanel>\r
+\r
+\r
+                        <TextBlock Text="{x:Static Properties:Resources.Options_ApplicaitonToolbar}" FontSize="14" Margin="0,10,0,10"/>\r
+                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
+                            <CheckBox Content="{x:Static Properties:Resources.Options_ShowToolbarAddAll}" IsChecked="{Binding ShowAddAllToQueue}" />\r
+                            <CheckBox Content="{x:Static Properties:Resources.Options_ShowToolbarAddSelection}" IsChecked="{Binding ShowAddSelectionToQueue}" />\r
+                        </StackPanel>\r
                     </StackPanel>\r
 \r
                     <StackPanel Orientation="Vertical" Margin="0,0,0,10">\r