Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Add brave menu on windows #171

Merged
merged 2 commits into from
Jan 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 49 additions & 57 deletions app/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ const init = () => {
}
}
}
// Bring All To Front added automatically
]
}, {
label: 'History',
Expand Down Expand Up @@ -509,6 +508,11 @@ const init = () => {
label: 'Tab Manager',
accelerator: 'Alt+CmdOrCtrl+M',
enabled: false
}, {
type: 'separator'
}, {
label: 'Bring All to Front',
role: 'front'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to do anything, would prefer to just remove it unless there's an easy fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean on Windows? It seems to work on OS X.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I tested that on Windows.

}
]
}, {
Expand Down Expand Up @@ -540,66 +544,54 @@ const init = () => {
}
]

if (process.platform === 'darwin') {
var name = 'Brave'
template.unshift({
label: name, // Ignored. OSX gets this from the app Info.plist file.
submenu: [
{
label: 'About ' + name,
role: 'about'
}, {
type: 'separator'
}, {
label: 'Preferences...',
enabled: false,
accelerator: 'CmdOrCtrl+,'
}, {
type: 'separator'
}, {
label: 'Send us Feedback...',
click: function (item, focusedWindow) {
sendToFocusedWindow(focusedWindow,
[messages.SHORTCUT_NEW_FRAME, 'https://brave.com/'])
}
}, {
type: 'separator'
}, {
label: 'Services',
role: 'services',
submenu: []
}, {
type: 'separator'
}, {
label: 'Hide ' + name,
accelerator: 'Command+H',
role: 'hide'
}, {
label: 'Hide Others',
accelerator: 'Command+Shift+H',
role: 'hideothers'
}, {
label: 'Show All',
role: 'unhide'
}, {
type: 'separator'
}, {
label: 'Quit ' + name,
accelerator: 'Command+Q',
click: app.quit
}
]
})
// Window menu.
template[3].submenu.push(
var name = 'Brave'
template.unshift({
label: name, // Ignored on OSX, which gets this from the app Info.plist file.
submenu: [
{
label: 'About ' + name,
role: 'about'
}, {
type: 'separator'
}, {
label: 'Preferences...',
enabled: false,
accelerator: 'CmdOrCtrl+,'
}, {
type: 'separator'
}, {
label: 'Bring All to Front',
role: 'front'
label: 'Send us Feedback...',
click: function (item, focusedWindow) {
sendToFocusedWindow(focusedWindow,
[messages.SHORTCUT_NEW_FRAME, 'https://brave.com/'])
}
}, {
type: 'separator'
}, {
label: 'Services',
role: 'services'
}, {
type: 'separator'
}, {
label: 'Hide ' + name,
accelerator: 'Command+H',
role: 'hide'
}, {
label: 'Hide Others',
accelerator: 'Command+Shift+H',
role: 'hideothers'
}, {
label: 'Show All',
role: 'unhide'
}, {
type: 'separator'
}, {
label: 'Quit ' + name,
accelerator: 'Command+Q',
click: app.quit
}
)
}
]
})

const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
Expand Down