Skip to content

Commit

Permalink
Remove home page link from version string in pref pane
Browse files Browse the repository at this point in the history
  • Loading branch information
emcrisostomo committed Oct 13, 2017
1 parent 9e1a58d commit 24b3e49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion PrefPane/InfoPlistPreprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
#define InfoPlistPreprocessor_h

#define MM_VERSION 1.9.6
#define MM_COPYRIGHT MenuMeters v. MM_VERSION, by many contributors
#define MM_COPYRIGHT MenuMeters v. MM_VERSION

#endif /* InfoPlistPreprocessor_h */
13 changes: 1 addition & 12 deletions PrefPane/MenuMetersPref.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,29 +126,18 @@ - (void)mainViewDidLoad {
}

// On first load set the version string with a clickable link
//NSString*webpageURL=@"http://ragingmenace.com/";
NSString*webpageURL=@"http://member.ipmu.jp/yuji.tachikawa/MenuMetersElCapitan/";
NSMutableAttributedString *versionInfoString =
[[[NSBundle bundleForClass:[self class]] infoDictionary] objectForKey:@"CFBundleGetInfoString"];
NSMutableAttributedString *linkedVersionString =
[[NSMutableAttributedString alloc] initWithString:
[NSString stringWithFormat:@"%@ (%@)", versionInfoString,webpageURL]];
[NSString stringWithFormat:@"%@", versionInfoString]];
[linkedVersionString beginEditing];
[linkedVersionString setAlignment:NSCenterTextAlignment range:NSMakeRange(0, [linkedVersionString length])];
[linkedVersionString addAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[NSFont systemFontOfSize:10.0f],
NSFontAttributeName,
nil]
range:NSMakeRange(0, [linkedVersionString length])];
[linkedVersionString addAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
webpageURL,
NSLinkAttributeName,
[NSColor blueColor],
NSForegroundColorAttributeName,
[NSNumber numberWithInt:NSSingleUnderlineStyle],
NSUnderlineStyleAttributeName,
nil]
range:NSMakeRange([versionInfoString length] + 2, [webpageURL length])];
[linkedVersionString endEditing];
// See QA1487
[versionDisplay setAllowsEditingTextAttributes:YES];
Expand Down

0 comments on commit 24b3e49

Please sign in to comment.