macOS: Show Manage Tunnels window on startup

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-05-20 01:24:43 +05:30
parent 9bf304a9ac
commit 300268daa0
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
Logger.configureGlobal(tagged: "APP", withFilePath: FileManager.logFileURL?.path)
registerLoginItem(shouldLaunchAtLogin: true)
NSApp.setActivationPolicy(.regular)
NSApp.mainMenu = MainMenu()
TunnelsManager.create { [weak self] result in
@ -39,6 +41,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
self.tunnelsManager = tunnelsManager
self.tunnelsTracker = tunnelsTracker
self.statusItemController = statusItemController
self.showManageTunnelsWindow(completion: nil)
}
}
}