feat: add menu option to pop up the selector window
This commit is contained in:
1 parent
de7f428ba1
commit
78428dc309
2 files changed
+10
No files matched your search
@@ -64,6 +64,11 @@ class Application: NSApplication, NSApplicationDelegate, NSWindowDelegate {
|
||||
Screen.showPanel(preferencesPanel!, Screen.preferred(), .appleCentered)
|
||||
}
|
||||
|
||||
@objc
|
||||
func showUi() {
|
||||
showUiOrCycleSelection(0)
|
||||
}
|
||||
|
||||
func cycleSelection(_ step: Int) {
|
||||
TrackedWindows.focusedWindowIndex = TrackedWindows.moveFocusedWindowIndex(step)
|
||||
self.thumbnailsPanel!.highlightCellAt(step)
|
||||
|
||||
@@ -9,6 +9,11 @@ class StatusItem {
|
||||
withTitle: "Preferences…",
|
||||
action: #selector(application.showPreferencesPanel),
|
||||
keyEquivalent: ",")
|
||||
item.menu!.addItem(
|
||||
withTitle: "Show…",
|
||||
action: #selector(application.showUi),
|
||||
keyEquivalent: "s"
|
||||
)
|
||||
item.menu!.addItem(
|
||||
withTitle: "Quit \(Application.name) #VERSION#",
|
||||
action: #selector(NSApplication.terminate(_:)),
|
||||
|
||||
Reference in new issue
Block a user