From 06817a622b4684279a428e3a28242a0be87e242f Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 25 Dec 2009 11:27:23 +0000 Subject: [PATCH] =?UTF-8?q?SubTree=20=3D>=20Subtree=20(=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E5=90=8D=EF=BC=89?= 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@5618 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.xul | 40 ++++++++++----------- content/treestyletab/treestyletab.js | 21 +++++++---- content/treestyletab/treestyletabbrowser.js | 14 ++++---- defaults/preferences/treestyletab.js | 14 ++++---- locale/de-DE/treestyletab/treestyletab.dtd | 8 ++--- locale/en-US/treestyletab/treestyletab.dtd | 8 ++--- locale/es-ES/treestyletab/treestyletab.dtd | 10 +++--- locale/it-IT/treestyletab/treestyletab.dtd | 10 +++--- locale/ja/treestyletab/treestyletab.dtd | 8 ++--- locale/pl-PL/treestyletab/treestyletab.dtd | 8 ++--- locale/ru-RU/treestyletab/treestyletab.dtd | 10 +++--- locale/zh-CN/treestyletab/treestyletab.dtd | 8 ++--- locale/zh-TW/treestyletab/treestyletab.dtd | 10 +++--- tests/unit/treestyletab_treeUtils.test.js | 2 +- 14 files changed, 89 insertions(+), 82 deletions(-) diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index 848c4670..af068463 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -631,18 +631,18 @@ - - - - - + - + - - + + -1 ); - var root = this.getTreePref('createSubTree.underParent') ? + var root = this.getTreePref('createSubtree.underParent') ? b.addTab(this.getGroupTabURI()) : aTabs.shift() ; window.setTimeout(function(aSelf) { @@ -2714,7 +2721,7 @@ catch(e) { expandTreeAfterKeyReleased : function TSTService_expandTreeAfterKeyReleased(aTab) { - if (this.getTreePref('autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut')) return; + if (this.getTreePref('autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut')) return; this._tabShouldBeExpandedAfterKeyReleased = aTab || null; }, _tabShouldBeExpandedAfterKeyReleased : null, @@ -2886,8 +2893,8 @@ catch(e) { case 'browser.ctrlTab.previews': TreeStyleTabBrowserAutoHide.updateKeyListeners(); - case 'extensions.treestyletab.autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut': - case 'extensions.treestyletab.autoCollapseExpandSubTreeOnSelect': + case 'extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut': + case 'extensions.treestyletab.autoCollapseExpandSubtreeOnSelect': if (this.shouldListenKeyEventsForAutoExpandByFocusChange) this.startListenKeyEventsFor(this.LISTEN_FOR_AUTOEXPAND_BY_FOCUSCHANGE); else diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 3fe9f263..bb145884 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -2143,7 +2143,7 @@ TreeStyleTabBrowser.prototype = { var tab = b.selectedTab if (this.isCollapsed(tab)) { - if (this.getTreePref('autoExpandSubTreeOnCollapsedChildFocused')) { + if (this.getTreePref('autoExpandSubtreeOnCollapsedChildFocused')) { var parentTab = tab; while (parentTab = this.getParentTab(parentTab)) { @@ -2156,10 +2156,10 @@ TreeStyleTabBrowser.prototype = { } } else if ( - this.getTreePref('autoCollapseExpandSubTreeOnSelect') && + this.getTreePref('autoCollapseExpandSubtreeOnSelect') && ( !this._focusChangedByCurrentTabRemove || - this.getTreePref('autoCollapseExpandSubTreeOnSelect.onCurrentTabRemove') + this.getTreePref('autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove') ) ) { if (!this.hasChildTabs(tab) || !this.isSubtreeCollapsed(tab)) @@ -2168,7 +2168,7 @@ TreeStyleTabBrowser.prototype = { if ( this._focusChangedByShortcut && this.accelKeyPressed && - !this.getTreePref('autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut') + !this.getTreePref('autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut') ) { TreeStyleTabService.expandTreeAfterKeyReleased(tab); } @@ -2250,7 +2250,7 @@ TreeStyleTabBrowser.prototype = { var tab = this.getTabFromEvent(aEvent); if (tab && this.hasChildTabs(tab) && - this.getTreePref('collapseExpandSubTree.dblclick')) { + this.getTreePref('collapseExpandSubtree.dblclick')) { this.collapseExpandSubtree(tab, tab.getAttribute(this.kSUBTREE_COLLAPSED) != 'true'); aEvent.preventDefault(); aEvent.stopPropagation(); @@ -3051,7 +3051,7 @@ TreeStyleTabBrowser.prototype = { } if (!aInfo.dontExpand) { - if (this.getTreePref('autoCollapseExpandSubTreeOnSelect')) { + if (this.getTreePref('autoCollapseExpandSubtreeOnSelect')) { if (this.shouldTabAutoExpanded(aParent)) this.collapseExpandTreesIntelligentlyFor(aParent); var p = aParent; @@ -3062,7 +3062,7 @@ TreeStyleTabBrowser.prototype = { while (p = this.getParentTab(p)); } else if (this.shouldTabAutoExpanded(aParent)) { - if (this.getTreePref('autoExpandSubTreeOnAppendChild')) { + if (this.getTreePref('autoExpandSubtreeOnAppendChild')) { var p = aParent; do { if (this.shouldTabAutoExpanded(p)) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 9d4357f1..d9349e67 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -86,12 +86,12 @@ pref("extensions.treestyletab.dropLinksOnTab.behavior", 0); pref("extensions.treestyletab.openGroupBookmark.behavior", 256); pref("extensions.treestyletab.useEffectiveTLD", true); -pref("extensions.treestyletab.autoCollapseExpandSubTreeOnSelect", true); -pref("extensions.treestyletab.autoCollapseExpandSubTreeOnSelect.onCurrentTabRemove", true); -pref("extensions.treestyletab.autoCollapseExpandSubTreeOnSelect.whileFocusMovingByShortcut", false); -pref("extensions.treestyletab.collapseExpandSubTree.dblclick", false); -pref("extensions.treestyletab.autoExpandSubTreeOnCollapsedChildFocused", true); -pref("extensions.treestyletab.autoExpandSubTreeOnAppendChild", true); +pref("extensions.treestyletab.autoCollapseExpandSubtreeOnSelect", true); +pref("extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove", true); +pref("extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut", false); +pref("extensions.treestyletab.collapseExpandSubtree.dblclick", false); +pref("extensions.treestyletab.autoExpandSubtreeOnCollapsedChildFocused", true); +pref("extensions.treestyletab.autoExpandSubtreeOnAppendChild", true); pref("extensions.treestyletab.autoAttachNewTabsAsChildren", true); // 0 = default, 1 = only visible tabs pref("extensions.treestyletab.focusMode", 1); @@ -108,7 +108,7 @@ pref("extensions.treestyletab.closeParentBehavior", 3); Note: this affects only when closeParentBehavior == 0 */ pref("extensions.treestyletab.closeRootBehavior", 3); -pref("extensions.treestyletab.createSubTree.underParent", true); +pref("extensions.treestyletab.createSubtree.underParent", true); pref("browser.link.open_newwindow.restriction.override", 0); diff --git a/locale/de-DE/treestyletab/treestyletab.dtd b/locale/de-DE/treestyletab/treestyletab.dtd index 5cfbf8bb..cd8bb251 100644 --- a/locale/de-DE/treestyletab/treestyletab.dtd +++ b/locale/de-DE/treestyletab/treestyletab.dtd @@ -119,10 +119,10 @@ - - - - + + + + diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd index 7954ab2a..be29a183 100644 --- a/locale/en-US/treestyletab/treestyletab.dtd +++ b/locale/en-US/treestyletab/treestyletab.dtd @@ -118,10 +118,10 @@ - - - - + + + + diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd index d32fed2d..dd283b0f 100644 --- a/locale/es-ES/treestyletab/treestyletab.dtd +++ b/locale/es-ES/treestyletab/treestyletab.dtd @@ -120,11 +120,11 @@ - - - - - + + + + + diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd index 77310a8f..9f277949 100644 --- a/locale/it-IT/treestyletab/treestyletab.dtd +++ b/locale/it-IT/treestyletab/treestyletab.dtd @@ -120,11 +120,11 @@ - - - - - + + + + + diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd index a46b7502..822b86b2 100644 --- a/locale/ja/treestyletab/treestyletab.dtd +++ b/locale/ja/treestyletab/treestyletab.dtd @@ -118,13 +118,13 @@ - - + + - - + + diff --git a/locale/pl-PL/treestyletab/treestyletab.dtd b/locale/pl-PL/treestyletab/treestyletab.dtd index 2c9b1ff7..a22409f6 100644 --- a/locale/pl-PL/treestyletab/treestyletab.dtd +++ b/locale/pl-PL/treestyletab/treestyletab.dtd @@ -119,11 +119,11 @@ - + When a tab gets focus, expand his tree and collapse others automatically - - - + + + diff --git a/locale/ru-RU/treestyletab/treestyletab.dtd b/locale/ru-RU/treestyletab/treestyletab.dtd index c43d7c15..7a8f4a2d 100755 --- a/locale/ru-RU/treestyletab/treestyletab.dtd +++ b/locale/ru-RU/treestyletab/treestyletab.dtd @@ -120,11 +120,11 @@ - - - - - + + + + + diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd index b8e12f3e..18fbdbec 100644 --- a/locale/zh-CN/treestyletab/treestyletab.dtd +++ b/locale/zh-CN/treestyletab/treestyletab.dtd @@ -118,10 +118,10 @@ - - - - + + + + diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd index fdb19744..e0f53920 100644 --- a/locale/zh-TW/treestyletab/treestyletab.dtd +++ b/locale/zh-TW/treestyletab/treestyletab.dtd @@ -120,11 +120,11 @@ - - - - - + + + + + diff --git a/tests/unit/treestyletab_treeUtils.test.js b/tests/unit/treestyletab_treeUtils.test.js index 404e2909..fe3f0805 100644 --- a/tests/unit/treestyletab_treeUtils.test.js +++ b/tests/unit/treestyletab_treeUtils.test.js @@ -14,7 +14,7 @@ sv.getLastDescendantTab(tab) sv.getChildIndex(tab, parent) sv.isSubtreeCollapsed(parent) -sv.removeTabSubTree(tabs, onlychildren) +sv.removeTabSubtree(tabs, onlychildren) sv.collapseExpandAllSubtree(collapse) sv.changeTabbarPosition()