diff options
author | sr55 <[email protected]> | 2018-12-28 21:53:14 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2018-12-28 21:53:14 +0000 |
commit | 873f544513ac5a491dc97dd295bd0155ea013f1e (patch) | |
tree | 6fbdea2237f7bc3b8211d75486e587d2bab950e5 /win/CS | |
parent | 02ce19b32a2d725ad364f103f85788cfd50ac8bc (diff) |
WinGui: Make the new queue design default for new nightly installs. Move the When Done option below the queue list.
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml | 361 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/defaultsettings.xml | 8 |
3 files changed, 196 insertions, 176 deletions
diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml index 741d072c9..930533987 100644 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml +++ b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml @@ -53,50 +53,9 @@ <TextBlock Text="{x:Static Properties:Resources.MainView_ShowQueue}" FontSize="28" VerticalAlignment="Center" FontFamily="Segoe UI Light" Margin="10,0,0,0" /> - <Menu HorizontalAlignment="Right" VerticalAlignment="Center" Background="Transparent" Grid.Column="2" - AutomationProperties.Name="{x:Static Properties:Resources.QueueView_WhenDone}"> - <MenuItem> - <MenuItem.Header> - <StackPanel Height="32" Orientation="Horizontal"> - <TextBlock VerticalAlignment="Center" - FontWeight="Bold" - Text="{x:Static Properties:Resources.QueueView_WhenDone}" /> - <Label Margin="8,0,0,0" - VerticalAlignment="Center" - Content="{Binding WhenDoneAction}" /> - <Path Height="5" - Margin="2,2,2,0" - Data="M 0 0 L 4 4 L 8 0 Z" - Fill="{DynamicResource GlyphBrush}" /> - </StackPanel> - </MenuItem.Header> - - <MenuItem x:Name="doNothing" - cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]" - Header="{x:Static Properties:Resources.QueueView_DoNothing}" /> - <MenuItem x:Name="shutdown" - cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]" - Header="{x:Static Properties:Resources.QueueView_Shutdown}" /> - <MenuItem x:Name="suspend" - cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]" - Header="{x:Static Properties:Resources.QueueView_Suspend}" /> - <MenuItem x:Name="hibernate" - cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]" - Header="{x:Static Properties:Resources.QueueView_Hibernate}"/> - <MenuItem x:Name="lock" - cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]" - Header="{x:Static Properties:Resources.QueueView_LockSystem}" /> - <MenuItem x:Name="logoff" - cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]" - Header="{x:Static Properties:Resources.QueueView_Logoff}"/> - <MenuItem x:Name="quit" - cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]" - Header="{x:Static Properties:Resources.QueueView_QuitHandBrake}"/> - </MenuItem> - </Menu> </Grid> - <StackPanel Grid.Row="1" Margin="20,10,10,0" Visibility="{Binding IsNewQueueVisible, Converter={StaticResource boolToVisConverter}}"> + <StackPanel Grid.Row="1" Margin="20,5,10,0" Visibility="{Binding IsNewQueueVisible, Converter={StaticResource boolToVisConverter}}"> <TextBlock Text="{Binding JobsPending}" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" /> <TextBlock Text="{Binding JobStatus}" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis"/> </StackPanel> @@ -107,143 +66,197 @@ <ColumnDefinition Width="5*" x:Name="rightTabPanel" /> </Grid.ColumnDefinitions> - <ListBox Tag="{Binding}" x:Name="queueJobs" - Margin="10,0,5,10" - dd:DragDrop.DropHandler="{Binding}" - dd:DragDrop.IsDragSource="True" - dd:DragDrop.IsDropTarget="True" - ItemsSource="{Binding QueueTasks, Mode=OneWay}" - helpers:ListBoxHelper.SelectedItems="{Binding SelectedItems}" - SelectedItem="{Binding SelectedTask}" - SelectionMode="Extended" - ScrollViewer.HorizontalScrollBarVisibility="Disabled" > - - <i:Interaction.Triggers> - <commands:InputBindingTrigger> - <commands:InputBindingTrigger.InputBinding> - <KeyBinding Key="Delete"/> - </commands:InputBindingTrigger.InputBinding> - <cal:ActionMessage MethodName="RemoveSelectedJobs" /> - </commands:InputBindingTrigger> - </i:Interaction.Triggers> - - <ListBox.ContextMenu> - <ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Opened="ContextMenu_OnOpened"> - <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:Resources.QueueView_Start}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:Resources.QueueView_Pause}" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" /> - <Separator /> - <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" x:Name="openSourceDir" Click="OpenSourceDir_OnClick" /> - <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" x:Name="openDestDir" Click="OpenDestDir_OnClick" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" /> - </ContextMenu> - </ListBox.ContextMenu> - - <ListBox.ItemContainerStyle> - <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}"> - <Setter Property="HorizontalContentAlignment" Value="Stretch" /> - <Setter Property="Margin" Value="0,0,0,1" /> - </Style> - </ListBox.ItemContainerStyle> - - <ListBox.ItemTemplate> - <DataTemplate x:Name="QueueItemTemplate"> - - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40" /> - <ColumnDefinition Width="*" /> - <ColumnDefinition Width="Auto" /> - </Grid.ColumnDefinitions> - - <!-- Marker --> - <Image Grid.Column="0" Width="16" Height="16" SnapsToDevicePixels="True"> - - <Image.LayoutTransform> - <RotateTransform CenterX="8" CenterY="8" Angle="0"/> - </Image.LayoutTransform> - - <Image.Style> - <Style TargetType="{x:Type Image}"> - <Style.Triggers> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Waiting"> - <Setter Property="Source" Value="..\Images\Movies.png" /> - </DataTrigger> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="In Progress"> - <Setter Property="Source" Value="..\Images\Working0.png" /> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Duration="0:0:2" To="180" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)" RepeatBehavior="Forever" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)"/> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Completed"> - <Setter Property="Source" Value="..\Images\Complete.png" /> - </DataTrigger> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Error"> - <Setter Property="Source" Value="..\Images\WarningSmall.png" /> - </DataTrigger> - </Style.Triggers> - </Style> - </Image.Style> - </Image> - - <!-- Settings --> - <Grid Grid.Column="1" Margin="0,3,15,3"> - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="*" /> - </Grid.ColumnDefinitions> - - <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2"> - <TextBlock FontWeight="Bold" Text="Title: " /> - <TextBlock Text="{Binding Task.Title}" /> - - <TextBlock Text="{Binding Task.PointToPointMode}" Margin="10,0,0,0" FontWeight="Bold" /> - <TextBlock Text=": " /> - <TextBlock Text="{Binding Task.StartPoint}" /> - <TextBlock Margin="5,0,5,0" Text="to" /> - <TextBlock Text="{Binding Task.EndPoint}" /> - </StackPanel> + <Border> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="*" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + + <ListBox Tag="{Binding}" x:Name="queueJobs" Grid.Row="0" Margin="10,0,5,0" + + dd:DragDrop.DropHandler="{Binding}" + dd:DragDrop.IsDragSource="True" + dd:DragDrop.IsDropTarget="True" + ItemsSource="{Binding QueueTasks, Mode=OneWay}" + helpers:ListBoxHelper.SelectedItems="{Binding SelectedItems}" + SelectedItem="{Binding SelectedTask}" + SelectionMode="Extended" + BorderThickness="1" + ScrollViewer.HorizontalScrollBarVisibility="Disabled" > + + <i:Interaction.Triggers> + <commands:InputBindingTrigger> + <commands:InputBindingTrigger.InputBinding> + <KeyBinding Key="Delete"/> + </commands:InputBindingTrigger.InputBinding> + <cal:ActionMessage MethodName="RemoveSelectedJobs" /> + </commands:InputBindingTrigger> + </i:Interaction.Triggers> + + <ListBox.ContextMenu> + <ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Opened="ContextMenu_OnOpened"> + <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:Resources.QueueView_Start}" /> + <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:Resources.QueueView_Pause}" /> + <Separator /> + <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" /> + <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" /> + <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" /> + <Separator /> + <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" /> + <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" /> + <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" /> + <Separator /> + <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" x:Name="openSourceDir" Click="OpenSourceDir_OnClick" /> + <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" x:Name="openDestDir" Click="OpenDestDir_OnClick" /> + <Separator /> + <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" /> + </ContextMenu> + </ListBox.ContextMenu> + + <ListBox.ItemContainerStyle> + <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}"> + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> + <Setter Property="Margin" Value="0,0,0,1" /> + </Style> + </ListBox.ItemContainerStyle> + + <ListBox.ItemTemplate> + <DataTemplate x:Name="QueueItemTemplate"> + + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40" /> + <ColumnDefinition Width="*" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + + <!-- Marker --> + <Image Grid.Column="0" Width="16" Height="16" SnapsToDevicePixels="True"> + + <Image.LayoutTransform> + <RotateTransform CenterX="8" CenterY="8" Angle="0"/> + </Image.LayoutTransform> + + <Image.Style> + <Style TargetType="{x:Type Image}"> + <Style.Triggers> + <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Waiting"> + <Setter Property="Source" Value="..\Images\Movies.png" /> + </DataTrigger> + <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="In Progress"> + <Setter Property="Source" Value="..\Images\Working0.png" /> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Duration="0:0:2" To="180" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)" RepeatBehavior="Forever" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)"/> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Completed"> + <Setter Property="Source" Value="..\Images\Complete.png" /> + </DataTrigger> + <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Error"> + <Setter Property="Source" Value="..\Images\WarningSmall.png" /> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + + <!-- Settings --> + <Grid Grid.Column="1" Margin="0,3,15,3"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="*" /> + </Grid.ColumnDefinitions> + + <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2"> + <TextBlock FontWeight="Bold" Text="Title: " /> + <TextBlock Text="{Binding Task.Title}" /> + + <TextBlock Text="{Binding Task.PointToPointMode}" Margin="10,0,0,0" FontWeight="Bold" /> + <TextBlock Text=": " /> + <TextBlock Text="{Binding Task.StartPoint}" /> + <TextBlock Margin="5,0,5,0" Text="to" /> + <TextBlock Text="{Binding Task.EndPoint}" /> + </StackPanel> - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" Grid.Row="1" /> - <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" Grid.Row="1" Grid.Column="1"/> - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" Grid.Row="2" /> - <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" TextTrimming="CharacterEllipsis" Grid.Row="2" Grid.Column="1" /> + <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" Grid.Row="1" /> + <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" Grid.Row="1" Grid.Column="1"/> + <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" Grid.Row="2" /> + <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" TextTrimming="CharacterEllipsis" Grid.Row="2" Grid.Column="1" /> - <ProgressBar Minimum="0" Height="4" Maximum="100" Name="pbStatus" Margin="0,2,5,0" Grid.Row="3" Grid.ColumnSpan="2" + <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}}" /> - </Grid> - </Grid> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> + </Grid> + </Grid> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + + <Border BorderThickness="1,0,1,1" BorderBrush="DarkGray" Grid.Row="1" Margin="10,0,5,10" SnapsToDevicePixels="True" > + <Menu HorizontalAlignment="Center" VerticalAlignment="Center" Background="Transparent" + AutomationProperties.Name="{x:Static Properties:Resources.QueueView_WhenDone}"> + <MenuItem> + <MenuItem.Header> + <StackPanel Height="32" Orientation="Horizontal"> + <TextBlock VerticalAlignment="Center" + FontWeight="Bold" + Text="{x:Static Properties:Resources.QueueView_WhenDone}" /> + <Label Margin="8,0,0,0" + VerticalAlignment="Center" + Content="{Binding WhenDoneAction}" /> + <Path Height="5" + Margin="2,2,2,0" + Data="M 0 0 L 4 4 L 8 0 Z" + Fill="{DynamicResource GlyphBrush}" /> + </StackPanel> + </MenuItem.Header> + + <MenuItem x:Name="doNothing" + cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]" + Header="{x:Static Properties:Resources.QueueView_DoNothing}" /> + <MenuItem x:Name="shutdown" + cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]" + Header="{x:Static Properties:Resources.QueueView_Shutdown}" /> + <MenuItem x:Name="suspend" + cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]" + Header="{x:Static Properties:Resources.QueueView_Suspend}" /> + <MenuItem x:Name="hibernate" + cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]" + Header="{x:Static Properties:Resources.QueueView_Hibernate}"/> + <MenuItem x:Name="lock" + cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]" + Header="{x:Static Properties:Resources.QueueView_LockSystem}" /> + <MenuItem x:Name="logoff" + cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]" + Header="{x:Static Properties:Resources.QueueView_Logoff}"/> + <MenuItem x:Name="quit" + cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]" + Header="{x:Static Properties:Resources.QueueView_QuitHandBrake}"/> + </MenuItem> + </Menu> + </Border> + </Grid> + </Border> <TabControl x:Name="summaryTabControl" Grid.Column="1" Margin="5,0,10,10" > <TabItem Header="{x:Static Properties:Resources.QueueView_Summary}" > diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index ecf123105..39a81a760 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -17,7 +17,7 @@ xmlns:queue1="clr-namespace:HandBrakeWPF.Views.Queue"
Title="{Binding Title}"
Width="750"
- Height="500"
+ Height="520"
MinWidth="400"
MinHeight="300"
WindowStartupLocation="CenterScreen"
@@ -58,7 +58,6 @@ <RowDefinition Height="*" />
</Grid.RowDefinitions>
-
<ToolBar Name="mainToolBar"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index f90c53e8c..c677691f8 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -529,4 +529,12 @@ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>ShowExperimentalQueue</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
+ </value>
+ </item>
</dictionary>
\ No newline at end of file |