From e8267a84ceba5eb51ace739d0b8991c5108ce5b6 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Sat, 18 Mar 2023 23:23:37 -0700 Subject: [PATCH] About MacVim show "pre-release" when running a pre-release build This helps the user know whether they are using a relatively untested build and should consider going back to a main release. We currently just define "pre-release" build as any release version with a minor version, e.g. r176.1 is a pre-release, but r176 isn't. Also, move the order around so we show "MacVim r123 (Vim 9.0.1234)" instead of "Vim 9.0.1234 (MacVim r123)" which is more consistent with other ways we show version numbers, and this will be how we show version number when we upgrade to Sparkle 2.4 as well. --- src/MacVim/MMApplication.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MacVim/MMApplication.m b/src/MacVim/MMApplication.m index ca8c5c5902..85d5074ec3 100644 --- a/src/MacVim/MMApplication.m +++ b/src/MacVim/MMApplication.m @@ -52,8 +52,12 @@ - (void)orderFrontStandardAboutPanel:(id)sender @"CFBundleVersion"]; NSString *marketingVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + + BOOL isPrerelease = [version containsSubstring:@"."]; + NSString *prerelease = isPrerelease ? @"\npre-release" : @""; + NSString *title = [NSString stringWithFormat: - @"Vim %@ (MacVim r%@)", marketingVersion, version]; + @"MacVim r%@ (Vim %@)%@", version, marketingVersion, prerelease]; [self orderFrontStandardAboutPanelWithOptions: [NSDictionary dictionaryWithObjectsAndKeys: