summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs27
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesUI.resx9
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs10
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml27
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml.cs11
-rw-r--r--win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml1
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml2
7 files changed, 69 insertions, 18 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
index 29bf21352..58f88cf3b 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
@@ -1754,6 +1754,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Custom.
+ /// </summary>
+ public static string Preset_Custom {
+ get {
+ return ResourceManager.GetString("Preset_Custom", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Export to file.
/// </summary>
public static string Preset_Export {
@@ -1772,6 +1781,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Official.
+ /// </summary>
+ public static string Preset_Official {
+ get {
+ return ResourceManager.GetString("Preset_Official", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Change the behaviour of the subtitle track selection for this preset.
///This will not affect your current settings in the Subtitle tab..
/// </summary>
@@ -1908,15 +1926,6 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Import Queue.
- /// </summary>
- public static string QueueView_Import {
- get {
- return ResourceManager.GetString("QueueView_Import", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Lock System.
/// </summary>
public static string QueueView_LockSystem {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
index 0fa80b85b..8efdc2de5 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
@@ -510,9 +510,6 @@
<data name="QueueView_Hibernate" xml:space="preserve">
<value>Hibernate</value>
</data>
- <data name="QueueView_Import" xml:space="preserve">
- <value>Import Queue</value>
- </data>
<data name="QueueView_LockSystem" xml:space="preserve">
<value>Lock System</value>
</data>
@@ -980,4 +977,10 @@ This will not affect your current settings in the Subtitle tab.</value>
<data name="MainView_PresetRemove" xml:space="preserve">
<value>Delete Preset</value>
</data>
+ <data name="Preset_Custom" xml:space="preserve">
+ <value>Custom</value>
+ </data>
+ <data name="Preset_Official" xml:space="preserve">
+ <value>Official</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
index 1afeefb94..d0cd4c617 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
@@ -13,6 +13,7 @@ namespace HandBrakeWPF.Services.Presets.Model
using HandBrakeWPF.Model.Audio;
using HandBrakeWPF.Model.Subtitles;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Presets.Interfaces;
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
@@ -76,6 +77,15 @@ namespace HandBrakeWPF.Services.Presets.Model
/// </summary>
public bool IsExpanded { get; set; }
+ public string DisplayValue
+ {
+ get
+ {
+ string globalCateogry = this.IsBuildIn ? ResourcesUI.Preset_Official : ResourcesUI.Preset_Custom;
+ return string.Format("{0} > {1} > {2}", globalCateogry, this.Category, this.Name);
+ }
+ }
+
public bool IsSelected
{
get
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 34a7c159a..06e1904f4 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -104,7 +104,6 @@
<MenuItem Command="{Binding QueueCommand}" CommandParameter="{x:Static menu:QueueCommandParams.ClearAll}" Header="{x:Static Properties:ResourcesUI.QueueView_ClearAll}" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
<MenuItem Command="{Binding QueueCommand}" CommandParameter="{x:Static menu:QueueCommandParams.ClearSelected}" Header="{x:Static Properties:ResourcesUI.QueueView_ClearSelected}" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
<Separator Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
- <MenuItem Command="{Binding QueueCommand}" CommandParameter="{x:Static menu:QueueCommandParams.Import}" Header="{x:Static Properties:ResourcesUI.QueueView_Import}" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
<MenuItem Command="{Binding QueueCommand}" CommandParameter="{x:Static menu:QueueCommandParams.Export}" Header="{x:Static Properties:ResourcesUI.QueueView_Export}" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
</MenuItem>
@@ -346,7 +345,29 @@
<StackPanel Grid.Row="1" Orientation="Vertical" Margin="10,5,10,5">
<Label Content="Presets" FontWeight="Bold" VerticalAlignment="Center" />
<StackPanel Orientation="Horizontal" Margin="8,0,0,0" Visibility="{Binding IsPresetPanelShowing, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
- <ComboBox ItemsSource="{Binding PresetsCategories}" SelectedItem="{Binding SelectedPresetCategory}" Width="150" DisplayMemberPath="Category" Margin="5,0,0,0" VerticalAlignment="Center" />
+
+ <Button x:Name="SelectPresetsButton" Margin="15,0,0,0" VerticalAlignment="Center" Click="SelectPreset_OnClick" Width="350">
+ <Button.Content>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch">
+ <TextBlock Margin="0,0,5,0" Padding="0"
+ VerticalAlignment="Center" Width="315"
+ Text="{Binding SelectedPreset.DisplayValue}" />
+
+ <Path Height="8" Margin="2,0,0,1" VerticalAlignment="Center" HorizontalAlignment="Center"
+ Data="M 0 0 L 4 4 L 0 8 Z"
+ Fill="{DynamicResource GlyphBrush}" x:Name="dropdownArrowSelectPreset" />
+ </StackPanel>
+ </Button.Content>
+
+ <Button.ContextMenu>
+ <ContextMenu x:Name="PresetSelectContextMenu"
+ PlacementRectangle="{Binding RelativeSource={RelativeSource Self}}"
+ ItemsSource="{Binding PresetsCategories, Converter={StaticResource presetsMenuConverter}}">
+ </ContextMenu>
+ </Button.ContextMenu>
+ </Button>
+
+ <!--<ComboBox ItemsSource="{Binding PresetsCategories}" SelectedItem="{Binding SelectedPresetCategory}" Width="150" DisplayMemberPath="Category" Margin="5,0,0,0" VerticalAlignment="Center" />
<ComboBox ItemsSource="{Binding CategoryPresets}" SelectedItem="{Binding SelectedPreset}" Width="250" Margin="10,0,0,0" VerticalAlignment="Center">
<ComboBox.Resources>
<Style TargetType="ToolTip">
@@ -382,7 +403,7 @@
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
- </ComboBox>
+ </ComboBox>-->
<Button Content="Reload" cal:Message.Attach="[Event Click] = [Action PresetSelect]" Margin="15,0,0,0" VerticalAlignment="Center" />
<Button Content="Save Custom Preset" cal:Message.Attach="[Event Click] = [Action PresetAdd]" Margin="5,0,0,0" VerticalAlignment="Center" />
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
index 74220b160..26ac5a340 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
@@ -87,6 +87,17 @@ namespace HandBrakeWPF.Views
}
}
+ private void SelectPreset_OnClick(object sender, RoutedEventArgs e)
+ {
+ var button = sender as FrameworkElement;
+ if (button != null && button.ContextMenu != null)
+ {
+ button.ContextMenu.PlacementTarget = button;
+ button.ContextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.Right;
+ button.ContextMenu.IsOpen = true;
+ }
+ }
+
private void ToolBarLoaded(object sender, RoutedEventArgs e)
{
ToolBar toolBar = sender as ToolBar;
diff --git a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml
index 114556c43..ae7ecf37a 100644
--- a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml
+++ b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml
@@ -72,7 +72,6 @@
<MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearAll}" />
<MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearSelected}" />
<Separator />
- <MenuItem cal:Message.Attach="[Event Click] = [Action Import]" Header="{x:Static Properties:ResourcesUI.QueueView_Import}" />
<MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:ResourcesUI.QueueView_Export}" />
</ContextMenu>
</ListBox.ContextMenu>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 03923696c..e13c646bd 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -153,7 +153,6 @@
<MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearCompleted}" />
<MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearQueue}" />
<Separator />
- <!--<MenuItem cal:Message.Attach="[Event Click] = [Action Import]" Header="{x:Static Properties:ResourcesUI.QueueView_Import}" />-->
<MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:ResourcesUI.QueueView_Export}" />
</MenuItem>
@@ -199,7 +198,6 @@
<MenuItem Header="{x:Static Properties:ResourcesUI.QueueView_OpenSourceDir}" x:Name="openSourceDir" Click="OpenSourceDir_OnClick" />
<MenuItem Header="{x:Static Properties:ResourcesUI.QueueView_OpenDestDir}" x:Name="openDestDir" Click="OpenDestDir_OnClick" />
<Separator />
- <!--<MenuItem cal:Message.Attach="[Event Click] = [Action Import]" Header="{x:Static Properties:ResourcesUI.QueueView_Import}" />-->
<MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:ResourcesUI.QueueView_Export}" />
</ContextMenu>
</ListBox.ContextMenu>