From 7d5eb476e46faf5abb396ebb7037eaca420b25d2 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 17 Jan 2019 02:43:24 +0530 Subject: macOS: Manage tunnels: Make keyboard shortcuts discoverable Signed-off-by: Roopesh Chander --- .../UI/macOS/ViewController/TunnelDetailTableViewController.swift | 2 ++ .../UI/macOS/ViewController/TunnelsListTableViewController.swift | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'WireGuard') diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift index adb32aa..e20df32 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -55,6 +55,7 @@ class TunnelDetailTableViewController: NSViewController { checkbox.title = "" checkbox.setButtonType(.switch) checkbox.state = .off + checkbox.toolTip = "Toggle status (⌘T)" return checkbox }() @@ -63,6 +64,7 @@ class TunnelDetailTableViewController: NSViewController { button.title = tr("Edit") button.setButtonType(.momentaryPushIn) button.bezelStyle = .rounded + button.toolTip = "Edit tunnel (⌘E)" return button }() diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift index 9585946..05d30c0 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift @@ -37,8 +37,8 @@ class TunnelsListTableViewController: NSViewController { let addMenu: NSMenu = { let addMenu = NSMenu(title: "TunnelsListAdd") - addMenu.addItem(withTitle: tr("macMenuAddEmptyTunnel"), action: #selector(handleAddEmptyTunnelAction), keyEquivalent: "") - addMenu.addItem(withTitle: tr("macMenuImportTunnels"), action: #selector(handleImportTunnelAction), keyEquivalent: "") + addMenu.addItem(withTitle: tr("macMenuAddEmptyTunnel"), action: #selector(handleAddEmptyTunnelAction), keyEquivalent: "n") + addMenu.addItem(withTitle: tr("macMenuImportTunnels"), action: #selector(handleImportTunnelAction), keyEquivalent: "i") return addMenu }() -- cgit v1.2.3-59-g8ed1b