Skip to content

Commit

Permalink
Add "Quit AlfredExtraPane" to the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-pennyworth committed Jul 9, 2024
1 parent 6252175 commit 528fbfe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions AlfredExtraPane/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,18 @@ class AppDelegate: NSObject, NSApplicationDelegate {
menu.addItem(NSMenuItem(
title: "Check for Updates",
action: #selector(checkForUpdates),
keyEquivalent: "u"
keyEquivalent: ""
))
menu.addItem(NSMenuItem.separator())
menu.addItem(NSMenuItem(
title: "Restart " + appName,
action: #selector(restart),
keyEquivalent: "r"
keyEquivalent: ""
))
menu.addItem(NSMenuItem(
title: "Quit " + appName,
action: #selector(quit),
keyEquivalent: "q"
))

statusItem?.menu = menu
Expand All @@ -102,6 +108,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
task.launch()
NSApplication.shared.terminate(nil)
}

@objc func quit() {
NSApplication.shared.terminate(nil)
}
}

autoreleasepool {
Expand Down

0 comments on commit 528fbfe

Please sign in to comment.