From: Damiano Galassi Date: Wed, 7 Sep 2016 10:18:03 +0000 (+0200) Subject: MacGui: show a failed notification when an encode fails. X-Git-Tag: 1.0.0~236 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=496680b6c71c2844f8040e1073b5fa8e16914429;p=handbrake MacGui: show a failed notification when an encode fails. --- 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]; }