From 9257d50b15a011fc32142257a21039433f23c5a7 Mon Sep 17 00:00:00 2001 From: Kyle Neideck Date: Wed, 24 Apr 2024 13:50:53 +1000 Subject: [PATCH] In the About panel, link to the contributors page on GitHub. Also, bump the patch version number and copyright years. (Should have done that before tagging v0.4.1, so jump to v0.4.2.) --- BGMApp/BGMApp/Base.lproj/MainMenu.xib | 47 ++++++++++++++--------- BGMApp/BGMApp/Info.plist | 4 +- BGMApp/BGMApp/Preferences/BGMAboutPanel.m | 22 ++++++++++- BGMApp/BGMXPCHelper/Info.plist | 4 +- BGMDriver/BGMDriver/Info.plist | 4 +- README.md | 2 +- SharedSource/BGM_Types.h | 3 +- 7 files changed, 57 insertions(+), 29 deletions(-) diff --git a/BGMApp/BGMApp/Base.lproj/MainMenu.xib b/BGMApp/BGMApp/Base.lproj/MainMenu.xib index 2ac5c1a..8431f35 100644 --- a/BGMApp/BGMApp/Base.lproj/MainMenu.xib +++ b/BGMApp/BGMApp/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -85,7 +85,7 @@ - + @@ -111,7 +111,7 @@ - - + @@ -136,7 +136,7 @@ - + @@ -152,12 +152,12 @@ - + - + @@ -166,16 +166,16 @@ - + - + - + @@ -188,7 +188,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -252,20 +252,29 @@ - - + + - + + + + + + + + + + - + @@ -287,7 +296,7 @@ - + @@ -309,7 +318,7 @@ - + diff --git a/BGMApp/BGMApp/Info.plist b/BGMApp/BGMApp/Info.plist index 7e0e25e..a1f7450 100644 --- a/BGMApp/BGMApp/Info.plist +++ b/BGMApp/BGMApp/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.0 + 0.4.2 CFBundleSignature ???? CFBundleVersion @@ -33,7 +33,7 @@ NSAppleScriptEnabled NSHumanReadableCopyright - Copyright © 2016-2022 Background Music contributors + Copyright © 2016-2024 Background Music contributors NSMainNibFile MainMenu NSMicrophoneUsageDescription diff --git a/BGMApp/BGMApp/Preferences/BGMAboutPanel.m b/BGMApp/BGMApp/Preferences/BGMAboutPanel.m index 43cbf6a..b266d40 100644 --- a/BGMApp/BGMApp/Preferences/BGMAboutPanel.m +++ b/BGMApp/BGMApp/Preferences/BGMAboutPanel.m @@ -17,7 +17,7 @@ // BGMAboutPanel.m // BGMApp // -// Copyright © 2016 Kyle Neideck +// Copyright © 2016, 2024 Kyle Neideck // // Self Include @@ -35,6 +35,7 @@ NS_ASSUME_NONNULL_BEGIN static NSInteger const kVersionLabelTag = 1; static NSInteger const kCopyrightLabelTag = 2; static NSInteger const kProjectWebsiteLabelTag = 3; +static NSInteger const kContributorsLabelTag = 4; @implementation BGMAboutPanel { NSPanel* aboutPanel; @@ -42,6 +43,7 @@ static NSInteger const kProjectWebsiteLabelTag = 3; NSTextField* versionLabel; NSTextField* copyrightLabel; NSTextField* websiteLabel; + NSTextField* contributorsLabel; NSTextView* licenseView; } @@ -53,6 +55,7 @@ static NSInteger const kProjectWebsiteLabelTag = 3; versionLabel = [[aboutPanel contentView] viewWithTag:kVersionLabelTag]; copyrightLabel = [[aboutPanel contentView] viewWithTag:kCopyrightLabelTag]; websiteLabel = [[aboutPanel contentView] viewWithTag:kProjectWebsiteLabelTag]; + contributorsLabel = [[aboutPanel contentView] viewWithTag:kContributorsLabelTag]; licenseView = inLicenseView; @@ -83,7 +86,10 @@ static NSInteger const kProjectWebsiteLabelTag = 3; [[bundle infoDictionary] objectForKey:@"NSHumanReadableCopyright"]; if (copyrightNotice) { - copyrightLabel.stringValue = (NSString*)copyrightNotice; + // Remove the part that we replace with a link. + copyrightLabel.stringValue = + [((NSString*)copyrightNotice) stringByReplacingOccurrencesOfString:contributorsLabel.stringValue + withString:@""]; } // Project website link label @@ -97,6 +103,18 @@ static NSInteger const kProjectWebsiteLabelTag = 3; attributes:@{ NSLinkAttributeName: projectURL, NSFontAttributeName: linkFont }]; + // Contributors link label + // TODO: Proper credits (i.e. in the app instead of just a link) + contributorsLabel.selectable = YES; + contributorsLabel.allowsEditingTextAttributes = YES; + + NSString* contributorsURL = [NSString stringWithUTF8String:kBGMContributorsURL]; + NSFont* cLinkFont = contributorsLabel.font ? contributorsLabel.font : [NSFont labelFontOfSize:0.0]; + contributorsLabel.attributedStringValue = + [[NSAttributedString alloc] initWithString:contributorsLabel.stringValue + attributes:@{ NSLinkAttributeName: contributorsURL, + NSFontAttributeName: cLinkFont }]; + // Load the text of the license into the text view NSString* __nullable licensePath = [bundle pathForResource:@"LICENSE" ofType:nil]; diff --git a/BGMApp/BGMXPCHelper/Info.plist b/BGMApp/BGMXPCHelper/Info.plist index c79ab13..1bc3540 100644 --- a/BGMApp/BGMXPCHelper/Info.plist +++ b/BGMApp/BGMXPCHelper/Info.plist @@ -17,13 +17,13 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.4.0 + 0.4.2 CFBundleSignature ???? CFBundleVersion 1 NSHumanReadableCopyright - Copyright © 2016-2022 Background Music contributors + Copyright © 2016-2024 Background Music contributors XPCService ServiceType diff --git a/BGMDriver/BGMDriver/Info.plist b/BGMDriver/BGMDriver/Info.plist index 89a5735..39b38a6 100644 --- a/BGMDriver/BGMDriver/Info.plist +++ b/BGMDriver/BGMDriver/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.4.0 + 0.4.2 CFBundleSignature ???? CFBundleVersion @@ -37,7 +37,7 @@ NSHumanReadableCopyright - Copyright © 2016-2022 Background Music contributors + Copyright © 2016-2024 Background Music contributors NSPrincipalClass diff --git a/README.md b/README.md index 28f5125..74c5d48 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ Issues](https://github.com/kyleneideck/BackgroundMusic/issues). ## License -Copyright © 2016-2022 [Background Music contributors](https://github.com/kyleneideck/BackgroundMusic/graphs/contributors). +Copyright © 2016-2024 [Background Music contributors](https://github.com/kyleneideck/BackgroundMusic/graphs/contributors). Licensed under [GPLv2](https://www.gnu.org/licenses/gpl-2.0.html), or any later version. **Background Music** includes code from: diff --git a/SharedSource/BGM_Types.h b/SharedSource/BGM_Types.h index 786c330..cbff9a0 100644 --- a/SharedSource/BGM_Types.h +++ b/SharedSource/BGM_Types.h @@ -17,7 +17,7 @@ // BGM_Types.h // SharedSource // -// Copyright © 2016, 2017, 2019 Kyle Neideck +// Copyright © 2016, 2017, 2019, 2024 Kyle Neideck // #ifndef SharedSource__BGM_Types @@ -36,6 +36,7 @@ static const char* const kBGMProjectURL = "https://github.com/kyleneideck/BackgroundMusic"; static const char* const kBGMIssueTrackerURL = "https://github.com/kyleneideck/BackgroundMusic/issues"; +static const char* const kBGMContributorsURL = "https://github.com/kyleneideck/BackgroundMusic/graphs/contributors"; #pragma mark IDs