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

Update text for close tab section #6961

Merged
merged 1 commit into from
Feb 6, 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: 0 additions & 1 deletion app/common/constants/settingsEnums.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const bookmarksToolbarMode = {
const tabCloseAction = {
LAST_ACTIVE: 'lastActive',
NEXT: 'next',
FIRST: 'first',
PARENT: 'parent'
}

Expand Down
9 changes: 4 additions & 5 deletions app/extensions/brave/locales/en-US/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ startsWith=Brave starts with
startsWithOptionLastTime=My windows / tabs from last time
startsWithOptionHomePage=Home page
startsWithOptionNewTabPage=a new tab
tabCloseActionLastActive=Last active tab
tabCloseActionNext=Next tab
tabCloseActionFirst=First tab
tabCloseActionParent=Parent tab
tabCloseActionLastActive=Select the last viewed tab
tabCloseActionNext=Select the next tab
tabCloseActionParent=Select its parent tab
newTabMode=A new tab shows
newTabBlank=blank
newTabNewTabPage=Dashboard
Expand All @@ -149,7 +148,7 @@ engineGoKey=Engine Go Key (Type First)
switchToNewTabs=Switch to new tabs immediately
paintTabs=Show tabs in page theme color
tabsPerTabPage=Number of tabs per tab set:
tabCloseAction=Which tab should be activated after the tab is closed:
tabCloseAction=When closing an active tab:
showTabPreviews=Show tab previews on hover
showHistoryMatches=Show history matches
showBookmarkMatches=Show bookmark matches
Expand Down
7 changes: 3 additions & 4 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const SwitchControl = require('../components/switchControl')
const ModalOverlay = require('../components/modalOverlay')
const {SettingsList, SettingItem} = require('../../app/renderer/components/settings')
const {SettingTextbox} = require('../../app/renderer/components/textbox')
const {FormDropdown, SettingDropdown} = require('../../app/renderer/components/dropdown')
const {SettingDropdown} = require('../../app/renderer/components/dropdown')
const Button = require('../components/button')

// Tabs
Expand Down Expand Up @@ -836,14 +836,13 @@ class TabsTab extends ImmutableComponent {
</SettingDropdown>
</SettingItem>
<SettingItem dataL10nId='tabCloseAction'>
<FormDropdown
<SettingDropdown
value={getSetting(settings.TAB_CLOSE_ACTION, this.props.settings)}
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.TAB_CLOSE_ACTION)}>
<option data-l10n-id='tabCloseActionLastActive' value={tabCloseAction.LAST_ACTIVE} />
<option data-l10n-id='tabCloseActionNext' value={tabCloseAction.NEXT} />
<option data-l10n-id='tabCloseActionFirst' value={tabCloseAction.FIRST} />
<option data-l10n-id='tabCloseActionParent' value={tabCloseAction.PARENT} />
</FormDropdown>
</SettingDropdown>
</SettingItem>
<SettingCheckbox dataL10nId='switchToNewTabs' prefKey={settings.SWITCH_TO_NEW_TABS} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
<SettingCheckbox dataL10nId='paintTabs' prefKey={settings.PAINT_TABS} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
Expand Down
3 changes: 0 additions & 3 deletions js/state/frameStateUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,6 @@ function removeFrame (frames, tabs, closedFrames, frameProps, activeFrameKey, fr
case tabCloseAction.NEXT:
activeFrameIndex = ((frames.count() - 1) === framePropsIndex) ? (framePropsIndex - 1) : framePropsIndex
break
case tabCloseAction.FIRST:
activeFrameIndex = 0
break
// Default is a parent tab
default:
let parentFrameIndex = findIndexForFrameKey(frames, frameProps.get('parentFrameKey'))
Expand Down
13 changes: 0 additions & 13 deletions test/unit/state/frameStateUtilTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,6 @@ describe('frameStateUtil', function () {
assert.equal(result.activeFrameKey, 5)
})

it('first tab action', function () {
const result = frameStateUtil.removeFrame(
frames,
tabs,
closedFrames,
frameProps,
activeFrameKey,
framePropsIndex,
tabCloseAction.FIRST
)
assert.equal(result.activeFrameKey, 2)
})

it('next tab action', function () {
const result = frameStateUtil.removeFrame(
frames,
Expand Down