From 67c48ed92230c174272c36c42d84049e5e6366fd Mon Sep 17 00:00:00 2001 From: der richter Date: Mon, 1 Apr 2024 01:10:13 +0200 Subject: mac/menu: remove redundant quit func and use identical command func --- osdep/mac/menu_bar.swift | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'osdep') diff --git a/osdep/mac/menu_bar.swift b/osdep/mac/menu_bar.swift index 8768348db7..b58367a7a6 100644 --- a/osdep/mac/menu_bar.swift +++ b/osdep/mac/menu_bar.swift @@ -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 -- cgit v1.2.3