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

Commit

Permalink
Revert "Add ReopenClosedTab context menu to entire tab bar"
Browse files Browse the repository at this point in the history
This reverts commit e2706d7.

Revert "Cleanup for PR #8320"
This reverts commit 6ebb6d2.

Fixes #8647
Unfixes #8303
  • Loading branch information
bsclifton committed May 5, 2017
1 parent 32ed15b commit 86d47cf
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 48 deletions.
11 changes: 0 additions & 11 deletions app/common/commonMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,17 +344,6 @@ module.exports.bookmarksToolbarMenuItem = () => {
}
}

module.exports.showTabPreviewsMenuItem = () => {
return {
label: locale.translation('showTabPreviews'),
type: 'checkbox',
checked: getSetting(settings.SHOW_TAB_PREVIEWS),
click: (item, focusedWindow) => {
appActions.changeSetting(settings.SHOW_TAB_PREVIEWS, !getSetting(settings.SHOW_TAB_PREVIEWS))
}
}
}

module.exports.autoHideMenuBarMenuItem = () => {
const autoHideMenuBar = getSetting(settings.AUTO_HIDE_MENU)
return {
Expand Down
1 change: 0 additions & 1 deletion app/extensions/brave/locales/en-US/menu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,3 @@ downloadItemDelete=Delete Download
downloadItemClear=Clear Download
downloadToolbarHide=Hide downloads bar
downloadItemClearCompleted=Clear completed downloads
showTabPreviews=Show Tab Previews
1 change: 0 additions & 1 deletion app/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ var rendererIdentifiers = function () {
'learnSpelling',
'ignoreSpelling',
'lookupSelection',
'showTabPreviews',
// Other identifiers
'aboutBlankTitle',
'urlCopied',
Expand Down
3 changes: 1 addition & 2 deletions app/renderer/components/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ class Tabs extends ImmutableComponent {
const index = this.props.previewTabPageIndex !== undefined
? this.props.previewTabPageIndex : this.props.tabPageIndex
return <div className='tabs'
onMouseLeave={this.props.fixTabWidth ? this.onMouseLeave : null}
onContextMenu={contextMenus.onTabsBarContextMenu.bind(this, windowStore.getFrames())}>
onMouseLeave={this.props.fixTabWidth ? this.onMouseLeave : null}>
<span className={cx({
tabStripContainer: true,
isPreview: this.props.previewTabPageIndex !== undefined,
Expand Down
33 changes: 0 additions & 33 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,31 +658,6 @@ function tabTemplateInit (frameProps) {
return menuUtil.sanitizeTemplateItems(template)
}

function tabsBarTemplateInit (framePropsList) {
const template = []

template.push(
CommonMenu.newTabMenuItem(),
CommonMenu.separatorMenuItem,
CommonMenu.newPrivateTabMenuItem(),
CommonMenu.newPartitionedTabMenuItem(),
CommonMenu.newWindowMenuItem(),
CommonMenu.separatorMenuItem,
CommonMenu.showTabPreviewsMenuItem(),
CommonMenu.separatorMenuItem,
CommonMenu.bookmarksManagerMenuItem(),
CommonMenu.bookmarksToolbarMenuItem(),
CommonMenu.separatorMenuItem
)

template.push(Object.assign({},
CommonMenu.reopenLastClosedTabItem(),
{ enabled: windowStore.getState().get('closedFrames').size > 0 }
))

return menuUtil.sanitizeTemplateItems(template)
}

function getMisspelledSuggestions (selection, isMisspelled, suggestions) {
const hasSelection = selection.length > 0
const template = []
Expand Down Expand Up @@ -1392,13 +1367,6 @@ function onTabContextMenu (frameProps, e) {
tabMenu.destroy()
}

function onTabsBarContextMenu (framePropsList, e) {
e.stopPropagation()
const tabsMenu = Menu.buildFromTemplate(tabsBarTemplateInit(framePropsList))
tabsMenu.popup(getCurrentWindow())
tabsMenu.destroy()
}

function onNewTabContextMenu (target) {
const menuTemplate = [
CommonMenu.newTabMenuItem(),
Expand Down Expand Up @@ -1555,7 +1523,6 @@ module.exports = {
onFlashContextMenu,
onMainContextMenu,
onTabContextMenu,
onTabsBarContextMenu,
onNewTabContextMenu,
onTabsToolbarContextMenu,
onDownloadsToolbarContextMenu,
Expand Down

0 comments on commit 86d47cf

Please sign in to comment.