Improve menu bar on macOS
This commit is contained in:
@@ -55,6 +55,10 @@
|
|||||||
"message": "Preferences…",
|
"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."
|
"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": {
|
"appMenuHide": {
|
||||||
"message": "Hide",
|
"message": "Hide",
|
||||||
"description": "Application menu command to hide the window"
|
"description": "Application menu command to hide the window"
|
||||||
|
23
app/menu.js
23
app/menu.js
@@ -229,6 +229,17 @@ function updateForMac(template, messages, options) {
|
|||||||
fileMenu.submenu.pop();
|
fileMenu.submenu.pop();
|
||||||
fileMenu.submenu.pop();
|
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
|
// Add the OSX-specific Signal Desktop menu at the far left
|
||||||
template.unshift({
|
template.unshift({
|
||||||
@@ -249,6 +260,13 @@ function updateForMac(template, messages, options) {
|
|||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: messages.appMenuServices.message,
|
||||||
|
role: 'services',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: messages.appMenuHide.message,
|
label: messages.appMenuHide.message,
|
||||||
role: 'hide',
|
role: 'hide',
|
||||||
@@ -294,11 +312,6 @@ function updateForMac(template, messages, options) {
|
|||||||
// Replace Window menu
|
// Replace Window menu
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
template[4].submenu = [
|
template[4].submenu = [
|
||||||
{
|
|
||||||
label: messages.windowMenuClose.message,
|
|
||||||
accelerator: 'CmdOrCtrl+W',
|
|
||||||
role: 'close',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: messages.windowMenuMinimize.message,
|
label: messages.windowMenuMinimize.message,
|
||||||
accelerator: 'CmdOrCtrl+M',
|
accelerator: 'CmdOrCtrl+M',
|
||||||
|
@@ -17,6 +17,13 @@
|
|||||||
{
|
{
|
||||||
"type": "separator"
|
"type": "separator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Services",
|
||||||
|
"role": "services"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "separator"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Hide",
|
"label": "Hide",
|
||||||
"role": "hide"
|
"role": "hide"
|
||||||
@@ -51,6 +58,14 @@
|
|||||||
{
|
{
|
||||||
"label": "Create/upload sticker pack",
|
"label": "Create/upload sticker pack",
|
||||||
"click": null
|
"click": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "separator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"accelerator": "CmdOrCtrl+W",
|
||||||
|
"label": "Close Window",
|
||||||
|
"role": "close"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -153,11 +168,6 @@
|
|||||||
"label": "&Window",
|
"label": "&Window",
|
||||||
"role": "window",
|
"role": "window",
|
||||||
"submenu": [
|
"submenu": [
|
||||||
{
|
|
||||||
"label": "Close Window",
|
|
||||||
"accelerator": "CmdOrCtrl+W",
|
|
||||||
"role": "close"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "Minimize",
|
"label": "Minimize",
|
||||||
"accelerator": "CmdOrCtrl+M",
|
"accelerator": "CmdOrCtrl+M",
|
||||||
|
@@ -17,6 +17,13 @@
|
|||||||
{
|
{
|
||||||
"type": "separator"
|
"type": "separator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Services",
|
||||||
|
"role": "services"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "separator"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Hide",
|
"label": "Hide",
|
||||||
"role": "hide"
|
"role": "hide"
|
||||||
@@ -44,6 +51,14 @@
|
|||||||
{
|
{
|
||||||
"label": "Create/upload sticker pack",
|
"label": "Create/upload sticker pack",
|
||||||
"click": null
|
"click": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "separator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"accelerator": "CmdOrCtrl+W",
|
||||||
|
"label": "Close Window",
|
||||||
|
"role": "close"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -146,11 +161,6 @@
|
|||||||
"label": "&Window",
|
"label": "&Window",
|
||||||
"role": "window",
|
"role": "window",
|
||||||
"submenu": [
|
"submenu": [
|
||||||
{
|
|
||||||
"label": "Close Window",
|
|
||||||
"accelerator": "CmdOrCtrl+W",
|
|
||||||
"role": "close"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "Minimize",
|
"label": "Minimize",
|
||||||
"accelerator": "CmdOrCtrl+M",
|
"accelerator": "CmdOrCtrl+M",
|
||||||
|
Reference in New Issue
Block a user