diff options
author | Roopesh Chander <roop@roopc.net> | 2019-05-09 18:52:58 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-05-20 16:42:27 +0530 |
commit | f9880907a24b526dacd3d5ee0d69d0963ec5e5dd (patch) | |
tree | ce3af16f6efbdb4adc337aa057bc0a83295f94c2 | |
parent | macOS: swiftlint: Suppress incorrect warnings (diff) | |
download | wireguard-apple-f9880907a24b526dacd3d5ee0d69d0963ec5e5dd.tar.xz wireguard-apple-f9880907a24b526dacd3d5ee0d69d0963ec5e5dd.zip |
macOS: Both list and detail main menu items should be always enabled
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift index aa6a76d..179387f 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift @@ -115,3 +115,21 @@ extension ManageTunnelsRootViewController: TunnelsListTableViewControllerDelegat self.tunnelDetailVC = nil } } + +extension ManageTunnelsRootViewController { + override func supplementalTarget(forAction action: Selector, sender: Any?) -> Any? { + switch action { + case #selector(TunnelsListTableViewController.handleViewLogAction), + #selector(TunnelsListTableViewController.handleAddEmptyTunnelAction), + #selector(TunnelsListTableViewController.handleImportTunnelAction), + #selector(TunnelsListTableViewController.handleExportTunnelsAction), + #selector(TunnelsListTableViewController.handleRemoveTunnelAction): + return tunnelsListVC + case #selector(TunnelDetailTableViewController.handleToggleActiveStatusAction), + #selector(TunnelDetailTableViewController.handleEditTunnelAction): + return tunnelDetailVC + default: + return super.supplementalTarget(forAction: action, sender: sender) + } + } +} |