diff options
author | Roopesh Chander <roop@roopc.net> | 2019-01-05 14:26:20 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-01-14 14:52:33 +0530 |
commit | df8b40085080aa83d660adb5a62b4108ffbff964 (patch) | |
tree | 8f548305cc8a16eb7fb38150b99a577615b96265 /WireGuard/WireGuard/UI/macOS/AppDelegate.swift | |
parent | macOS: Present errors as a sheet when applicable (diff) | |
download | wireguard-apple-df8b40085080aa83d660adb5a62b4108ffbff964.tar.xz wireguard-apple-df8b40085080aa83d660adb5a62b4108ffbff964.zip |
macOS: Present tunnel activation errors from the window when possible
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/AppDelegate.swift | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/AppDelegate.swift b/WireGuard/WireGuard/UI/macOS/AppDelegate.swift index 2403d0f..994495e 100644 --- a/WireGuard/WireGuard/UI/macOS/AppDelegate.swift +++ b/WireGuard/WireGuard/UI/macOS/AppDelegate.swift @@ -20,29 +20,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { self.statusItem = createStatusBarItem(with: statusMenu) tunnelsManager.tunnelsListDelegate = statusMenu - tunnelsManager.activationDelegate = self + tunnelsManager.activationDelegate = statusMenu } } } -extension AppDelegate: TunnelsManagerActivationDelegate { - func tunnelActivationAttemptFailed(tunnel: TunnelContainer, error: TunnelsManagerActivationAttemptError) { - ErrorPresenter.showErrorAlert(error: error, from: nil) - } - - func tunnelActivationAttemptSucceeded(tunnel: TunnelContainer) { - // Nothing to do - } - - func tunnelActivationFailed(tunnel: TunnelContainer, error: TunnelsManagerActivationError) { - ErrorPresenter.showErrorAlert(error: error, from: nil) - } - - func tunnelActivationSucceeded(tunnel: TunnelContainer) { - // Nothing to do - } -} - func createStatusBarItem(with statusMenu: StatusMenu) -> NSStatusItem { let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) if let statusBarImage = NSImage(named: "WireGuardMacStatusBarIcon") { |