mirror of https://github.com/mpv-player/mpv
mac/menu: remove redundant quit func and use identical command func
This commit is contained in:
parent
3c51497954
commit
67c48ed922
|
@ -110,8 +110,8 @@ class MenuBar: NSObject {
|
|||
Config(name: "Hide Others", key: "h", modifiers: [.command, .option], action: #selector(NSApp.hideOtherApplications(_:))),
|
||||
Config(name: "Show All", action: #selector(NSApp.unhideAllApplications(_:))),
|
||||
Config(type: .separator),
|
||||
Config(name: "Quit and Remember Position", action: #selector(quit(_:)), target: self, command: "quit-watch-later"),
|
||||
Config(name: "Quit mpv", key: "q", action: #selector(quit(_:)), target: self, command: "quit"),
|
||||
Config(name: "Quit and Remember Position", action: #selector(command(_:)), target: self, command: "quit-watch-later"),
|
||||
Config(name: "Quit mpv", key: "q", action: #selector(command(_:)), target: self, command: "quit"),
|
||||
]
|
||||
|
||||
let fileMenuConfigs = [
|
||||
|
@ -320,11 +320,6 @@ class MenuBar: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
@objc func quit(_ menuItem: MenuItem) {
|
||||
guard let menuConfig = menuItem.config else { return }
|
||||
appHub.input.command(menuConfig.command)
|
||||
}
|
||||
|
||||
@objc func openFiles() {
|
||||
let panel = NSOpenPanel()
|
||||
panel.allowsMultipleSelection = true
|
||||
|
|
Loading…
Reference in New Issue