From b4c20a57ca63551be4058c8ecf5bfe00e5a4e9ff Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 15 Jan 2016 16:23:03 -0800 Subject: [PATCH 1/2] Put 'Bring All to Front' in window menu --- app/menu.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app/menu.js b/app/menu.js index 7d4f7e99f66..cd24faeeb84 100644 --- a/app/menu.js +++ b/app/menu.js @@ -315,7 +315,6 @@ const init = () => { } } } - // Bring All To Front added automatically ] }, { label: 'History', @@ -509,6 +508,11 @@ const init = () => { label: 'Tab Manager', accelerator: 'Alt+CmdOrCtrl+M', enabled: false + }, { + type: 'separator' + }, { + label: 'Bring All to Front', + role: 'front' } ] }, { @@ -590,15 +594,6 @@ const init = () => { } ] }) - // Window menu. - template[3].submenu.push( - { - type: 'separator' - }, { - label: 'Bring All to Front', - role: 'front' - } - ) } const menu = Menu.buildFromTemplate(template) From 69e0419f8c4357ae76ab6bc4ed73e69bec729cda Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 15 Jan 2016 16:32:44 -0800 Subject: [PATCH 2/2] Make Brave menu appear on all platforms --- app/menu.js | 97 ++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/app/menu.js b/app/menu.js index cd24faeeb84..c0e586471f1 100644 --- a/app/menu.js +++ b/app/menu.js @@ -544,57 +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 + 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: '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)