macOS: Quit in main menu shall just close the window

This commit is contained in:
Roopesh Chander 2019-05-10 00:30:02 +05:30
parent 33b9ffa74b
commit cf35eaf145
2 changed files with 3 additions and 3 deletions

View File

@ -308,6 +308,7 @@
"macMenuHideApp" = "Hide WireGuard";
"macMenuHideOtherApps" = "Hide Others";
"macMenuShowAllApps" = "Show All";
"macMenuQuitManagingTunnels" = "Quit Tunnel Manager";
"macMenuFile" = "File";
"macMenuCloseWindow" = "Close Window";

View File

@ -51,9 +51,8 @@ class MainMenu: NSMenu {
menu.addItem(NSMenuItem.separator())
let quitMenuItem = menu.addItem(withTitle: tr("macMenuQuit"),
action: #selector(AppDelegate.quit), keyEquivalent: "q")
quitMenuItem.target = NSApp.delegate
menu.addItem(withTitle: tr("macMenuQuitManagingTunnels"),
action: #selector(NSWindow.performClose(_:)), keyEquivalent: "q")
return menu
}