Fix @objc

This commit is contained in:
Qiu Yuzhou
2017-10-20 19:58:14 +08:00
parent d56b108eb8
commit 6dbf10b7f3
4 changed files with 21 additions and 22 deletions

View File

@ -323,12 +323,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
if preferencesWinCtrl != nil {
preferencesWinCtrl.close()
}
let ctrl = PreferencesWindowController(windowNibName: NSNib.Name(rawValue: "PreferencesWindowController"))
preferencesWinCtrl = ctrl
preferencesWinCtrl = PreferencesWindowController(windowNibName: NSNib.Name(rawValue: "PreferencesWindowController"))
ctrl.showWindow(self)
preferencesWinCtrl.showWindow(self)
NSApp.activate(ignoringOtherApps: true)
ctrl.window?.makeKeyAndOrderFront(self)
preferencesWinCtrl.window?.makeKeyAndOrderFront(self)
}
@IBAction func showAllInOnePreferences(_ sender: NSMenuItem) {