summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-11-29 20:08:06 +0000
committersr55 <[email protected]>2014-11-29 20:08:06 +0000
commita3341ae890cadc580d29c460ad5ae73498e07119 (patch)
tree6732716117247c386d3b34d2dded4b5bb5e8726f /win
parentd1c09806176975cc724021cbbc6989c11b59c685 (diff)
[Merge] Merging fixes 6569 to 6571
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.10.x@6572 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Controls/SourceSelection.xaml26
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs10
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs13
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml12
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml12
5 files changed, 50 insertions, 23 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml
index dde18c292..56b6c93e7 100644
--- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml
+++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml
@@ -9,8 +9,6 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
@@ -29,38 +27,44 @@
Minimum="0" Maximum="1000" Number="{Binding TitleSpecificScan, Mode=TwoWay}" />
</StackPanel>
- <TextBlock Text="Then choose your source: " Margin="0,10,0,0" />
+ <TextBlock Text="Then choose the video(s) you'd like to encode: " Margin="0,10,0,0" />
</StackPanel>
<!-- Source Type -->
- <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Left" Margin="5,5,0,0">
+ <Grid Grid.Row="2" HorizontalAlignment="Left" Margin="5,5,0,0">
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
<!-- Ctrl + R -->
- <Button AutomationProperties.Name="Choose Folder to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FolderScan]"
+ <Button Grid.Row="0" AutomationProperties.Name="Choose Folder to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FolderScan]"
Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" MinWidth="100">
<Image Source="../Views/Images/folder32.png" Width="32" />
<StackPanel Orientation="Vertical">
<TextBlock Text="Folder" VerticalAlignment="Center" Margin="5,0,0,0" />
- <TextBlock Text="Open a VIDEO_TS folder or a batch of files" VerticalAlignment="Center" Margin="5,0,0,0" />
+ <TextBlock Text="Open a folder with one or more files." VerticalAlignment="Center" Margin="5,0,0,0" />
</StackPanel>
</StackPanel>
</Button>
<!--Ctrl + F-->
- <Button AutomationProperties.Name="Choose File to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FileScan]"
+ <Button Grid.Row="1" AutomationProperties.Name="Choose File to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FileScan]"
Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" MinWidth="100">
<Image Source="../Views/Images/File32.png" Width="32" />
<StackPanel Orientation="Vertical">
<TextBlock Text="File" VerticalAlignment="Center" Margin="5,0,0,0" />
- <TextBlock Text="Open a single file." VerticalAlignment="Center" Margin="5,0,0,0" />
+ <TextBlock Text="Open a single video file." VerticalAlignment="Center" Margin="5,0,0,0" />
</StackPanel>
</StackPanel>
</Button>
-
- <ListBox ItemsSource="{Binding Drives}" Background="Transparent" BorderThickness="0">
+
+ <ListBox Grid.Row="2" ItemsSource="{Binding Drives}" Background="Transparent" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
@@ -79,7 +83,7 @@
</ListBox.ItemTemplate>
</ListBox>
- </StackPanel>
+ </Grid>
<!-- Cancel Window -->
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,10,10">
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
index e08d2d9ff..fba717b4c 100644
--- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
@@ -9,6 +9,8 @@
namespace HandBrakeWPF.ViewModels.Interfaces
{
+ using System.Windows;
+
using HandBrake.ApplicationServices.Model;
/// <summary>
@@ -92,5 +94,13 @@ namespace HandBrakeWPF.ViewModels.Interfaces
/// The show cli query.
/// </summary>
void ShowCliQuery();
+
+ /// <summary>
+ /// The files dropped on window.
+ /// </summary>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ void FilesDroppedOnWindow(DragEventArgs e);
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
index ef32eb205..10c82f1a4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs
@@ -9,6 +9,8 @@
namespace HandBrakeWPF.ViewModels
{
+ using System.IO;
+ using System.Linq;
using System.Windows;
using Caliburn.Micro;
@@ -186,6 +188,17 @@ namespace HandBrakeWPF.ViewModels
#endregion
/// <summary>
+ /// The files dropped on window. Pass this through to the active view model.
+ /// </summary>
+ /// <param name="e">
+ /// The DragEventArgs.
+ /// </param>
+ public void FilesDroppedOnWindow(DragEventArgs e)
+ {
+ this.MainViewModel.FilesDroppedOnWindow(e);
+ }
+
+ /// <summary>
/// Checks with the use if this window can be closed.
/// </summary>
/// <returns>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 6442e9e45..ad875db87 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -3,9 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
- xmlns:attachedProperties="clr-namespace:HandBrakeWPF.AttachedProperties"
+ xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
AllowDrop="True"
FontSize="11"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
@@ -13,14 +11,6 @@
UseLayoutRounding="True"
>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Drop">
- <Micro:ActionMessage MethodName="FilesDroppedOnWindow">
- <Micro:Parameter Value="$eventArgs" />
- </Micro:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
-
<UserControl.Resources>
<Converters:BooleanConverter x:Key="booleanConverter" />
<Converters:EnumComboConverter x:Key="enumComboConverter" />
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml
index c9702a7a7..ab82b298a 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml
@@ -4,6 +4,8 @@
xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:views="clr-namespace:HandBrakeWPF.Views"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:cal="http://www.caliburnproject.org"
Title="{Data:Binding Path=WindowTitle}"
Width="1015"
Height="675"
@@ -20,7 +22,15 @@
<Window.Resources>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
</Window.Resources>
-
+
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="Drop">
+ <cal:ActionMessage MethodName="FilesDroppedOnWindow">
+ <cal:Parameter Value="$eventArgs" />
+ </cal:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+
<Grid>
<ContentControl x:Name="MainViewModel" Visibility="{Binding ShowMainWindow, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
<ContentControl x:Name="OptionsViewModel" Visibility="{Binding ShowOptions, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />