]> granicus.if.org Git - handbrake/commitdiff
WinGui: Queue -> Retry Failed context menu option. Bring over some improvements...
authorsr55 <sr55.hb@outlook.com>
Thu, 27 Sep 2018 20:10:38 +0000 (21:10 +0100)
committersr55 <sr55.hb@outlook.com>
Thu, 27 Sep 2018 20:10:38 +0000 (21:10 +0100)
win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml
win/CS/HandBrakeWPF/Views/QueueView.xaml

index c4c264908e5a6b842ab628e98db659dbf6078375..43a64912ac9ce75b59872027d30ab55656ba7e86 100644 (file)
@@ -2267,6 +2267,15 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Retry Failed.\r
+        /// </summary>\r
+        public static string QueueView_ResetFailed {\r
+            get {\r
+                return ResourceManager.GetString("QueueView_ResetFailed", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Retry Selected Jobs.\r
         /// </summary>\r
index fb2bc3da7f97f33bc38d9c78815f2521a84a23df..914d9525e1700da5ed53fa98c350492edb142c2e 100644 (file)
@@ -1094,4 +1094,7 @@ This will not affect your current settings in the Subtitle tab.</value>
   <data name="QueueView_Summary" xml:space="preserve">\r
     <value>Summary</value>\r
   </data>\r
+  <data name="QueueView_ResetFailed" xml:space="preserve">\r
+    <value>Retry Failed</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index dbe93bc75aee1e8d00e152bde87366190280d716..aedd89b27d1ac979f8dd19cbbd469c10de9f2fdd 100644 (file)
@@ -573,6 +573,18 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
         \r
+        public void ResetFailed()\r
+        {\r
+            foreach (var task in this.QueueTasks)\r
+            {\r
+                if (task.Status == QueueItemStatus.Error)\r
+                {\r
+                    this.RetryJob(task);\r
+                }\r
+            }\r
+        }\r
+\r
+\r
         #endregion\r
 \r
         #region Methods\r
index f14470c50e2f9d9d375ea97655f04e8834616493..787d59835cd71d37f0a8301b7dfa43ed47c39ece 100644 (file)
                  SelectionMode="Extended"
                  ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
 
-
                 <i:Interaction.Triggers>
                     <commands:InputBindingTrigger>
                         <commands:InputBindingTrigger.InputBinding>
                         <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:ResourcesUI.QueueView_Start}" />
                         <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:ResourcesUI.QueueView_Pause}" />
                         <Separator />
+                        <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetFailed}" />
                         <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetSelectedJobs}" />
                         <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetAllJobs}" />
                         <Separator />
index 305a7b9f4ef6333b250a2ab7654f9fb300cfed1a..5fd2383ec3625d545dfbd72cfbbbc3e13a9acaea 100644 (file)
         xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue"\r
         xmlns:queue1="clr-namespace:HandBrakeWPF.Views.Queue"\r
         Title="{Binding Title}"\r
-        Width="850"\r
+        Width="750"\r
         Height="500"\r
         MinWidth="450"\r
-        MinHeight="260"\r
+        MinHeight="300"\r
         WindowStartupLocation="CenterScreen"\r
         TextOptions.TextFormattingMode="Display"\r
         mc:Ignorable="d">\r
                 <TextBlock Text="{Binding JobStatus}" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis"/>\r
             </StackPanel>\r
 \r
-            <ListBox Grid.Row="2" Tag="{Binding}"\r
+            <ListBox Grid.Row="2" Tag="{Binding}" x:Name="queueJobs"\r
                  Margin="10,20,10,10"\r
                  dd:DragDrop.DropHandler="{Binding}"\r
                  dd:DragDrop.IsDragSource="True"\r
                  ItemsSource="{Binding QueueTasks, Mode=OneWay}"\r
                  helpers:ListBoxHelper.SelectedItems="{Binding SelectedItems}" \r
                  SelectedItem="{Binding SelectedTask}"\r
