summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-01-14 21:18:29 +0000
committersr55 <[email protected]>2019-01-14 21:18:29 +0000
commit776c2d3d93c08c6cc12d9fc42bc290c3e57772ff (patch)
treead51d18923bf318c6b6a8e5801d0aa13ff463e84
parent7bb5b47ce41028108657d861d97d65b03380e4ad (diff)
WinGui: Make the toolbar customisation options more discoverable by making them preferences in the options screen.
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs27
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx9
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs15
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs35
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml7
5 files changed, 84 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index 4f3e11702..f63893372 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -2437,6 +2437,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>
public static string Options_Arguments {
@@ -2844,6 +2853,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>
public static string Options_TitleCase {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index b432b9eeb..f611f0020 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -1888,4 +1888,13 @@ This will not affect your current settings in the Subtitle tab.</value>
<data name="QueueView_PlayMediaFile" xml:space="preserve">
<value>Play File</value>
</data>
+ <data name="Options_ApplicaitonToolbar" xml:space="preserve">
+ <value>Application Toolbar</value>
+ </data>
+ <data name="Options_ShowToolbarAddAll" xml:space="preserve">
+ <value>Show 'Add All to Queue' on the toolbar</value>
+ </data>
+ <data name="Options_ShowToolbarAddSelection" xml:space="preserve">
+ <value>Show 'Add Selection to Queue' on the toolbar</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 4c6f3ad4c..857ce9c42 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -2606,15 +2606,16 @@ namespace HandBrakeWPF.ViewModels
case UserSettingConstants.WhenCompleteAction:
this.QueueViewModel.WhenDone(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction), false);
break;
- }
-
- this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);
- this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);
- this.NotifyOfPropertyChange(() => this.ShowAddAllMenuName);
- this.NotifyOfPropertyChange(() => this.ShowAddSelectionMenuName);
+ case UserSettingConstants.ShowAddAllToQueue:
+ case UserSettingConstants.ShowAddSelectionToQueue:
+ this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);
+ this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);
+ this.NotifyOfPropertyChange(() => this.ShowAddAllMenuName);
+ this.NotifyOfPropertyChange(() => this.ShowAddSelectionMenuName);
+ break;
+ }
}
-
#endregion
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index e18074681..cf63d1daf 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -104,6 +104,10 @@ namespace HandBrakeWPF.ViewModels
private InterfaceLanguage selectedLanguage;
+ private bool showAddSelectionToQueue;
+
+ private bool showAddAllToQueue;
+
#endregion
#region Constructors and Destructors
@@ -491,6 +495,28 @@ namespace HandBrakeWPF.ViewModels
}
}
+ public bool ShowAddSelectionToQueue
+ {
+ get => this.showAddSelectionToQueue;
+ set
+ {
+ if (value == this.showAddSelectionToQueue) return;
+ this.showAddSelectionToQueue = value;
+ this.NotifyOfPropertyChange(() => this.ShowAddSelectionToQueue);
+ }
+ }
+
+ public bool ShowAddAllToQueue
+ {
+ get => this.showAddAllToQueue;
+ set
+ {
+ if (value == this.showAddAllToQueue) return;
+ this.showAddAllToQueue = value;
+ this.NotifyOfPropertyChange(() => this.ShowAddAllToQueue);
+ }
+ }
+
#endregion
#region Output Files
@@ -1351,7 +1377,7 @@ namespace HandBrakeWPF.ViewModels
this.CheckForUpdatesFrequency = 1;
}
- // On Encode Completeion Action
+ // On Encode Completion Action
this.whenDoneOptions.Clear();
this.whenDoneOptions.Add("Do nothing");
this.whenDoneOptions.Add("Shutdown");
@@ -1379,7 +1405,10 @@ namespace HandBrakeWPF.ViewModels
this.PlaySoundWhenDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenDone);
this.PlaySoundWhenQueueDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenQueueDone);
this.ShowExperimentalQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowExperimentalQueue);
-
+
+ this.ShowAddAllToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddAllToQueue);
+ this.ShowAddSelectionToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddSelectionToQueue);
+
// #############################
// Output Settings
// #############################
@@ -1545,6 +1574,8 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SetUserSetting(UserSettingConstants.PlaySoundWhenQueueDone, this.PlaySoundWhenQueueDone);
this.userSettingService.SetUserSetting(UserSettingConstants.WhenDoneAudioFile, this.WhenDoneAudioFileFullPath);
this.userSettingService.SetUserSetting(UserSettingConstants.UiLanguage, this.SelectedLanguage?.Culture);
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddAllToQueue, this.ShowAddAllToQueue);
+ this.userSettingService.SetUserSetting(UserSettingConstants.ShowAddSelectionToQueue, this.ShowAddSelectionToQueue);
/* Experiments */
this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline);
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 2df373a0c..a4502e5ba 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -121,6 +121,13 @@
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />
<CheckBox Content="{x:Static Properties:Resources.OptionsView_ShowPreviewOnSummaryTab}" IsChecked="{Binding ShowPreviewOnSummaryTab}" />
</StackPanel>
+
+
+ <TextBlock Text="{x:Static Properties:Resources.Options_ApplicaitonToolbar}" FontSize="14" Margin="0,10,0,10"/>
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">
+ <CheckBox Content="{x:Static Properties:Resources.Options_ShowToolbarAddAll}" IsChecked="{Binding ShowAddAllToQueue}" />
+ <CheckBox Content="{x:Static Properties:Resources.Options_ShowToolbarAddSelection}" IsChecked="{Binding ShowAddSelectionToQueue}" />
+ </StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="0,0,0,10">