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

Add Extensions / rm Manager string from windowMenu #8204

Merged
merged 1 commit into from
Apr 10, 2017
Merged
Show file tree
Hide file tree
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
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