diff options
| author | Paulo F. Andrade | 2014-04-03 11:25:28 +0100 | 
|---|---|---|
| committer | Paulo F. Andrade | 2014-04-03 11:25:28 +0100 | 
| commit | da2773633059df112bd3c25fc8ae633f73c9f42b (patch) | |
| tree | 2b8909559614f1d0968eacc7ba095aa56ddd95c7 /MASShortcutView.m | |
| parent | 9c0b4a327c2315bb6d27fe97dedad53e36e3c567 (diff) | |
| download | MASShortcut-da2773633059df112bd3c25fc8ae633f73c9f42b.tar.bz2 | |
Replaced call to deprecated NSRunCriticalAlertPanel API
Diffstat (limited to 'MASShortcutView.m')
| -rw-r--r-- | MASShortcutView.m | 10 | 
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]; | 
