From 53090d18b37efa7fa59b38419d12fb96c93b7587 Mon Sep 17 00:00:00 2001 From: piro Date: Sun, 2 May 2010 04:51:19 +0000 Subject: [PATCH] =?UTF-8?q?browser.tabs.insertRelatedAfterCurrent=E3=82=92?= =?UTF-8?q?false=E3=81=AB=E5=9B=BA=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6654 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- defaults/preferences/treestyletab.js | 1 + modules/utils.js | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 20cd84ef..bd0421b2 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -122,6 +122,7 @@ pref("extensions.treestyletab.undoCloseTabSet.behavior", 3); pref("browser.link.open_newwindow.restriction.override", 0); pref("browser.tabs.loadFolderAndReplace.override", false); pref("browser.tabs.insertRelatedAfterCurrent.override", false); +pref("browser.tabs.insertRelatedAfterCurrent.override.force", true); pref("extensions.multipletab.show.multipletab-selection-item-removeTabSubtree", true); pref("extensions.multipletab.show.multipletab-selection-item-createSubtree", true); diff --git a/modules/utils.js b/modules/utils.js index 57acb53c..d24ef03b 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -1740,7 +1740,6 @@ var TreeStyleTabUtils = { break; case 'browser.tabs.insertRelatedAfterCurrent': - value = false; // 常にfalseで固定 case 'browser.link.open_newwindow.restriction': case 'browser.tabs.loadFolderAndReplace': case 'extensions.stm.tabBarMultiRows': // Super Tab Mode @@ -1751,15 +1750,20 @@ var TreeStyleTabUtils = { case 'browser.link.open_newwindow.restriction.override': case 'browser.tabs.loadFolderAndReplace.override': case 'extensions.stm.tabBarMultiRows.override': // Super Tab Mode - if (aPrefName == 'browser.tabs.insertRelatedAfterCurrent.override') { - value = false; // 常にfalseで固定 + if (this.getPref(aPrefName+'.force')) { + let defaultValue = this.getDefaultPref(aPrefName); + if (value != defaultValue) { + this.setPref(aPrefName, defaultValue); + return; + } } this.prefOverriding = true; - var target = aPrefName.replace('.override', ''); - var originalValue = this.getPref(target); - if (originalValue !== null && originalValue != value) - this.setPref(target+'.backup', originalValue); - this.setPref(target, this.getPref(aPrefName)); + let (target = aPrefName.replace('.override', '')) { + let originalValue = this.getPref(target); + if (originalValue !== null && originalValue != value) + this.setPref(target+'.backup', originalValue); + this.setPref(target, this.getPref(aPrefName)); + } this.prefOverriding = false; break;