macOS: Some menu item titles are automatically inferred

This commit is contained in:
Roopesh Chander 2019-05-10 01:00:10 +05:30
parent e7512edfad
commit 3a1208836c
2 changed files with 3 additions and 6 deletions

View File

@ -314,8 +314,6 @@
"macMenuCloseWindow" = "Close Window";
"macMenuEdit" = "Edit";
"macMenuUndo" = "Undo";
"macMenuRedo" = "Redo";
"macMenuCut" = "Cut";
"macMenuCopy" = "Copy";
"macMenuPaste" = "Paste";
@ -329,7 +327,6 @@
"macMenuWindow" = "Window";
"macMenuMinimize" = "Minimize";
"macMenuZoom" = "Zoom";
"macMenuFullScreen" = "Full Screen";
// Mac manage tunnels window

View File

@ -80,8 +80,8 @@ class MainMenu: NSMenu {
private func createEditMenu() -> NSMenu {
let menu = NSMenu(title: tr("macMenuEdit"))
menu.addItem(withTitle: tr("macMenuUndo"), action: #selector(UndoActionRespondable.undo(_:)), keyEquivalent:"z")
menu.addItem(withTitle: tr("macMenuRedo"), action: #selector(UndoActionRespondable.redo(_:)), keyEquivalent:"Z")
menu.addItem(withTitle: "", action: #selector(UndoActionRespondable.undo(_:)), keyEquivalent:"z")
menu.addItem(withTitle: "", action: #selector(UndoActionRespondable.redo(_:)), keyEquivalent:"Z")
menu.addItem(NSMenuItem.separator())
@ -117,7 +117,7 @@ class MainMenu: NSMenu {
menu.addItem(NSMenuItem.separator())
let fullScreenMenuItem = menu.addItem(withTitle: tr("macMenuFullScreen"), action: #selector(NSWindow.toggleFullScreen(_:)), keyEquivalent:"f")
let fullScreenMenuItem = menu.addItem(withTitle: "", action: #selector(NSWindow.toggleFullScreen(_:)), keyEquivalent:"f")
fullScreenMenuItem.keyEquivalentModifierMask = [.command, .control]
return menu