diff options
author | Damiano Galassi <[email protected]> | 2018-06-09 10:26:57 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2018-06-09 10:26:57 +0200 |
commit | a9977ba65de8c671924d60cdd7abb2597032cd5e (patch) | |
tree | ae1b80cdc08badd1b5cf43d98541dc9cf55389e0 /macosx/HBPreviewController.m | |
parent | 041d228b23f622ee86a528f8c667e048503c226e (diff) |
Fix: fix another deprecation warning and add a missing alloc message.
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r-- | macosx/HBPreviewController.m | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 26d76d94f..f5c572cfd 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -525,14 +525,15 @@ - (void)showAlert:(NSURL *)fileURL; { - NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"HandBrake can't open the preview.", @"Preview -> live preview alert message") - defaultButton:NSLocalizedString(@"Open in external player", @"Preview -> live preview alert default button") - alternateButton:NSLocalizedString(@"Cancel", @"Preview -> live preview alert alternate button") - otherButton:nil - informativeTextWithFormat:NSLocalizedString(@"HandBrake can't playback this combination of video/audio/container format. Do you want to open it in an external player?", @"Preview -> live preview alert informative text")]; - - [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) { - if (returnCode == NSModalResponseOK) + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = NSLocalizedString(@"HandBrake can't open the preview.", @"Preview -> live preview alert message"); + alert.informativeText = NSLocalizedString(@"HandBrake can't playback this combination of video/audio/container format. Do you want to open it in an external player?", @"Preview -> live preview alert informative text"); + [alert addButtonWithTitle:NSLocalizedString(@"Open in external player", @"Preview -> live preview alert default button")]; + [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Preview -> live preview alert alternate button")]; + + [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) + { + if (returnCode == NSAlertFirstButtonReturn) { [[NSWorkspace sharedWorkspace] openURL:fileURL]; } |