summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-07-29 13:51:04 +0100
committersr55 <[email protected]>2018-07-29 13:51:04 +0100
commitecf8523aff86d547cefd30483ef202a355dcffb6 (patch)
treebe21805bf220bd827e1fd5736e34e84f0c9761f0 /win
parent1cab4cf87529b906b75e04910bf2ac87aed63857 (diff)
WinGui: Don't grey out the Start Queue button when the encode is paused. #1501
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs14
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml2
2 files changed, 3 insertions, 13 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index 12f23edf6..57ebd2830 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -379,23 +379,11 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Can Start Encoding.
- /// Used by Caliburn Micro to enable/disable the context menu item.
- /// </summary>
- /// <returns>
- /// True when we can start encoding.
- /// </returns>
- public bool CanStartQueue()
- {
- return !this.IsQueueRunning;
- }
-
- /// <summary>
/// Start Encode
/// </summary>
public void StartQueue()
{
- if (this.queueProcessor.Count == 0 || !this.QueueTasks.Any(a => a.Status == QueueItemStatus.Waiting || a.Status == QueueItemStatus.InProgress))
+ if (!this.QueueTasks.Any(a => a.Status == QueueItemStatus.Waiting || a.Status == QueueItemStatus.InProgress))
{
this.errorService.ShowMessageBox(
Resources.QueueViewModel_NoPendingJobs, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 6fb07daf2..8fe2aeaeb 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -28,6 +28,7 @@
<Converters:FullPathToFileNameConverter x:Key="filePathToFilenameConverter" />
<Converters:EnumComboConverter x:Key="enumComboConverter" />
<Converters:QueueStatusToVisibilityConverter x:Key="queueStatusVisConverter" />
+ <Converters:InverseBooleanConverter x:Key="notBooleanConverter" />
<Audio:AudioQueueDisplayConverter x:Key="audioTrackDisplayConverter" />
<Subtitles:SubtitlesQueueDisplayConverter x:Key="subtitleTrackDisplayConverter" />
<video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" />
@@ -66,6 +67,7 @@
<Button Name="Start" DockPanel.Dock="Left" AutomationProperties.Name="Start Queue"
cal:Message.Attach="[Event Click] = [Action StartQueue]"
+ IsEnabled="{Binding IsQueueRunning, Converter={StaticResource notBooleanConverter}}"
Visibility="{Binding IsQueueRunning,
Converter={StaticResource boolToVisConverter},
ConverterParameter=true}">