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',
|
label: 'Help',
|
||||||
role: 'help',
|
role: 'help',
|
||||||
@@ -303,7 +292,7 @@ function getAppMenuTemplate () {
|
|||||||
]
|
]
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
// WebTorrent menu (OS X)
|
// Add WebTorrent app menu (OS X)
|
||||||
template.unshift({
|
template.unshift({
|
||||||
label: config.APP_NAME,
|
label: config.APP_NAME,
|
||||||
submenu: [
|
submenu: [
|
||||||
@@ -347,16 +336,25 @@ function getAppMenuTemplate () {
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
// Window menu (OS X)
|
// Add Window menu (OS X)
|
||||||
template[5].submenu.push(
|
template.splice(5, 0, {
|
||||||
{
|
label: 'Window',
|
||||||
type: 'separator'
|
role: 'window',
|
||||||
},
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'Bring All to Front',
|
label: 'Minimize',
|
||||||
role: 'front'
|
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
|
// In Linux and Windows it is not possible to open both folders and files
|
||||||
@@ -368,7 +366,7 @@ function getAppMenuTemplate () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Help menu (Windows, Linux)
|
// Help menu (Windows, Linux)
|
||||||
template[5].submenu.push(
|
template[4].submenu.push(
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user