diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index 11887adf..4d4dd138 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -167,7 +167,10 @@ static const NSTimeInterval SUParentQuitCheckInterval = .25; completionHandler:^(NSError *error) { if (error) { if (self.shouldShowUI) { - NSRunAlertPanel(@"", @"%@", @"OK", @"", @"", [error localizedDescription]); + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = @""; + alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]]; + [alert runModal]; } exit(EXIT_FAILURE); } else { diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 7875dadd..b1e09370 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -63,11 +63,10 @@ [[self.updater delegate] updaterDidNotFindUpdate:self.updater]; [[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidNotFindUpdateNotification object:self.updater]; - NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates.") - defaultButton:SULocalizedString(@"OK", nil) - alternateButton:nil - otherButton:nil - informativeTextWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]]; + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates."); + alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]]; + [alert addButtonWithTitle:SULocalizedString(@"OK", nil)]; [self showModalAlert:alert]; [self abortUpdate]; } @@ -201,7 +200,10 @@ - (void)abortUpdateWithError:(NSError *)error { - NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"Update Error!", nil) defaultButton:SULocalizedString(@"Cancel Update", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@", [error localizedDescription]]; + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = SULocalizedString(@"Update Error!", nil); + alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]]; + [alert addButtonWithTitle:SULocalizedString(@"Cancel Update", nil)]; [self showModalAlert:alert]; [super abortUpdateWithError:error]; } diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index ee26656c..ca3b3606 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -104,11 +104,17 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults BOOL hostIsCodeSigned = [SUCodeSigningVerifier hostApplicationIsCodeSigned]; if (!isMainBundle && !hasPublicDSAKey) { [self notifyWillShowModalAlert]; - NSRunAlertPanel(@"Insecure update error!", @"For security reasons, you need to sign your updates with a DSA key. See Sparkle's documentation for more information.", @"OK", nil, nil); + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = @"Insecure update error!"; + alert.informativeText = @"For security reasons, you need to sign your updates with a DSA key. See Sparkle's documentation for more information."; + [alert runModal]; [self notifyDidShowModalAlert]; } else if (isMainBundle && !(hasPublicDSAKey || hostIsCodeSigned)) { [self notifyWillShowModalAlert]; - NSRunAlertPanel(@"Insecure update error!", @"For security reasons, you need to code sign your application or sign your updates with a DSA key. See Sparkle's documentation for more information.", @"OK", nil, nil); + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = @"Insecure update error!"; + alert.informativeText = @"For security reasons, you need to code sign your application or sign your updates with a DSA key. See Sparkle's documentation for more information."; + [alert runModal]; [self notifyDidShowModalAlert]; }