prepare for async work
This commit is contained in:
committed by
Felix Förtsch
parent
e72b0f3aba
commit
3b8c44d233
@@ -9,12 +9,13 @@
|
||||
import Cocoa
|
||||
|
||||
class StatusBarController: NSObject, NSMenuItemValidation {
|
||||
|
||||
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
let statusBar = NSMenu()
|
||||
let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
|
||||
let statusBarItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
|
||||
let matchesAPI = MatchesAPI()
|
||||
var matches = [Match]()
|
||||
|
||||
@@ -22,8 +23,8 @@ class StatusBarController: NSObject, NSMenuItemValidation {
|
||||
// Set the icon of the statusbar item and put it into the statusbar
|
||||
let icon = NSImage(named: "statusBarIcon")
|
||||
icon?.isTemplate = true
|
||||
statusItem.image = icon
|
||||
statusItem.menu = statusBar
|
||||
statusBarItem.image = icon
|
||||
statusBarItem.menu = statusBar
|
||||
generateMenu()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user