Skip to content

Commit 88cb2b2

Browse files
committed
add Help
1 parent 8afe9ad commit 88cb2b2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ShadowWeb/zh-Hans.lproj/Localizable.strings

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@
4848
"Open Server Preferences..." = "打开服务器设定...";
4949
"Please fill in the blanks." = "请填写以下内容。";
5050
"Show Logs..." = "显示日志..";
51-
"Quit" = "退出";
51+
"Quit" = "退出";
52+
"https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-Help" = "https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-%E5%B8%AE%E5%8A%A9";

ShadowsocksX/SWBAppDelegate.m

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
5656
[menu addItem:[NSMenuItem separatorItem]];
5757
[menu addItemWithTitle:_L(Open Server Preferences...) action:@selector(showConfigWindow) keyEquivalent:@""];
5858
[menu addItemWithTitle:_L(Show Logs...) action:@selector(showLogs) keyEquivalent:@""];
59+
[menu addItemWithTitle:_L(Help) action:@selector(showHelp) keyEquivalent:@""];
5960
[menu addItem:[NSMenuItem separatorItem]];
6061
[menu addItemWithTitle:_L(Quit) action:@selector(exit) keyEquivalent:@""];
6162
self.item.menu = menu;
@@ -90,6 +91,10 @@ - (void)showLogs {
9091
[[NSWorkspace sharedWorkspace] launchApplication:@"/Applications/Utilities/Console.app"];
9192
}
9293

94+
- (void)showHelp {
95+
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:NSLocalizedString(@"https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-Help", nil)]];
96+
}
97+
9398
- (void)showConfigWindow {
9499
[configWindowController showWindow:self];
95100
[NSApp activateIgnoringOtherApps:YES];

0 commit comments

Comments
 (0)