aboutsummaryrefslogtreecommitdiffstats
path: root/MASShortcutView.m
diff options
context:
space:
mode:
Diffstat (limited to 'MASShortcutView.m')
-rw-r--r--MASShortcutView.m10
1 files 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];