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 | |
parent | 041d228b23f622ee86a528f8c667e048503c226e (diff) |
Fix: fix another deprecation warning and add a missing alloc message.
-rw-r--r-- | macosx/HBPresetsViewController.m | 2 | ||||
-rw-r--r-- | macosx/HBPreviewController.m | 17 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 2 |
3 files changed, 11 insertions, 10 deletions
diff --git a/macosx/HBPresetsViewController.m b/macosx/HBPresetsViewController.m index 1f9ba0c8b..d2a22b378 100644 --- a/macosx/HBPresetsViewController.m +++ b/macosx/HBPresetsViewController.m @@ -257,7 +257,7 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext; if ([self.treeController canRemove]) { // Alert user before deleting preset - NSAlert *alert = [NSAlert init]; + NSAlert *alert = [[NSAlert alloc] init]; alert.messageText = NSLocalizedString(@"Are you sure you want to permanently delete the selected preset?", @"Delete preset alert -> message"); alert.informativeText = NSLocalizedString(@"You can't undo this action.", @"Delete preset alert -> informative text"); [alert addButtonWithTitle:NSLocalizedString(@"Delete Preset", @"Delete preset alert -> first button")]; 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]; } diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 52f1f0223..1fa8d0a8a 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -38,7 +38,7 @@ 273F20B314ADBE670021BE6D /* HBOutputPanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209C14ADBE670021BE6D /* HBOutputPanelController.m */; }; 273F20B414ADBE670021BE6D /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209E14ADBE670021BE6D /* HBOutputRedirect.m */; }; 273F20B514ADBE670021BE6D /* HBPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F20A014ADBE670021BE6D /* HBPreferencesController.m */; }; - 273F20B714ADBE670021BE6D /* HBPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F20A414ADBE670021BE6D /* HBPreviewController.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; + 273F20B714ADBE670021BE6D /* HBPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F20A414ADBE670021BE6D /* HBPreviewController.m */; }; 273F20BA14ADBE670021BE6D /* HBPictureController.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F20AA14ADBE670021BE6D /* HBPictureController.m */; }; 273F20CC14ADC8A10021BE6D /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 273F20C014ADC1250021BE6D /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 273F218B14ADDDA10021BE6D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 273F217C14ADDDA10021BE6D /* InfoPlist.strings */; }; |