summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
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}">