Give up to disable browser.tabs.insertRelatedAfterCurrent

This commit is contained in:
YUKI Hiroshi 2016-01-19 17:47:18 +09:00
parent 36bd40d8c8
commit ef5d21b413
2 changed files with 9 additions and 7 deletions

View File

@ -14,7 +14,7 @@
* The Original Code is the Tree Style Tab.
*
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
* Portions created by the Initial Developer are Copyright (C) 2010-2014
* Portions created by the Initial Developer are Copyright (C) 2010-2016
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex@gmail.com>
@ -132,7 +132,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
this.onPrefChange('extensions.treestyletab.indent.vertical');
this.onPrefChange('extensions.treestyletab.indent.horizontal');
this.onPrefChange('extensions.treestyletab.clickOnIndentSpaces.enabled');
this.onPrefChange('browser.tabs.insertRelatedAfterCurrent.override');
this.onPrefChange('extensions.stm.tabBarMultiRows.override'); // Super Tab Mode
this.onPrefChange('extensions.treestyletab.tabbar.scroll.smooth');
this.onPrefChange('extensions.treestyletab.tabbar.scroll.duration');
@ -184,7 +183,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
prefs.removePrefListener(this);
let restorePrefs = [
'browser.tabs.insertRelatedAfterCurrent',
'extensions.stm.tabBarMultiRows' // Super Tab Mode
];
for (let i = 0, maxi = restorePrefs.length; i < maxi; i++)
@ -2403,7 +2401,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
domains : [
'extensions.treestyletab.',
'browser.tabs.animate',
'browser.tabs.insertRelatedAfterCurrent',
'extensions.stm.tabBarMultiRows' // Super Tab Mode
],
@ -2435,13 +2432,11 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
case 'extensions.treestyletab.tabbar.shrunkenWidth':
return this.correctMismatchedTabWidthPrefs(aPrefName);
case 'browser.tabs.insertRelatedAfterCurrent':
case 'extensions.stm.tabBarMultiRows': // Super Tab Mode
if (this.prefOverriding)
return;
aPrefName += '.override';
prefs.setPref(aPrefName, value);
case 'browser.tabs.insertRelatedAfterCurrent.override':
case 'extensions.stm.tabBarMultiRows.override': // Super Tab Mode
if (prefs.getPref(aPrefName+'.force')) {
let defaultValue = prefs.getDefaultPref(aPrefName);

View File

@ -67,7 +67,7 @@ XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabConstants',
'resource://treestyletab-modules/constants.js', 'TreeStyleTabConstants');
const TST_PREF_PREFIX = 'extensions.treestyletab.';
const TST_PREF_VERSION = 11;
const TST_PREF_VERSION = 12;
var TreeStyleTabUtils = {
@ -221,6 +221,13 @@ var TreeStyleTabUtils = {
this.setTreePref('maxTreeLevel.physical', physical);
this.clearTreePref('maxTreeLevel.phisical');
}
case 11:
{
prefs.clearPref('browser.tabs.insertRelatedAfterCurrent');
let backupValue = prefs.getPref('browser.tabs.insertRelatedAfterCurrent.backup');
if (backupValue === null)
prefs.setPref('browser.tabs.insertRelatedAfterCurrent', backupValue);
}
default:
for (let i = 0, maxi = orientalPrefs.length; i < maxi; i++)
{