diff options
author | sr55 <[email protected]> | 2019-01-25 21:08:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2019-01-27 20:46:41 +0000 |
commit | 7f76264f5be0ba32fccf4f1ca200e346e3a31a11 (patch) | |
tree | 18fcd3fde3fa8063e13cfe36661f5a61a6a0704d | |
parent | 95c21515907b14f2845c5e060ebc9d6a4023b5df (diff) |
WinGui: Move the Queue Recovery option from the source panel to the Queue Menu. It's not something that's frequently used and doesn't really belong on the Source Menu. Makes the source menu less cluttered.
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml | 12 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 3 |
5 files changed, 10 insertions, 14 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml index f3cecdbe3..0e4925748 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml @@ -108,18 +108,6 @@ </ListBox.ItemTemplate>
</ListBox>
- <Button Grid.Row="5" AutomationProperties.Name="{x:Static Properties:Resources.SourceSelection_QueueArchiveRecovery}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
- cal:Message.Attach="[Event Click] = [Action RecoverQueue]" Visibility="{Binding QueueRecoveryArchivesExist, Converter={StaticResource BooleanToVisibilityConverter}}"
- Margin="20,15,0,0" Padding="8" HorizontalAlignment="Left" BorderBrush="DarkGray" BorderThickness="0,1,0,0">
- <StackPanel Orientation="Horizontal" MinWidth="100">
- <Image Source="../Views/Images/Queue.png" Width="32" />
- <StackPanel Orientation="Vertical">
- <TextBlock Text="{x:Static Properties:Resources.SourceSelection_QueueArchiveRecovery}" VerticalAlignment="Center" Margin="5,0,0,0" />
- <TextBlock Text="{x:Static Properties:Resources.SourceSelection_QueueArchiveRecoveryDesc}" VerticalAlignment="Center" Margin="5,0,0,0" />
- </StackPanel>
- </StackPanel>
- </Button>
-
<!-- Cancel Window -->
<StackPanel Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
<Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" Padding="8,2" />
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index f90e41d43..bebf83f6f 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -4449,7 +4449,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Queue Recovery. + /// Looks up a localized string similar to Recover Queue Files. /// </summary> public static string SourceSelection_QueueArchiveRecovery { get { diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index b0fc5a891..89ec0714c 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -1610,7 +1610,7 @@ This will not affect your current settings in the Subtitle tab.</value> <value>Open a folder with one or more files.</value>
</data>
<data name="SourceSelection_QueueArchiveRecovery" xml:space="preserve">
- <value>Queue Recovery</value>
+ <value>Recover Queue Files</value>
</data>
<data name="SourceSelection_QueueArchiveRecoveryDesc" xml:space="preserve">
<value>A previous queue archive is available. </value>
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 9d07343a7..3d2130edb 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2109,6 +2109,11 @@ namespace HandBrakeWPF.ViewModels }
}
+ public bool CanRecoverQueue()
+ {
+ return this.QueueRecoveryArchivesExist;
+ }
+
public void RecoverQueue()
{
QueueRecoveryHelper.ResetArchives();
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 3abfa7d5c..8948c03e3 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -125,6 +125,9 @@ <MenuItem Command="{Binding QueueCommand}" CommandParameter="{x:Static menu:QueueCommandParams.ClearSelected}" Header="{x:Static Properties:Resources.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.Export}" Header="{x:Static Properties:Resources.QueueView_Export}" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
+ <Separator />
+ <MenuItem x:Name="queueRecoveryMenuItem" Header="{x:Static Properties:Resources.SourceSelection_QueueArchiveRecovery}" cal:Message.Attach="[Event Click] = [Action RecoverQueue]" />
+
</MenuItem>
<MenuItem Header="{x:Static Properties:Resources.MainView_HelpMenu}">
|