-                 SelectionMode="Extended">\r
+                 SelectionMode="Extended"\r
+                 ScrollViewer.HorizontalScrollBarVisibility="Disabled">\r
 \r
                 <i:Interaction.Triggers>\r
                     <commands:InputBindingTrigger>\r
                         <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:ResourcesUI.QueueView_Start}" />\r
                         <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:ResourcesUI.QueueView_Pause}" />\r
                         <Separator />\r
+                        <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetFailed}" />\r
+                        <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetSelectedJobs}" />\r
+                        <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ResetAllJobs}" />\r
+                        <Separator />\r
                         <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearCompleted}" />\r
                         <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearAll}" />\r
                         <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:ResourcesUI.QueueView_ClearSelected}" />\r
                             </Image>\r
 \r
                             <!--  Settings  -->\r
-                            <StackPanel Grid.Column="1"\r
-                                    Margin="0,5,0,5"\r
-                                    HorizontalAlignment="Stretch">\r
-                                <StackPanel Orientation="Horizontal">\r
+                            <Grid Grid.Column="1" Margin="0,3,15,3">\r
+                                <Grid.RowDefinitions>\r
+                                    <RowDefinition Height="Auto" />\r
+                                    <RowDefinition Height="Auto" />\r
+                                    <RowDefinition Height="Auto" />\r
+                                    <RowDefinition Height="Auto" />\r
+                                </Grid.RowDefinitions>\r
+\r
+                                <Grid.ColumnDefinitions>\r
+                                    <ColumnDefinition Width="Auto" />\r
+                                    <ColumnDefinition Width="*" />\r
+                                </Grid.ColumnDefinitions>\r
+\r
+                                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2">\r
                                     <TextBlock FontWeight="Bold" Text="Title: " />\r
                                     <TextBlock Text="{Binding Task.Title}" />\r
 \r
-                                    <TextBlock Margin="10,0,0,0"\r
-                                           FontWeight="Bold"\r
-                                           Text="{Binding Task.PointToPointMode}" />\r
+                                    <TextBlock Text="{Binding Task.PointToPointMode}" Margin="10,0,0,0" FontWeight="Bold" />\r
                                     <TextBlock Text=": " />\r
                                     <TextBlock Text="{Binding Task.StartPoint}" />\r
                                     <TextBlock Margin="5,0,5,0" Text="to" />\r
                                     <TextBlock Text="{Binding Task.EndPoint}" />\r
                                 </StackPanel>\r
 \r
-                                <!--  TODO Support Drive Label Name  -->\r
-                                <StackPanel Orientation="Horizontal">\r
-                                    <TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_Source}" />\r
-                                    <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}" />\r
-                                </StackPanel>\r
 \r
-                                <StackPanel Orientation="Horizontal">\r
-                                    <TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_Destination}" />\r
-                                    <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" />\r
-                                </StackPanel>\r
-                            </StackPanel>\r
+                                <TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_Source}" Grid.Row="1" />\r
+                                <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}"  Margin="2,0,0,0" Grid.Row="1" Grid.Column="1"/>\r
+                                <TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_Destination}" Grid.Row="2" />\r
+                                <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" TextTrimming="CharacterEllipsis" Grid.Row="2" Grid.Column="1" />\r
+\r
+                                <ProgressBar Minimum="0" Height="4" Maximum="100" Name="pbStatus" Margin="0,2,5,0" Grid.Row="3" Grid.ColumnSpan="2"\r
+                                             Value="{Binding DataContext.ProgressValue, ElementName=queueJobs}" IsIndeterminate="{Binding DataContext.IntermediateProgress, ElementName=queueJobs}"\r
+                                             Visibility="{Binding ShowEncodeProgress, Converter={StaticResource boolToVisConverter}}" />\r
+                            </Grid>\r
 \r
                             <!--  Delete  -->\r
                             <Grid Grid.Column="2"\r