Skip to content

Commit 0d9d55a

Browse files
committed
Fix about panel cropping it's main label.
1 parent 7351461 commit 0d9d55a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed
6 Bytes
Binary file not shown.

Source/SPAboutController.m

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
#import "SPAboutController.h"
3232

33+
static NSString *SPSnapshotBuildIndicator = @"Snapshot";
34+
3335
static NSString *SPCreditsFilename = @"Credits";
3436
static NSString *SPLicenseFilename = @"License";
3537

@@ -56,12 +58,12 @@ - (void)awakeFromNib
5658
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
5759

5860
// If the version string has a prefix of 'Nightly' then this is obviously a nighly build.
59-
BOOL isNightly = [version hasPrefix:@"Nightly"];
61+
BOOL isSnapshotBuild = [version containsString:SPSnapshotBuildIndicator];
6062

6163
// Set the application name, but only include the major version if this is not a nightly build.
62-
[appNameVersionTextField setStringValue:isNightly ? @"Sequel Pro" : [NSString stringWithFormat:@"Sequel Pro %@", version]];
64+
[appNameVersionTextField setStringValue:isSnapshotBuild ? @"Sequel Pro" : [NSString stringWithFormat:@"Sequel Pro %@", version]];
6365

64-
[self _setVersionLabel:isNightly];
66+
[self _setVersionLabel:isSnapshotBuild];
6567

6668
// Get the credits file contents
6769
NSAttributedString *credits = [[[NSAttributedString alloc] initWithPath:[[NSBundle mainBundle] pathForResource:SPCreditsFilename ofType:@"rtf"] documentAttributes:nil] autorelease];
@@ -102,9 +104,9 @@ - (IBAction)closeApplicationLicenseSheet:(id)sender;
102104
/**
103105
* Set the UI version labels.
104106
*
105-
* @param isNightly Indicates whether or not this is a nightly build.
107+
* @param isSnapshot Indicates whether or not this is a snapshot build.
106108
*/
107-
- (void)_setVersionLabel:(BOOL)isNightly
109+
- (void)_setVersionLabel:(BOOL)isSnapshotBuild
108110
{
109111
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
110112

@@ -122,7 +124,7 @@ - (void)_setVersionLabel:(BOOL)isNightly
122124
else {
123125
textFieldString =
124126
[NSString stringWithFormat:@"%@ %@%@",
125-
isNightly ? NSLocalizedString(@"Nightly Build", @"nightly build label") : NSLocalizedString(@"Build", @"build label"),
127+
isSnapshotBuild ? NSLocalizedString(@"Snapshot Build", @"snapshot build label") : NSLocalizedString(@"Build", @"build label"),
126128
bundleVersion,
127129
hashIsEmpty ? @"" : [NSString stringWithFormat:@" (%@)", versionHash]];
128130
}

0 commit comments

Comments
 (0)