mirror of https://github.com/HandBrake/HandBrake
MacGui: hide the notification action button if there is no file url
Fix #6142.
(cherry picked from commit 689bd4941d)
This commit is contained in:
parent
254ca3334b
commit
c78dd5df2d
|
|
@ -416,12 +416,17 @@ NSString * const HBQueueItemNotificationPathKey = @"HBQueueItemNotificationPathK
|
|||
notification.title = title;
|
||||
notification.informativeText = description;
|
||||
notification.soundName = playSound ? NSUserNotificationDefaultSoundName : nil;
|
||||
|
||||
if (fileURL)
|
||||
{
|
||||
notification.hasActionButton = YES;
|
||||
notification.actionButtonTitle = NSLocalizedString(@"Show", @"Notification -> Show in Finder");
|
||||
notification.userInfo = @{ HBQueueItemNotificationPathKey: fileURL.path };
|
||||
}
|
||||
else
|
||||
{
|
||||
notification.hasActionButton = NO;
|
||||
}
|
||||
|
||||
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue