summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/MainView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-06-24 21:15:49 +0100
committersr55 <[email protected]>2019-06-24 21:16:01 +0100
commitb52b25d167d76106c8666c788c17e7a33f713f4d (patch)
treea01ff14c78959c9b4151819c78e46701c1cbf53b /win/CS/HandBrakeWPF/Views/MainView.xaml
parent1613a41853551dedc5b3219f05ed32aacbc85b79 (diff)
WinGui: Refactor "When Done" to use an enum to avoid language issues. Also change "suspend" to "sleep" to be consistent with the OS. Fixes #2162
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/MainView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml31
1 files changed, 16 insertions, 15 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index fecc7ffcf..dfa4da0df 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -24,6 +24,7 @@
<queue:InlineQueueConverter x:Key="InlineQueueConverter" />
<Converters:BooleanConverter x:Key="NotBooleanConverter" />
<Converters:ThemeImageConverter x:Key="themeConverter" />
+ <Converters:EnumComboConverter x:Key="enumComboConverter" />
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Padding" Value="8,2" />
@@ -833,7 +834,7 @@
<MenuItem.Header>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" MinHeight="26">
<TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_WhenDone}" />
- <TextBlock Margin="8,0,0,0" VerticalAlignment="Center" Text="{Binding QueueViewModel.WhenDoneAction}" />
+ <TextBlock Margin="8,0,0,0" VerticalAlignment="Center" Text="{Binding QueueViewModel.WhenDoneAction, Converter={StaticResource enumComboConverter}}" />
<Path Height="5"
Margin="2,2,2,0"
Data="M 0 0 L 4 4 L 8 0 Z"
@@ -842,26 +843,26 @@
</MenuItem.Header>
<MenuItem x:Name="doNothing"
- cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]"
- Header="{x:Static Properties:Resources.QueueView_DoNothing}" />
+ cal:Message.Attach="[Event Click] = [Action WhenDone(0)]"
+ Header="{x:Static Properties:Resources.WhenDone_DoNothing}" />
<MenuItem x:Name="shutdownSystem"
- cal:Message.Attach="[Event Click] = [Action WhenDone(shutdownSystem.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Shutdown}" />
+ cal:Message.Attach="[Event Click] = [Action WhenDone(1)]"
+ Header="{x:Static Properties:Resources.WhenDone_Shutdown}" />
<MenuItem x:Name="suspend"
- cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Suspend}"/>
+ cal:Message.Attach="[Event Click] = [Action WhenDone(2)]"
+ Header="{x:Static Properties:Resources.WhenDone_Suspend}"/>
<MenuItem x:Name="hibernate"
- cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Hibernate}" />
+ cal:Message.Attach="[Event Click] = [Action WhenDone(3)]"
+ Header="{x:Static Properties:Resources.WhenDone_Hibernate}" />
<MenuItem x:Name="lock"
- cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]"
- Header="{x:Static Properties:Resources.QueueView_LockSystem}" />
+ cal:Message.Attach="[Event Click] = [Action WhenDone(4)]"
+ Header="{x:Static Properties:Resources.WhenDone_LockSystem}" />
<MenuItem x:Name="logoff"
- cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Logoff}"/>
+ cal:Message.Attach="[Event Click] = [Action WhenDone(5)]"
+ Header="{x:Static Properties:Resources.WhenDone_Logoff}"/>
<MenuItem x:Name="quit"
- cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]"
- Header="{x:Static Properties:Resources.QueueView_QuitHandBrake}" />
+ cal:Message.Attach="[Event Click] = [Action WhenDone(6)]"
+ Header="{x:Static Properties:Resources.WhenDone_QuitHandBrake}" />
</MenuItem>
</Menu>
</StatusBarItem>