diff options
author | angstsmurf | 2018-08-21 15:37:08 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-28 15:52:23 +0200 |
commit | ebedc154377b9229a8cb0389483db19afbb52891 (patch) | |
tree | 0f377bca4879dd415b67a0af6d132b5dd3c4d24e | |
parent | d4eca67d2a0b130f05284503349df39c3966af13 (diff) | |
download | scummvm-rg350-ebedc154377b9229a8cb0389483db19afbb52891.tar.gz scummvm-rg350-ebedc154377b9229a8cb0389483db19afbb52891.tar.bz2 scummvm-rg350-ebedc154377b9229a8cb0389483db19afbb52891.zip |
MACOSX: Give every license file a menu item
We make a renamed copy of the three license files with non-standard
suffixes, to make them open in TextEdit by default.
-rw-r--r-- | backends/platform/sdl/macosx/appmenu_osx.mm | 27 | ||||
-rw-r--r-- | ports.mk | 7 |
2 files changed, 26 insertions, 8 deletions
diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm index 9bcd84e3f0..a606bdc1ab 100644 --- a/backends/platform/sdl/macosx/appmenu_osx.mm +++ b/backends/platform/sdl/macosx/appmenu_osx.mm @@ -69,7 +69,10 @@ static void openFromBundle(NSString *file) { @interface ScummVMMenuHandler : NSObject { } - (void) openReadme; -- (void) openLicense; +- (void) openLicenseGPL; +- (void) openLicenseLGPL; +- (void) openLicenseFreefont; +- (void) openLicenseBSD; - (void) openNews; - (void) openUserManual; - (void) openCredits; @@ -80,8 +83,20 @@ static void openFromBundle(NSString *file) { openFromBundle(@"README"); } -- (void)openLicense { - openFromBundle(@"COPYING-COMBINED"); +- (void)openLicenseGPL { + openFromBundle(@"COPYING"); +} + +- (void)openLicenseLGPL { + openFromBundle(@"COPYING-LGPL"); +} + +- (void)openLicenseFreefont { + openFromBundle(@"COPYING-FREEFONT"); +} + +- (void)openLicenseBSD { + openFromBundle(@"COPYING-BSD"); } - (void)openNews { @@ -183,7 +198,11 @@ void replaceApplicationMenuItems() { addMenuItem(_("What's New in ScummVM"), stringEncoding, delegate, @selector(openNews), @"", helpMenu); [helpMenu addItem:[NSMenuItem separatorItem]]; addMenuItem(_("Credits"), stringEncoding, delegate, @selector(openCredits), @"", helpMenu); - addMenuItem(_("Licensing Information"), stringEncoding, delegate, @selector(openLicense), @"", helpMenu); + addMenuItem(_("GPL License"), stringEncoding, delegate, @selector(openLicenseGPL), @"", helpMenu); + addMenuItem(_("LGPL License"), stringEncoding, delegate, @selector(openLicenseLGPL), @"", helpMenu); + addMenuItem(_("Freefont License"), stringEncoding, delegate, @selector(openLicenseFreefont), @"", helpMenu); + addMenuItem(_("BSD License"), stringEncoding, delegate, @selector(openLicenseBSD), @"", helpMenu); + [appleMenu release]; [windowMenu release]; @@ -121,10 +121,9 @@ ifdef DIST_FILES_ENGINEDATA endif $(srcdir)/devtools/credits.pl --rtf > $(bundle_name)/Contents/Resources/AUTHORS.rtf rm $(bundle_name)/Contents/Resources/AUTHORS - cp $(bundle_name)/Contents/Resources/COPYING $(bundle_name)/Contents/Resources/COPYING-COMBINED - echo "\n---\n" | cat - $(bundle_name)/Contents/Resources/COPYING.LGPL >> $(bundle_name)/Contents/Resources/COPYING-COMBINED - echo "\n---\n" | cat - $(bundle_name)/Contents/Resources/COPYING.FREEFONT >> $(bundle_name)/Contents/Resources/COPYING-COMBINED - echo "\n---\n" | cat - $(bundle_name)/Contents/Resources/COPYING.BSD >> $(bundle_name)/Contents/Resources/COPYING-COMBINED + cp $(bundle_name)/Contents/Resources/COPYING.LGPL $(bundle_name)/Contents/Resources/COPYING-LGPL + cp $(bundle_name)/Contents/Resources/COPYING.FREEFONT $(bundle_name)/Contents/Resources/COPYING-FREEFONT + cp $(bundle_name)/Contents/Resources/COPYING.BSD $(bundle_name)/Contents/Resources/COPYING-BSD chmod 644 $(bundle_name)/Contents/Resources/* cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm chmod 755 $(bundle_name)/Contents/MacOS/scummvm |