Add show logs menu item.
This commit is contained in:
@ -284,6 +284,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func showLogs(sender: NSMenuItem) {
|
||||
let ws = NSWorkspace.sharedWorkspace()
|
||||
if let appUrl = ws.URLForApplicationWithBundleIdentifier("com.apple.Console") {
|
||||
try! ws.launchApplicationAtURL(appUrl
|
||||
,options: .Default
|
||||
,configuration: [NSWorkspaceLaunchConfigurationArguments: "~/Library/Logs/ss-local.log"])
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func feedback(sender: NSMenuItem) {
|
||||
NSWorkspace.sharedWorkspace().openURL(NSURL(string: "https://github.com/qiuyuzhou/ShadowsocksX-NG/issues")!)
|
||||
}
|
||||
|
@ -117,6 +117,12 @@
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="DTJ-NF-Wxr"/>
|
||||
<menuItem title="Show Logs..." id="Jfy-sf-Fhl">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="showLogs:" target="Voe-Tx-rLC" id="5FZ-Xo-DGb"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Feedback" id="W7u-7g-Gv4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
|
@ -14,6 +14,9 @@
|
||||
/* Class = "NSMenu"; title = "ShadowsocksX-NE"; ObjectID = "Hob-KD-bx9"; */
|
||||
"Hob-KD-bx9.title" = "ShadowsocksX-NE";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Show Logs..."; ObjectID = "Jfy-sf-Fhl"; */
|
||||
"Jfy-sf-Fhl.title" = "显示日志...";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "About"; ObjectID = "LgB-6g-Gba"; */
|
||||
"LgB-6g-Gba.title" = "关于";
|
||||
|
||||
|
Reference in New Issue
Block a user