Skip to content

Commit

Permalink
Added 'Quit' option under 'File' (#746)
Browse files Browse the repository at this point in the history
* Added 'Quit' option under 'File' (#741)

* Edited accelerator

* Hid 'Quit' option on MacOS

* Clarified MacOS menu item removal code
  • Loading branch information
owen-mccormick authored Sep 22, 2020
1 parent 2cec2c2 commit 3c22c53
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ exports.get = function(props = {}) {
label: i18n.t('menu.file', '&Preferences…'),
accelerator: 'CmdOrCtrl+,',
click: () => sabaki.openDrawer('preferences')
},
{type: 'separator'},
{
label: i18n.t('menu.file', '&Quit'),
accelerator: 'CmdOrCtrl+Q',
click: () => app.quit()
}
]
},
Expand Down Expand Up @@ -863,12 +869,12 @@ exports.get = function(props = {}) {

appMenu.push(...items.slice(0, 2))

// Remove original 'Preferences' menu item
// Remove original 'Preferences' and 'Quit' menu items

let fileMenu = findMenuItem('file')
let preferenceItem = fileMenu.submenu.splice(
fileMenu.submenu.length - 2,
2
fileMenu.submenu.length - 4,
4
)[1]

appMenu.push(
Expand Down

0 comments on commit 3c22c53

Please sign in to comment.