summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-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];
};