aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-01-18 01:27:17 +0530
committerRoopesh Chander <roop@roopc.net>2019-01-18 01:34:24 +0530
commitdc8f27c5c36a212336318f62c1c45e31bb9d95d6 (patch)
treef5f240e3141e1853a81a7334ddacdb4e5b6cd6e3 /WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
parentmacOS: Fix autolayout errors on Add Empty Tunnel (diff)
downloadwireguard-apple-dc8f27c5c36a212336318f62c1c45e31bb9d95d6.tar.xz
wireguard-apple-dc8f27c5c36a212336318f62c1c45e31bb9d95d6.zip
macOS: Rafactor by introducing a TunnelsTracker
The TunnelTracker is now the central place to track what the current tunnel is, and for keeping track of the tunnel list. Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift b/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
index 03b1be7..95fc46a 100644
--- a/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
+++ b/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
@@ -4,8 +4,8 @@
import Cocoa
class ImportPanelPresenter {
- static func presentImportPanel(tunnelsManager: TunnelsManager, sourceVC: NSViewController) {
- guard let window = sourceVC.view.window else { return }
+ static func presentImportPanel(tunnelsManager: TunnelsManager, sourceVC: NSViewController?) {
+ guard let window = sourceVC?.view.window else { return }
let openPanel = NSOpenPanel()
openPanel.prompt = tr("macSheetButtonImport")
openPanel.allowedFileTypes = ["conf", "zip"]