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

Commit

Permalink
Remove check for update menu item on Linux
Browse files Browse the repository at this point in the history
Fix #7529

Auditors: @aekeus
  • Loading branch information
bbondy committed Mar 8, 2017
1 parent ce004b9 commit 9811351
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
5 changes: 4 additions & 1 deletion app/browser/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const getSetting = require('../../js/settings').getSetting
const locale = require('../locale')
const {isSiteBookmarked, siteSort} = require('../../js/state/siteUtil')
const isDarwin = process.platform === 'darwin'
const isLinux = process.platform === 'linux'
const aboutUrl = 'https://brave.com/'

let appMenu = null
Expand Down Expand Up @@ -437,9 +438,11 @@ const createHelpSubmenu = () => {
}
]

if (!isDarwin) {
if (!isDarwin && !isLinux) {
submenu.push(CommonMenu.separatorMenuItem)
submenu.push(CommonMenu.checkForUpdateMenuItem())
}
if (!isDarwin) {
submenu.push(CommonMenu.separatorMenuItem)
submenu.push(CommonMenu.aboutBraveMenuItem())
}
Expand Down
22 changes: 15 additions & 7 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const extensionActions = require('../app/common/actions/extensionActions')
const appStore = require('./stores/appStoreRenderer')

const isDarwin = process.platform === 'darwin'
const isLinux = process.platform === 'linux'

/**
* Obtains an add bookmark menu item
Expand Down Expand Up @@ -687,6 +688,19 @@ function getEditableItems (selection, editFlags, hasFormat) {
}

function hamburgerTemplateInit (location, e) {
const helpSubmenu = [
CommonMenu.aboutBraveMenuItem(),
CommonMenu.separatorMenuItem
]

if (!isLinux) {
helpSubmenu.push(
CommonMenu.checkForUpdateMenuItem(),
CommonMenu.separatorMenuItem)
}

helpSubmenu.push(CommonMenu.submitFeedbackMenuItem())

const template = [
CommonMenu.newTabMenuItem(),
CommonMenu.newPrivateTabMenuItem(),
Expand Down Expand Up @@ -740,13 +754,7 @@ function hamburgerTemplateInit (location, e) {
CommonMenu.separatorMenuItem,
{
label: locale.translation('help'),
submenu: [
CommonMenu.aboutBraveMenuItem(),
CommonMenu.separatorMenuItem,
CommonMenu.checkForUpdateMenuItem(),
CommonMenu.separatorMenuItem,
CommonMenu.submitFeedbackMenuItem()
]
submenu: helpSubmenu
},
CommonMenu.quitMenuItem()
]
Expand Down

1 comment on commit 9811351

@aekeus
Copy link
Member

@aekeus aekeus commented on 9811351 Mar 8, 2017

Choose a reason for hiding this comment

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

++ looks good

I also checked that the logic for scheduled updates is correctly ignoring Linux.

Please sign in to comment.