diff options
author | Damiano Galassi <[email protected]> | 2016-09-07 12:18:03 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-09-07 12:18:15 +0200 |
commit | 496680b6c71c2844f8040e1073b5fa8e16914429 (patch) | |
tree | 87112b6cbc9d162c05af3bfdde39387d8e6b9e05 /macosx | |
parent | d9f444f9210ce7856f7d052388c52fd397f29f75 (diff) |
MacGui: show a failed notification when an encode fails.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBQueueController.m | 19 |
1 files 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]; } |