summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-04-06 16:04:31 +0100
committersr55 <[email protected]>2019-04-06 16:04:31 +0100
commit641316650dcc211bb836d24ef2f1571a8f971558 (patch)
tree9aeead9b95bfeeccc82ff45fbc28f76d3a1dfa65
parent8065029c806e5e50e2ef7828f0ee1edf96c41031 (diff)
WinGui: Minor bug fixes and UX improvements to the new queue design.
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs5
-rw-r--r--win/CS/HandBrakeWPF/Views/Images/close64.pngbin0 -> 807 bytes
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml17
4 files changed, 22 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index fbd4cac0b..a4f6105d0 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -707,7 +707,9 @@
<Name>HandBrake.Interop</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup />
+ <ItemGroup>
+ <Resource Include="Views\Images\close64.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index bdd2fd844..a5df085b0 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -460,6 +460,11 @@ namespace HandBrakeWPF.ViewModels
/// </param>
public void RetryJob(QueueTask task)
{
+ if (task == null)
+ {
+ return;
+ }
+
task.Status = QueueItemStatus.Waiting;
this.queueProcessor.BackupQueue(null);
this.JobsPending = string.Format(Resources.QueueViewModel_JobsPending, this.queueProcessor.Count);
diff --git a/win/CS/HandBrakeWPF/Views/Images/close64.png b/win/CS/HandBrakeWPF/Views/Images/close64.png
new file mode 100644
index 000000000..f06889226
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Views/Images/close64.png
Binary files differ
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 14dbb56c4..c6f9dd93f 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -131,10 +131,10 @@
</StackPanel>
</Button>
- <StackPanel Grid.Row="0" Grid.Column="3" Orientation="Horizontal">
+ <!--<StackPanel Grid.Row="0" Grid.Column="3" Orientation="Horizontal">
<Button Content="^" Width="20" Margin="0" cal:Message.Attach="[Event Click] = [Action MoveUp]" />
<Button Content="v" Width="20" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action MoveDown]" />
- </StackPanel>
+ </StackPanel>-->
</Grid>
<ListBox Tag="{Binding}" x:Name="queueJobs" Grid.Row="1" Margin="10,0,5,0"
@@ -232,7 +232,7 @@
</Image>
<!-- Settings -->
- <Grid Grid.Column="1" Margin="0,3,15,3">
+ <Grid Grid.Column="1" Margin="0,3,5,3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
@@ -265,6 +265,17 @@
<ProgressBar Minimum="0" Height="4" Maximum="100" Name="pbStatus" Margin="0,2,5,0" Grid.Row="3" Grid.ColumnSpan="2"
Value="{Binding DataContext.ProgressValue, ElementName=queueJobs}" IsIndeterminate="{Binding DataContext.IntermediateProgress, ElementName=queueJobs}"
Visibility="{Binding ShowEncodeProgress, Converter={StaticResource boolToVisConverter}}" />
+
+ <Image Source="Images\close64.png" Width="16" Height="16" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3"
+ VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,0,0" >
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="MouseLeftButtonDown">
+ <cal:ActionMessage MethodName="RemoveJob">
+ <cal:Parameter Value="{Binding}" />
+ </cal:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ </Image>
</Grid>
</Grid>
</DataTemplate>