Skip to content
Browse files

Show app version in menu

  • Loading branch information...
1 parent 01c4f9f commit b9fb5860b5c9d3e1b47134df7bdf734e57490f8d @codler committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 Battery Time Remaining/AppDelegate.m
View
3 Battery Time Remaining/AppDelegate.m
@@ -645,6 +645,7 @@ - (void)menuWillOpen:(NSMenu *)menu
[[HttpGet new] url:@"https://raw.github.com/codler/Battery-Time-Remaining/master/build_version" success:^(NSString *result) {
NSInteger latestBuildVersion = [result integerValue];
NSInteger currentBuildVersion = [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] integerValue];
+ NSString *currentBuildVersionText = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
// Wrong format build version
if (!latestBuildVersion)
@@ -663,7 +664,7 @@ - (void)menuWillOpen:(NSMenu *)menu
}
else
{
- updaterMenu.title = NSLocalizedString(@"Up to date", @"Update menuitem");
+ updaterMenu.title = [NSString stringWithFormat:@"%@ - v%@", NSLocalizedString(@"Up to date", @"Update menuitem"), currentBuildVersionText];
}
} error:^(NSError *error) {
updaterMenu.title = NSLocalizedString(@"Could not check for updates", @"Update menuitem");

0 comments on commit b9fb586

Please sign in to comment.
Something went wrong with that request. Please try again.