summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-07-29 12:42:46 +0200
committerDamiano Galassi <[email protected]>2016-07-29 12:42:46 +0200
commit40d3a13f783add7439ff5527b3e9a862ff959397 (patch)
treea8e785a3ecc5fd2308148a0ebe3e86ed4445c22c
parentff347b10bc150b79663029c85d3261ef0f30bfc6 (diff)
MacGui: update the UI after a failed queue scan.
-rw-r--r--macosx/HBQueueController.m28
1 files changed, 20 insertions, 8 deletions
diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m
index ac33e8dd0..3c39606c6 100644
--- a/macosx/HBQueueController.m
+++ b/macosx/HBQueueController.m
@@ -643,6 +643,26 @@
}
[self.window.toolbar validateVisibleItems];
[self.jobs commit];
+
+ // Update UI
+ NSString *info = nil;
+ switch (result) {
+ case HBCoreResultDone:
+ info = NSLocalizedString(@"Encode Finished.", @"");
+ break;
+ case HBCoreResultCancelled:
+ info = NSLocalizedString(@"Encode Cancelled.", @"");
+ break;
+ default:
+ info = NSLocalizedString(@"Encode Failed.", @"");
+ break;
+ }
+ self.progressTextField.stringValue = info;
+ [self.controller setQueueInfo:info progress:1.0 hidden:YES];
+
+ // Restore dock icon
+ [self.dockTile updateDockIcon:-1.0 withETA:@""];
+ self.dockIconProgress = 0;
}
/**
@@ -723,14 +743,6 @@
// Completion handler
void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result)
{
- NSString *info = NSLocalizedString(@"Encode Finished.", @"");
- self.progressTextField.stringValue = info;
- [self.controller setQueueInfo:info progress:1.0 hidden:YES];
-
- // Restore dock icon
- [self.dockTile updateDockIcon:-1.0 withETA:@""];
- self.dockIconProgress = 0;
-
[self completedJob:job result:result];
[self encodeNextQueueItem];
};