From 496680b6c71c2844f8040e1073b5fa8e16914429 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 7 Sep 2016 12:18:03 +0200 Subject: [PATCH] MacGui: show a failed notification when an encode fails. --- macosx/HBQueueController.m | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m index 4df27c361..6d408d03d 100644 --- a/macosx/HBQueueController.m +++ b/macosx/HBQueueController.m @@ -872,9 +872,24 @@ { NSBeep(); } - NSString *description = [NSString stringWithFormat:NSLocalizedString(@"your HandBrake encode %@ is done!", nil), job.destURL]; - [self showNotificationWithTitle:NSLocalizedString(@"Put down that cocktail…", nil) + NSString *title; + NSString *description; + if (result == HBCoreResultDone) + { + title = NSLocalizedString(@"Put down that cocktail…", nil); + description = [NSString stringWithFormat:NSLocalizedString(@"your HandBrake encode %@ is done!", nil), + job.destURL.lastPathComponent]; + + } + else + { + title = NSLocalizedString(@"Encode failed", nil); + description = [NSString stringWithFormat:NSLocalizedString(@"your HandBrake encode %@ couldn't be completed.", nil), + job.destURL.lastPathComponent]; + } + + [self showNotificationWithTitle:title description:description url:job.destURL]; } -- 2.40.0