macos: implement the quit command
parent
210b01ad60
commit
ed9a6cb648
|
|
@ -196,6 +196,16 @@ extension NSApplication {
|
|||
return ScriptWindow(primaryController: controller)
|
||||
}
|
||||
|
||||
/// Handler for the `quit` AppleScript command.
|
||||
///
|
||||
/// Required selector name from the command in `sdef`:
|
||||
/// `handleQuitScriptCommand:`.
|
||||
@objc(handleQuitScriptCommand:)
|
||||
func handleQuitScriptCommand(_ command: NSScriptCommand) {
|
||||
guard validateScript(command: command) else { return }
|
||||
terminate(nil)
|
||||
}
|
||||
|
||||
/// Handler for the `new tab` AppleScript command.
|
||||
///
|
||||
/// Required selector name from the command in `sdef`:
|
||||
|
|
|
|||
Loading…
Reference in New Issue