mirror of https://github.com/mpv-player/mpv
mac/menu: replace app.command usage with event.command
This commit is contained in:
parent
37990597c7
commit
95d08df7a7
|
@ -338,7 +338,7 @@ class MenuBar: NSObject {
|
||||||
|
|
||||||
if panel.runModal() == .OK {
|
if panel.runModal() == .OK {
|
||||||
"loadlist \"\(panel.urls[0].path)\"".withCString {
|
"loadlist \"\(panel.urls[0].path)\"".withCString {
|
||||||
(NSApp as? Application)?.queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
|
EventsResponder.sharedInstance().queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,7 +366,7 @@ class MenuBar: NSObject {
|
||||||
@objc func command(_ menuItem: NSMenuItem) {
|
@objc func command(_ menuItem: NSMenuItem) {
|
||||||
guard let menuConfig = getConfigFromMenu(menuItem: menuItem) else { return }
|
guard let menuConfig = getConfigFromMenu(menuItem: menuItem) else { return }
|
||||||
menuConfig.command.withCString {
|
menuConfig.command.withCString {
|
||||||
(NSApp as? Application)?.queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
|
EventsResponder.sharedInstance().queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue