diff options
author | Stuart Connolly <stuart02@gmail.com> | 2017-03-18 18:13:04 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2017-03-18 18:13:04 +0000 |
commit | 0d9d55adaf10aa5936e2456200203ed85fb68465 (patch) | |
tree | 7f4a9ac907bdeddaa88c25ae0279bf147990a981 /Source | |
parent | 735146114b38fcc13f4d2fdff465c6bf07c82f72 (diff) | |
download | sequelpro-0d9d55adaf10aa5936e2456200203ed85fb68465.tar.gz sequelpro-0d9d55adaf10aa5936e2456200203ed85fb68465.tar.bz2 sequelpro-0d9d55adaf10aa5936e2456200203ed85fb68465.zip |
Fix about panel cropping it's main label.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAboutController.m | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/SPAboutController.m b/Source/SPAboutController.m index 30be7cfb..0fa5a06c 100644 --- a/Source/SPAboutController.m +++ b/Source/SPAboutController.m @@ -30,6 +30,8 @@ #import "SPAboutController.h" +static NSString *SPSnapshotBuildIndicator = @"Snapshot"; + static NSString *SPCreditsFilename = @"Credits"; static NSString *SPLicenseFilename = @"License"; @@ -56,12 +58,12 @@ static NSString *SPShortVersionHashKey = @"SPVersionShortHash"; NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; // If the version string has a prefix of 'Nightly' then this is obviously a nighly build. - BOOL isNightly = [version hasPrefix:@"Nightly"]; + BOOL isSnapshotBuild = [version containsString:SPSnapshotBuildIndicator]; // Set the application name, but only include the major version if this is not a nightly build. - [appNameVersionTextField setStringValue:isNightly ? @"Sequel Pro" : [NSString stringWithFormat:@"Sequel Pro %@", version]]; + [appNameVersionTextField setStringValue:isSnapshotBuild ? @"Sequel Pro" : [NSString stringWithFormat:@"Sequel Pro %@", version]]; - [self _setVersionLabel:isNightly]; + [self _setVersionLabel:isSnapshotBuild]; // Get the credits file contents NSAttributedString *credits = [[[NSAttributedString alloc] initWithPath:[[NSBundle mainBundle] pathForResource:SPCreditsFilename ofType:@"rtf"] documentAttributes:nil] autorelease]; @@ -102,9 +104,9 @@ static NSString *SPShortVersionHashKey = @"SPVersionShortHash"; /** * Set the UI version labels. * - * @param isNightly Indicates whether or not this is a nightly build. + * @param isSnapshot Indicates whether or not this is a snapshot build. */ -- (void)_setVersionLabel:(BOOL)isNightly +- (void)_setVersionLabel:(BOOL)isSnapshotBuild { NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; @@ -122,7 +124,7 @@ static NSString *SPShortVersionHashKey = @"SPVersionShortHash"; else { textFieldString = [NSString stringWithFormat:@"%@ %@%@", - isNightly ? NSLocalizedString(@"Nightly Build", @"nightly build label") : NSLocalizedString(@"Build", @"build label"), + isSnapshotBuild ? NSLocalizedString(@"Snapshot Build", @"snapshot build label") : NSLocalizedString(@"Build", @"build label"), bundleVersion, hashIsEmpty ? @"" : [NSString stringWithFormat:@" (%@)", versionHash]]; } |