Permalink
Browse files

Fix about panel cropping it's main label.

  • Loading branch information...
stuconnolly committed Mar 18, 2017
1 parent 7351461 commit 0d9d55adaf10aa5936e2456200203ed85fb68465
Showing with 8 additions and 6 deletions.
  1. BIN Resources/English.lproj/Localizable.strings
  2. +8 −6 Source/SPAboutController.m
Binary file not shown.
View
@@ -30,6 +30,8 @@
#import "SPAboutController.h"
+static NSString *SPSnapshotBuildIndicator = @"Snapshot";
+
static NSString *SPCreditsFilename = @"Credits";
static NSString *SPLicenseFilename = @"License";
@@ -56,12 +58,12 @@ - (void)awakeFromNib
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 @@ - (IBAction)closeApplicationLicenseSheet:(id)sender;
/**
* 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 @@ - (void)_setVersionLabel:(BOOL)isNightly
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]];
}

0 comments on commit 0d9d55a

Please sign in to comment.