summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs9
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.resx3
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs49
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueSelectionView.xaml6
6 files changed, 55 insertions, 20 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
index 8b1d323df..62faa5ec9 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
@@ -1629,6 +1629,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to The selected titles will be added using the &quot;{0}&quot; preset..
+ /// </summary>
+ public static string QueueSelection_UsingPreset {
+ get {
+ return ResourceManager.GetString("QueueSelection_UsingPreset", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Choose titles:.
/// </summary>
public static string QueueSelectionView_ChooseTitles {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
index b7aeef1db..9856e420a 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
@@ -866,4 +866,7 @@ This will not affect your current settings in the Subtitle tab.</value>
<data name="Preset_SubtitleDefaults_Title" xml:space="preserve">
<value>Subtitle Defaults</value>
</data>
+ <data name="QueueSelection_UsingPreset" xml:space="preserve">
+ <value>The selected titles will be added using the "{0}" preset.</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs
index 1b5f3f0b6..33acdfec8 100644
--- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs
@@ -14,6 +14,7 @@ namespace HandBrakeWPF.ViewModels.Interfaces
using System.ComponentModel;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Services.Scan.Model;
/// <summary>
@@ -38,6 +39,9 @@ namespace HandBrakeWPF.ViewModels.Interfaces
/// <param name="addAction">
/// The add To Queue action
/// </param>
- void Setup(Source scannedSource, string sourceName, Action<IEnumerable<SelectionTitle>> addAction);
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
+ void Setup(Source scannedSource, string sourceName, Action<IEnumerable<SelectionTitle>> addAction, Preset preset);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 0065bef6a..27bd32505 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1470,7 +1470,7 @@ namespace HandBrakeWPF.ViewModels
this.SelectedTitle = title.Title;
this.AddToQueue();
}
- });
+ }, this.selectedPreset);
if (window != null)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
index ab790c234..5e41c0a28 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
@@ -17,6 +17,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Model;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -25,28 +26,14 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public class QueueSelectionViewModel : ViewModelBase, IQueueSelectionViewModel
{
- /// <summary>
- /// The error service.
- /// </summary>
private readonly IErrorService errorService;
-
private readonly IUserSettingService userSettingService;
-
- /// <summary>
- /// The ordered by duration.
- /// </summary>
private bool orderedByDuration;
-
- /// <summary>
- /// The ordered by title.
- /// </summary>
private bool orderedByTitle;
-
- /// <summary>
- /// The add to queue.
- /// </summary>
private Action<IEnumerable<SelectionTitle>> addToQueue;
+ private string currentPreset;
+
/// <summary>
/// Initializes a new instance of the <see cref="QueueSelectionViewModel"/> class.
/// </summary>
@@ -76,6 +63,26 @@ namespace HandBrakeWPF.ViewModels
public BindingList<SelectionTitle> TitleList { get; set; }
/// <summary>
+ /// Gets or sets the current preset.
+ /// </summary>
+ public string CurrentPreset
+ {
+ get
+ {
+ return this.currentPreset;
+ }
+ set
+ {
+ if (value == this.currentPreset)
+ {
+ return;
+ }
+ this.currentPreset = value;
+ this.NotifyOfPropertyChange(() => this.CurrentPreset);
+ }
+ }
+
+ /// <summary>
/// Gets or sets a value indicating whether ordered by title.
/// </summary>
public bool OrderedByTitle
@@ -202,7 +209,10 @@ namespace HandBrakeWPF.ViewModels
/// <param name="addAction">
/// The add Action.
/// </param>
- public void Setup(Source scannedSource, string srcName, Action<IEnumerable<SelectionTitle>> addAction)
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
+ public void Setup(Source scannedSource, string srcName, Action<IEnumerable<SelectionTitle>> addAction, Preset preset)
{
this.TitleList.Clear();
this.addToQueue = addAction;
@@ -220,6 +230,11 @@ namespace HandBrakeWPF.ViewModels
}
}
+ if (preset != null)
+ {
+ this.CurrentPreset = string.Format(ResourcesUI.QueueSelection_UsingPreset, preset.Name);
+ }
+
this.NotifyOfPropertyChange(() => this.IsAutoNamingEnabled);
}
}
diff --git a/win/CS/HandBrakeWPF/Views/QueueSelectionView.xaml b/win/CS/HandBrakeWPF/Views/QueueSelectionView.xaml
index 6e2fd834b..2b5ae08de 100644
--- a/win/CS/HandBrakeWPF/Views/QueueSelectionView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueSelectionView.xaml
@@ -8,7 +8,7 @@
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
Title="{Binding Title}"
Width="550"
- Height="450"
+ Height="475"
SizeToContent="Height"
WindowStartupLocation="CenterScreen"
TextOptions.TextFormattingMode="Display"
@@ -100,6 +100,10 @@
<!-- Checlist -->
<StackPanel Orientation="Vertical" Grid.Row="3" Margin="10,10,10,0">
+ <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
+ <TextBlock Text="{Binding CurrentPreset}" TextWrapping="Wrap" />
+ </StackPanel>
+
<TextBlock Text="{x:Static Properties:Resources.QueueSelection_AutoNameWarning}"
TextWrapping="Wrap" Visibility="{Binding IsAutoNamingEnabled, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}"/>
</StackPanel>