Add a "At the Beginning" item to the action menu

This commit is contained in:
Damiano Galassi committed 2025-08-08 17:09:35 +02:00
1 parent 5890c9abe2
commit 13f1f301e3
1 file changed
+7
+7
View File
@@ -40,6 +40,13 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
action: #selector(DocumentWindowController.deleteTrack(_:)))
} else if itemIdentifier == .actions {
let submenu = NSMenu()
let menuItem = NSMenuItem()
menuItem.title = NSLocalizedString("At the Beginning", comment: "Toolbar")
menuItem.action = #selector(DocumentWindowController.addChaptersEvery(_:))
menuItem.tag = -1
submenu.addItem(menuItem)
for minutes in [1, 2, 5, 10, 15, 20, 30] {
let menuItem = NSMenuItem()
let title = minutes == 1 ? NSLocalizedString("1 minute", comment: "Toolbar") :