From 989e934c8230791c8bcaab5a5bfdee9d71130b00 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 10 Jun 2009 03:34:47 +0000 Subject: [PATCH] =?UTF-8?q?*=20closeRootBehavior=E3=81=AE=E5=AE=9A?= =?UTF-8?q?=E6=95=B0=E3=81=AE=E5=80=A4=E3=82=92=E5=A4=89=E6=9B=B4=20*=20?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E9=A0=85=E7=9B=AE=E8=BF=BD=E5=8A=A0?= 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@4513 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.js | 10 ++++++++++ content/treestyletab/config.xul | 20 +++++++++++++++++--- content/treestyletab/treestyletabbrowser.js | 2 +- defaults/preferences/treestyletab.js | 4 ++-- locale/de-DE/treestyletab/treestyletab.dtd | 10 ++++++---- locale/en-US/treestyletab/treestyletab.dtd | 10 ++++++---- locale/es-ES/treestyletab/treestyletab.dtd | 10 ++++++---- locale/it-IT/treestyletab/treestyletab.dtd | 10 ++++++---- locale/ja/treestyletab/treestyletab.dtd | 10 ++++++---- locale/pl-PL/treestyletab/treestyletab.dtd | 10 ++++++---- locale/ru-RU/treestyletab/treestyletab.dtd | 9 +++++---- locale/zh-CN/treestyletab/treestyletab.dtd | 9 +++++---- locale/zh-TW/treestyletab/treestyletab.dtd | 9 +++++---- 13 files changed, 81 insertions(+), 42 deletions(-) diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js index 56c8735a..b291ce69 100644 --- a/content/treestyletab/config.js +++ b/content/treestyletab/config.js @@ -172,3 +172,13 @@ function updateAutoHideModeLabel() node.setAttribute(attr, label); }); } + +function updateCloseRootBehaviorCheck() +{ + var closeParentBehavior = document.getElementById('extensions.treestyletab.closeParentBehavior-radiogroup').value; + var closeRootBehavior = document.getElementById('extensions.treestyletab.closeRootBehavior-check'); + if (closeParentBehavior == 0) + closeRootBehavior.removeAttribute('disabled'); + else + closeRootBehavior.setAttribute('disabled', true); +} diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index 9b90c4f7..8d68c497 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -506,7 +506,8 @@ - + + @@ -551,9 +555,19 @@ + orient="vertical" + oncommand="updateCloseRootBehaviorCheck();"> - + + + + + + diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 7a34ee17..58f11390 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1509,7 +1509,7 @@ TreeStyleTabBrowser.prototype = { CLOSE_PARENT_BEHAVIOR_ESCALATE_ALL : 0, CLOSE_PARENT_BEHAVIOR_DETACH : 1, CLOSE_PARENT_BEHAVIOR_CLOSE : 2, - CLOSE_ROOT_BEHAVIOR_ESCALATE_FIRST : 0, + CLOSE_ROOT_BEHAVIOR_ESCALATE_FIRST : 3, CLOSE_ROOT_BEHAVIOR_DETACH : 1, onTabMove : function(aEvent) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index ce492469..4caa608c 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -91,11 +91,11 @@ pref("extensions.treestyletab.focusMode", 1); */ pref("extensions.treestyletab.closeParentBehavior", 0); /* - 0 = escalate only the first child tab to the root level + 3 = escalate only the first child tab to the root level 1 = escalate all children to new roots (=detach all children) Note: this affects only when closeParentBehavior == 0 */ -pref("extensions.treestyletab.closeRootBehavior", 0); +pref("extensions.treestyletab.closeRootBehavior", 3); 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 e1336391..5253c954 100644 --- a/locale/de-DE/treestyletab/treestyletab.dtd +++ b/locale/de-DE/treestyletab/treestyletab.dtd @@ -110,12 +110,14 @@ - - - + + + - + + diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd index a6681ad6..21a4725e 100644 --- a/locale/en-US/treestyletab/treestyletab.dtd +++ b/locale/en-US/treestyletab/treestyletab.dtd @@ -110,10 +110,12 @@ - - - - + + + + + + diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd index f884944c..ac8bfd64 100644 --- a/locale/es-ES/treestyletab/treestyletab.dtd +++ b/locale/es-ES/treestyletab/treestyletab.dtd @@ -110,10 +110,12 @@ - - - - + + + + + + diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd index 91721600..01776c2e 100644 --- a/locale/it-IT/treestyletab/treestyletab.dtd +++ b/locale/it-IT/treestyletab/treestyletab.dtd @@ -110,10 +110,12 @@ - - - - + + + + + + diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd index 0b982017..9daa55bf 100644 --- a/locale/ja/treestyletab/treestyletab.dtd +++ b/locale/ja/treestyletab/treestyletab.dtd @@ -110,10 +110,12 @@ - - - - + + + + + + diff --git a/locale/pl-PL/treestyletab/treestyletab.dtd b/locale/pl-PL/treestyletab/treestyletab.dtd index e4ab80e4..d3fe839e 100644 --- a/locale/pl-PL/treestyletab/treestyletab.dtd +++ b/locale/pl-PL/treestyletab/treestyletab.dtd @@ -110,10 +110,12 @@ - - - - + + + + + + diff --git a/locale/ru-RU/treestyletab/treestyletab.dtd b/locale/ru-RU/treestyletab/treestyletab.dtd index 510a951b..60344af8 100755 --- a/locale/ru-RU/treestyletab/treestyletab.dtd +++ b/locale/ru-RU/treestyletab/treestyletab.dtd @@ -110,10 +110,11 @@ - - - - + + + + + diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd index e73b511b..b9aedf2f 100644 --- a/locale/zh-CN/treestyletab/treestyletab.dtd +++ b/locale/zh-CN/treestyletab/treestyletab.dtd @@ -110,10 +110,11 @@ - - - - + + + + + diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd index 1f5ffa36..72a5e7e0 100644 --- a/locale/zh-TW/treestyletab/treestyletab.dtd +++ b/locale/zh-TW/treestyletab/treestyletab.dtd @@ -107,10 +107,11 @@ - - - - + + + + +