Add about menu item.

This commit is contained in:
Charlie Qiu
2016-06-12 08:25:52 +08:00
parent 4991c2cdc4
commit a4bee86080
3 changed files with 12 additions and 1 deletions

View File

@ -287,6 +287,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
NSWorkspace.sharedWorkspace().openURL(NSURL(string: "https://github.com/qiuyuzhou/ShadowsocksX-NG/issues")!)
}
@IBAction func showAbout(sender: NSMenuItem) {
NSApp.orderFrontStandardAboutPanel(sender);
NSApp.activateIgnoringOtherApps(true)
}
func updateLaunchAtLoginMenu() {
if launchAtLoginController.launchAtLogin {
lanchAtLoginMenuItem.state = 1

View File

@ -123,6 +123,12 @@
<action selector="feedback:" target="Voe-Tx-rLC" id="ogn-lf-bqE"/>
</connections>
</menuItem>
<menuItem title="About" id="LgB-6g-Gba">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="showAbout:" target="Voe-Tx-rLC" id="ToP-D0-suY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="lSf-ni-kjo"/>
<menuItem title="Quit" keyEquivalent="q" id="vJS-JW-byz">
<connections>

View File

@ -44,7 +44,7 @@
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016年 qiuyuzhou. All rights reserved.</string>
<string>Copyright © 2016年 qiuyuzhou. All rights reserved. License GPLv3.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>