Permalink
Browse files

If an update's display version is the same as the host's display vers…

…ion, the internal version number will be presented in parentheticals.
  • Loading branch information...
1 parent 68e2cd6 commit ec8fcbc02f6260f509742e8ff634e25e3891717e @andymatuschak andymatuschak committed Aug 17, 2008
Showing with 9 additions and 1 deletion.
  1. +9 −1 SUUpdateAlert.m
View
@@ -150,7 +150,15 @@ - (NSString *)titleText
- (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

0 comments on commit ec8fcbc

Please sign in to comment.