From da2773633059df112bd3c25fc8ae633f73c9f42b Mon Sep 17 00:00:00 2001 From: Paulo F. Andrade Date: Thu, 3 Apr 2014 11:25:28 +0100 Subject: Replaced call to deprecated NSRunCriticalAlertPanel API --- MASShortcutView.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MASShortcutView.m b/MASShortcutView.m index ba28e47..17ad0f1 100644 --- a/MASShortcutView.m +++ b/MASShortcutView.m @@ -380,9 +380,13 @@ void *kUserDataHint = &kUserDataHint; [weakSelf activateEventMonitoring:NO]; NSString *format = NSLocalizedString(@"The key combination %@ cannot be used", @"Title for alert when shortcut is already used"); - NSRunCriticalAlertPanel([NSString stringWithFormat:format, shortcut], error.localizedDescription, - NSLocalizedString(@"OK", @"Alert button when shortcut is already used"), - nil, nil); + NSAlert *alert = [[NSAlert alloc] init]; + alert.alertStyle = NSCriticalAlertStyle; + alert.informativeText = [NSString stringWithFormat:format, shortcut]; + alert.messageText = error.localizedDescription; + [alert addButtonWithTitle:NSLocalizedString(@"OK", @"Alert button when shortcut is already used")]; + + [alert runModal]; weakSelf.shortcutPlaceholder = nil; [weakSelf activateResignObserver:YES]; [weakSelf activateEventMonitoring:YES]; -- cgit v1.2.3