macOS: Fix status-related menu items

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-01-22 04:11:24 +05:30
parent 273ee04450
commit 8951ea338f
2 changed files with 2 additions and 3 deletions

View File

@ -224,7 +224,6 @@
// Mac status bar menu / pulldown menu
"macMenuNetworks (%@)" = "Networks: %@";
"macMenuNetworksInactive" = "Networks: -";
"macMenuNetworksNone" = "Networks: None";
"macMenuManageTunnels" = "Manage tunnels";

View File

@ -46,10 +46,10 @@ class StatusMenu: NSMenu {
func addStatusMenuItems() {
let statusTitle = tr(format: "macStatus (%@)", tr("tunnelStatusInactive"))
let statusMenuItem = NSMenuItem(title: statusTitle, action: #selector(manageTunnelsClicked), keyEquivalent: "")
let statusMenuItem = NSMenuItem(title: statusTitle, action: nil, keyEquivalent: "")
statusMenuItem.isEnabled = false
addItem(statusMenuItem)
let networksMenuItem = NSMenuItem(title: tr("macMenuNetworksInactive"), action: #selector(manageTunnelsClicked), keyEquivalent: "")
let networksMenuItem = NSMenuItem(title: "", action: nil, keyEquivalent: "")
networksMenuItem.isEnabled = false
networksMenuItem.isHidden = true
addItem(networksMenuItem)