From f5977749c598f861e72fe5174d60e054a9b8592b Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Mon, 27 Feb 2023 19:08:25 +0900
Subject: [PATCH] Fix app menu for darwin
---
src/config/locales/en/translation.json | 7 +++---
src/main/index.ts | 30 ++++++++++++++------------
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json
index caa720b0..e134a381 100644
--- a/src/config/locales/en/translation.json
+++ b/src/config/locales/en/translation.json
@@ -12,10 +12,6 @@
"open": "Open window",
"quit": "Quit"
},
- "toot": {
- "name": "Posts",
- "new": "New post..."
- },
"edit": {
"name": "Edit",
"undo": "Undo",
@@ -36,6 +32,9 @@
"open": "Open Window",
"minimize": "Minimize",
"jump_to": "Jump to"
+ },
+ "help": {
+ "name": "Help"
}
},
"global_header": {
diff --git a/src/main/index.ts b/src/main/index.ts
index 99266129..80d6259b 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -422,15 +422,11 @@ app.on('window-all-closed', () => {
// Preferences
menu.items[0].submenu.items[2].enabled = false
}
- if (menu.items[1].submenu) {
- // New Toot
- menu.items[1].submenu.items[0].enabled = false
- }
- if (menu.items[4].submenu) {
+ if (menu.items[3].submenu) {
// Open Window
- menu.items[4].submenu.items[1].enabled = true
+ menu.items[3].submenu.items[1].enabled = true
// Jump to
- menu.items[4].submenu.items[4].enabled = false
+ menu.items[3].submenu.items[4].enabled = false
}
}
}
@@ -949,13 +945,6 @@ const ApplicationMenu = (accountsChange: Array, menu
mainWindow!.webContents.send('open-preferences')
}
},
- {
- label: i18n.t('main_menu.application.shortcuts'),
- accelerator: 'Shift+?',
- click: () => {
- mainWindow!.webContents.send('open-shortcuts-list')
- }
- },
...macGeneralMenu,
{
type: 'separator'
@@ -1045,6 +1034,19 @@ const ApplicationMenu = (accountsChange: Array, menu
},
...accountsChange
]
+ },
+ {
+ label: i18n.t("main_menu.help.name"),
+ role: "help",
+ submenu: [
+ {
+ label: i18n.t('main_menu.application.shortcuts'),
+ accelerator: 'Shift+?',
+ click: () => {
+ mainWindow!.webContents.send('open-shortcuts-list')
+ }
+ },
+ ]
}
]