From ec8fcbc02f6260f509742e8ff634e25e3891717e Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Sun, 17 Aug 2008 13:51:55 -0700 Subject: [PATCH] If an update's display version is the same as the host's display version, the internal version number will be presented in parentheticals. --- SUUpdateAlert.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SUUpdateAlert.m b/SUUpdateAlert.m index 3ad9ba62..865a5424 100644 --- a/SUUpdateAlert.m +++ b/SUUpdateAlert.m @@ -150,7 +150,15 @@ - (NSString *)descriptionText { - return [NSString stringWithFormat:SULocalizedString(@"%@ %@ is now available\u2014you have %@. Would you like to download it now?", nil), [host name], [updateItem displayVersionString], [host displayVersion]]; + NSString *updateItemVersion = [updateItem displayVersionString]; + NSString *hostVersion = [host displayVersion]; + // Display more info if the version strings are the same; useful for betas. + if ([updateItemVersion isEqualToString:hostVersion]) + { + updateItemVersion = [updateItemVersion stringByAppendingFormat:@" (%@)", [updateItem versionString]]; + hostVersion = [hostVersion stringByAppendingFormat:@" (%@)", [host version]]; + } + return [NSString stringWithFormat:SULocalizedString(@"%@ %@ is now available\u2014you have %@. Would you like to download it now?", nil), [host name], updateItemVersion, hostVersion]; } - (void)webView:(WebView *)sender didFinishLoadForFrame:frame