From: sr55 Date: Thu, 27 Sep 2018 20:10:38 +0000 (+0100) Subject: WinGui: Queue -> Retry Failed context menu option. Bring over some improvements... X-Git-Tag: 1.2.0~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66cb599bc09da22a5a1b878b68cd11104d2d0398;p=handbrake WinGui: Queue -> Retry Failed context menu option. Bring over some improvements from the experimental design onto the legacy queue design that's still default. --- diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs index c4c264908..43a64912a 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs @@ -2267,6 +2267,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Retry Failed. + /// + public static string QueueView_ResetFailed { + get { + return ResourceManager.GetString("QueueView_ResetFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Retry Selected Jobs. /// diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx index fb2bc3da7..914d9525e 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx @@ -1094,4 +1094,7 @@ This will not affect your current settings in the Subtitle tab. Summary + + Retry Failed + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index dbe93bc75..aedd89b27 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -573,6 +573,18 @@ namespace HandBrakeWPF.ViewModels } } + public void ResetFailed() + { + foreach (var task in this.QueueTasks) + { + if (task.Status == QueueItemStatus.Error) + { + this.RetryJob(task); + } + } + } + + #endregion #region Methods diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml index f14470c50..787d59835 100644 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml +++ b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml @@ -140,7 +140,6 @@ SelectionMode="Extended" ScrollViewer.HorizontalScrollBarVisibility="Disabled" > - @@ -155,6 +154,7 @@ + diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index 305a7b9f4..5fd2383ec 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -16,10 +16,10 @@ xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue" xmlns:queue1="clr-namespace:HandBrakeWPF.Views.Queue" Title="{Binding Title}" - Width="850" + Width="750" Height="500" MinWidth="450" - MinHeight="260" + MinHeight="300" WindowStartupLocation="CenterScreen" TextOptions.TextFormattingMode="Display" mc:Ignorable="d"> @@ -179,7 +179,7 @@ - + SelectionMode="Extended" + ScrollViewer.HorizontalScrollBarVisibility="Disabled"> @@ -203,6 +204,10 @@ + + + + @@ -324,33 +329,40 @@ - - + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + +