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

Commit

Permalink
Merge pull request #8204 from cezaraugusto/menu/8203
Browse files Browse the repository at this point in the history
Add Extensions / rm Manager string from windowMenu
  • Loading branch information
bsclifton authored Apr 10, 2017
2 parents 6306259 + 160d01f commit 0ec9dbd
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/browser/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ const createWindowSubmenu = () => {
CommonMenu.separatorMenuItem,
CommonMenu.bookmarksManagerMenuItem(),
CommonMenu.downloadsMenuItem(),
CommonMenu.extensionsMenuItem(),
CommonMenu.passwordsMenuItem()
]

Expand Down
18 changes: 18 additions & 0 deletions app/common/commonMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,24 @@ module.exports.downloadsMenuItem = () => {
}
}

module.exports.extensionsMenuItem = () => {
return {
label: locale.translation('extensionsManager'),
click: (item, focusedWindow) => {
if (BrowserWindow.getAllWindows().length === 0) {
appActions.newWindow(Immutable.fromJS({
location: 'about:preferences#extensions'
}))
} else {
appActions.maybeCreateTabRequested({
url: 'about:preferences#extensions',
windowId: getCurrentWindowId()
})
}
}
}
}

module.exports.passwordsMenuItem = () => {
return {
label: locale.translation('passwordsManager'),
Expand Down
7 changes: 4 additions & 3 deletions app/extensions/brave/locales/en-US/menu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ find=Find…
checkForUpdates=Check for Updates…
preferences=Preferences…
settings=Settings…
bookmarksManager=Bookmarks Manager
bookmarksManager=Bookmarks…
importBrowserData=Import Browser Data…
exportBookmarks=Export Bookmarks…
submitFeedback=Submit Feedback…
Expand Down Expand Up @@ -141,8 +141,9 @@ aboutApp=About Brave
quit=Quit
quitApp=Quit Brave
inspectElement=Inspect Element
downloadsManager=Downloads Manager…
passwordsManager=Passwords Manager…
downloadsManager=Downloads…
passwordsManager=Passwords…
extensionsManager=Extensions…
zoom=Zoom
new=New
learnSpelling=Learn Spelling
Expand Down
1 change: 1 addition & 0 deletions app/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ var rendererIdentifiers = function () {
'noThanks',
'neverForThisSite',
'passwordsManager',
'extensionsManager',
'downloadItemPause',
'downloadItemResume',
'downloadItemCancel',
Expand Down
6 changes: 6 additions & 0 deletions test/unit/app/common/commonMenuTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ describe('Common menu module unit tests', function () {
})
})

describe('extensionsMenuItem', function () {
it('has the expected defaults set', function () {
checkExpectedDefaults(commonMenu.extensionsMenuItem, false)
})
})

describe('importBrowserDataMenuItem', function () {
it('has the expected defaults set', function () {
checkExpectedDefaults(commonMenu.importBrowserDataMenuItem, false)
Expand Down

0 comments on commit 0ec9dbd

Please sign in to comment.