]> granicus.if.org Git - handbrake/commitdiff
MacGui: show a failed notification when an encode fails.
authorDamiano Galassi <damiog@gmail.com>
Wed, 7 Sep 2016 10:18:03 +0000 (12:18 +0200)
committerDamiano Galassi <damiog@gmail.com>
Wed, 7 Sep 2016 10:18:15 +0000 (12:18 +0200)
macosx/HBQueueController.m

index 4df27c361495285e4ccaf16a517917023c95aa4d..6d408d03dde823328eeab8f3261180f0a0aa7f92 100644 (file)
         {
             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];
     }