From 11eaa3e092896dc6bb41c6c38f0d8f39e04a739b Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Mon, 29 Jun 2015 08:45:08 -0700 Subject: [PATCH] Replace deprecated alertWithMessageText --- Sparkle/SUUIBasedUpdateDriver.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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]; }