From e1172af6f6c6d71241c950e0953a70755f5c5d17 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 28 Sep 2018 20:18:26 +0100 Subject: [PATCH] WinGui: Minor bug fixes and tidyup in the queue. --- win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 13 +++++++------ win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml | 1 - .../HandBrakeWPF/Views/Queue/QueueTwoContent.xaml | 1 - .../Views/Queue/QueueTwoContent.xaml.cs | 6 +++--- win/CS/HandBrakeWPF/Views/QueueView.xaml | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index aedd89b27..0edc63822 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -194,7 +194,7 @@ namespace HandBrakeWPF.ViewModels public string ActivityLog { get; private set; } - public bool CanRetryJob => this.SelectedTask != null && this.SelectedTask.Status != QueueItemStatus.Waiting; + public bool CanRetryJob => this.SelectedTask != null && this.SelectedTask.Status != QueueItemStatus.Waiting && this.SelectedTask.Status != QueueItemStatus.InProgress; public bool CanEditJob => this.SelectedTask != null; @@ -447,6 +447,7 @@ namespace HandBrakeWPF.ViewModels task.Status = QueueItemStatus.Waiting; this.queueProcessor.BackupQueue(null); this.JobsPending = string.Format(Resources.QueueViewModel_JobsPending, this.queueProcessor.Count); + this.JobStatus = Resources.QueueViewModel_QueueReady; this.NotifyOfPropertyChange(() => this.CanRetryJob); } @@ -559,7 +560,7 @@ namespace HandBrakeWPF.ViewModels { this.RetryJob(task); } - } + } } public void ResetAllJobs() @@ -737,7 +738,6 @@ namespace HandBrakeWPF.ViewModels { Execute.OnUIThread(() => { - string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count); this.IntermediateProgress = false; if (e.IsSubtitleScan) @@ -748,7 +748,7 @@ namespace HandBrakeWPF.ViewModels e.PercentComplete, e.EstimatedTimeLeft, e.ElapsedTime, - jobsPending); + null); this.ProgressValue = e.PercentComplete; } @@ -759,7 +759,7 @@ namespace HandBrakeWPF.ViewModels } else if (e.IsSearching) { - this.JobStatus = string.Format(ResourcesUI.MainView_ProgressStatusWithTask, ResourcesUI.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, jobsPending); + this.JobStatus = string.Format(ResourcesUI.MainView_ProgressStatusWithTask, ResourcesUI.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, null); this.ProgressValue = e.PercentComplete; } else @@ -773,7 +773,7 @@ namespace HandBrakeWPF.ViewModels e.AverageFrameRate, e.EstimatedTimeLeft, e.ElapsedTime, - jobsPending); + null); this.ProgressValue = e.PercentComplete; } }); @@ -821,6 +821,7 @@ namespace HandBrakeWPF.ViewModels this.IsQueueRunning = false; this.NotifyOfPropertyChange(() => this.SelectedTask); this.NotifyOfPropertyChange(() => this.StatsVisible); + this.NotifyOfPropertyChange(() => this.CanRetryJob); } /// diff --git a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml index ae7ecf37a..c304f36db 100644 --- a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml +++ b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml @@ -14,7 +14,6 @@ xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers" xmlns:Properties="clr-namespace:HandBrakeWPF.Properties" xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue" - MinWidth="350" MinHeight="250" TextOptions.TextFormattingMode="Display" diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml index f43381071..2138bd180 100644 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml +++ b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml @@ -281,7 +281,6 @@ -