diff --git a/_locales/en/messages.json b/_locales/en/messages.json index cbc017ad7..4eb06c3f8 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -55,6 +55,10 @@ "message": "Preferences…", "description": "The label that is used for the Preferences menu in the program main menu. This should be consistent with the standard naming for ‘Preferences’ on the operating system." }, + "appMenuServices": { + "message": "Services", + "description": "Application menu item for macOS 'Services'" + }, "appMenuHide": { "message": "Hide", "description": "Application menu command to hide the window" diff --git a/app/menu.js b/app/menu.js index 10e2a7137..9ca299ae6 100644 --- a/app/menu.js +++ b/app/menu.js @@ -229,6 +229,17 @@ function updateForMac(template, messages, options) { fileMenu.submenu.pop(); fileMenu.submenu.pop(); fileMenu.submenu.pop(); + // And insert "close". + fileMenu.submenu.push( + { + type: 'separator', + }, + { + label: messages.windowMenuClose.message, + accelerator: 'CmdOrCtrl+W', + role: 'close', + } + ); // Add the OSX-specific Signal Desktop menu at the far left template.unshift({ @@ -249,6 +260,13 @@ function updateForMac(template, messages, options) { { type: 'separator', }, + { + label: messages.appMenuServices.message, + role: 'services', + }, + { + type: 'separator', + }, { label: messages.appMenuHide.message, role: 'hide', @@ -294,11 +312,6 @@ function updateForMac(template, messages, options) { // Replace Window menu // eslint-disable-next-line no-param-reassign template[4].submenu = [ - { - label: messages.windowMenuClose.message, - accelerator: 'CmdOrCtrl+W', - role: 'close', - }, { label: messages.windowMenuMinimize.message, accelerator: 'CmdOrCtrl+M', diff --git a/test/app/fixtures/menu-mac-os-setup.json b/test/app/fixtures/menu-mac-os-setup.json index 795470345..e6f87bfc1 100644 --- a/test/app/fixtures/menu-mac-os-setup.json +++ b/test/app/fixtures/menu-mac-os-setup.json @@ -17,6 +17,13 @@ { "type": "separator" }, + { + "label": "Services", + "role": "services" + }, + { + "type": "separator" + }, { "label": "Hide", "role": "hide" @@ -51,6 +58,14 @@ { "label": "Create/upload sticker pack", "click": null + }, + { + "type": "separator" + }, + { + "accelerator": "CmdOrCtrl+W", + "label": "Close Window", + "role": "close" } ] }, @@ -153,11 +168,6 @@ "label": "&Window", "role": "window", "submenu": [ - { - "label": "Close Window", - "accelerator": "CmdOrCtrl+W", - "role": "close" - }, { "label": "Minimize", "accelerator": "CmdOrCtrl+M", diff --git a/test/app/fixtures/menu-mac-os.json b/test/app/fixtures/menu-mac-os.json index 147fd1ece..1035f21df 100644 --- a/test/app/fixtures/menu-mac-os.json +++ b/test/app/fixtures/menu-mac-os.json @@ -17,6 +17,13 @@ { "type": "separator" }, + { + "label": "Services", + "role": "services" + }, + { + "type": "separator" + }, { "label": "Hide", "role": "hide" @@ -44,6 +51,14 @@ { "label": "Create/upload sticker pack", "click": null + }, + { + "type": "separator" + }, + { + "accelerator": "CmdOrCtrl+W", + "label": "Close Window", + "role": "close" } ] }, @@ -146,11 +161,6 @@ "label": "&Window", "role": "window", "submenu": [ - { - "label": "Close Window", - "accelerator": "CmdOrCtrl+W", - "role": "close" - }, { "label": "Minimize", "accelerator": "CmdOrCtrl+M",