summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-02-18 20:13:51 +0000
committersr55 <[email protected]>2019-02-18 20:13:51 +0000
commit5dd8ab773b9ad003901b0375ff558618db26e651 (patch)
treedf85db8a5c930e9b3c4dc5b84f5724e01a95cded /win/CS/HandBrakeWPF
parent6ab3ce14f6ff886ffa4bd59feba02f9f7d67f7ae (diff)
WinGui: Set the button text to "Apply" on the Defaults Windows rather than "Save" to try avoid confusion. Improves #1907
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs9
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx3
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs29
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/PopupWindowView.xaml2
7 files changed, 33 insertions, 18 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index dce6c03f8..920e3b625 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -989,6 +989,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Apply.
+ /// </summary>
+ public static string Generic_Apply {
+ get {
+ return ResourceManager.GetString("Generic_Apply", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Cancel.
/// </summary>
public static string Generic_Cancel {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index 944e3b93f..18ccf3772 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -1906,4 +1906,7 @@ This will not impact any of the software encoders.</value>
<data name="Main_PleaseFixSubtitleSettings" xml:space="preserve">
<value>Please correct your subtitle settings before continuing. </value>
</data>
+ <data name="Generic_Apply" xml:space="preserve">
+ <value>Apply</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
index 70138d8c6..441c1814e 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
@@ -306,7 +306,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void EditAudioDefaults()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.audioDefaultsViewModel, Resources.Preset_AudioDefaults_Title, Resources.Preset_AudioDefaults_SubText);
+ IPopupWindowViewModel popup = new PopupWindowViewModel(this.audioDefaultsViewModel, Resources.Preset_AudioDefaults_Title, Resources.Preset_AudioDefaults_SubText, null);
if (this.windowManager.ShowDialog(popup) == true)
{
this.Preset.AudioTrackBehaviours = this.audioDefaultsViewModel.AudioBehaviours.Clone();
@@ -322,7 +322,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void EditSubtitleDefaults()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.subtitlesDefaultsViewModel, Resources.Preset_SubtitleDefaults_Title, Resources.Preset_SubtitleDefaults_SubText);
+ IPopupWindowViewModel popup = new PopupWindowViewModel(this.subtitlesDefaultsViewModel, Resources.Preset_SubtitleDefaults_Title, Resources.Preset_SubtitleDefaults_SubText, null);
if (this.windowManager.ShowDialog(popup) == true)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 9af13bc71..348bfd176 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -225,7 +225,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void ShowAudioDefaults()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.AudioDefaultsViewModel, Resources.Preset_AudioDefaults_Title, Resources.AudioView_AudioDefaultsDescription);
+ IPopupWindowViewModel popup = new PopupWindowViewModel(this.AudioDefaultsViewModel, Resources.Preset_AudioDefaults_Title, Resources.AudioView_AudioDefaultsDescription, Resources.Generic_Apply);
if (this.windowManager.ShowDialog(popup) == true)
{
this.OnTabStatusChanged(null);
diff --git a/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs
index 1bca58f43..18770955f 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs
@@ -9,6 +9,7 @@
namespace HandBrakeWPF.ViewModels
{
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -19,24 +20,15 @@ namespace HandBrakeWPF.ViewModels
private string windowTitle;
private string subText;
- /// <summary>
- /// Initializes a new instance of the <see cref="PopupWindowViewModel"/> class.
- /// </summary>
- /// <param name="contentViewModel">
- /// The content View Model.
- /// </param>
- /// <param name="title">
- /// The title.
- /// </param>
- /// <param name="subText">
- /// The sub Text.
- /// </param>
- public PopupWindowViewModel(IViewModelBase contentViewModel, string title, string subText)
+ private string saveButtonText;
+
+ public PopupWindowViewModel(IViewModelBase contentViewModel, string title, string subText, string saveBtnText)
{
this.ContentViewModel = contentViewModel;
this.WindowTitle = title;
this.Title = title;
this.SubText = subText;
+ this.saveButtonText = saveBtnText;
}
/// <summary>
@@ -88,6 +80,17 @@ namespace HandBrakeWPF.ViewModels
}
}
+ public string SaveButtonText
+ {
+ get => this.saveButtonText ?? Resources.Generic_Save;
+ set
+ {
+ if (value == this.saveButtonText) return;
+ this.saveButtonText = value;
+ this.NotifyOfPropertyChange(() => this.SaveButtonText);
+ }
+ }
+
/// <summary>
/// Gets or sets a value indicating whether sub text visible.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
index 432e15f51..b07200ca6 100644
--- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
@@ -453,7 +453,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void ShowSubtitleDefaultsPanel()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.SubtitleDefaultsViewModel, Resources.Preset_SubtitleDefaults_Title, Resources.SubtitleView_SubtitleDefaultsDescription);
+ IPopupWindowViewModel popup = new PopupWindowViewModel(this.SubtitleDefaultsViewModel, Resources.Preset_SubtitleDefaults_Title, Resources.SubtitleView_SubtitleDefaultsDescription, Resources.Generic_Apply);
if (this.windowManager.ShowDialog(popup) == true)
{
this.OnTabStatusChanged(null);
diff --git a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
index 830a283d4..9116586fb 100644
--- a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
+++ b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
@@ -56,7 +56,7 @@
<Button Grid.Column="2"
Margin="0,5,10,10"
cal:Message.Attach="[Event Click] = [Action Save]"
- Content="{x:Static properties:Resources.Generic_Save}"
+ Content="{Binding SaveButtonText}"
IsDefault="True"
Padding="8,2" />
</Grid>