Remove Window menu on Linux and Windows
The Window menu is apparently an OS X only convention. I couldn't find a single app on Windows or Linux that had this menu or even a "minimize" menu item.
This commit is contained in:
44
main/menu.js
44
main/menu.js
@@ -268,17 +268,6 @@ function getAppMenuTemplate () {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Window',
|
||||
role: 'window',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Minimize',
|
||||
accelerator: 'CmdOrCtrl+M',
|
||||
role: 'minimize'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
role: 'help',
|
||||
@@ -303,7 +292,7 @@ function getAppMenuTemplate () {
|
||||
]
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
// WebTorrent menu (OS X)
|
||||
// Add WebTorrent app menu (OS X)
|
||||
template.unshift({
|
||||
label: config.APP_NAME,
|
||||
submenu: [
|
||||
@@ -347,16 +336,25 @@ function getAppMenuTemplate () {
|
||||
]
|
||||
})
|
||||
|
||||
// Window menu (OS X)
|
||||
template[5].submenu.push(
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Bring All to Front',
|
||||
role: 'front'
|
||||
}
|
||||
)
|
||||
// Add Window menu (OS X)
|
||||
template.splice(5, 0, {
|
||||
label: 'Window',
|
||||
role: 'window',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Minimize',
|
||||
accelerator: 'CmdOrCtrl+M',
|
||||
role: 'minimize'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Bring All to Front',
|
||||
role: 'front'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
// In Linux and Windows it is not possible to open both folders and files
|
||||
@@ -368,7 +366,7 @@ function getAppMenuTemplate () {
|
||||
})
|
||||
|
||||
// Help menu (Windows, Linux)
|
||||
template[5].submenu.push(
|
||||
template[4].submenu.push(
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user