From 8ef4ae0f9b6c948c2f19df2b34455e439dd1d74e Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 31 Jul 2009 07:02:13 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=83=96=E3=81=AE=E3=83=84=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=81=E3=83=83=E3=83=97=E3=81=A7=E6=8A=98=E3=82=8A?= =?UTF-8?q?=E3=81=9F=E3=81=9F=E3=81=BE=E3=82=8C=E3=81=9F=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=81=AE=E3=83=A9=E3=83=99=E3=83=AB=E3=82=82=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= 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@4859 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 36 +++++++++++++++++++ content/treestyletab/treestyletabbrowser.js | 12 +------ .../treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- .../ja/treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- .../treestyletab/treestyletab.properties | 4 +-- 11 files changed, 55 insertions(+), 29 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 6f489dcf..b04b0b49 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -2211,6 +2211,42 @@ catch(e) { this.tabbarWidthResetting = false; } }, + + handleTooltip : function(aEvent, aTab) + { + var label; + var collapsed = aTab.getAttribute(this.kSUBTREE_COLLAPSED) == 'true'; + + if (collapsed) { + let base = parseInt(aTab.getAttribute(this.kNEST) || 0); + label = [aTab].concat(this.getDescendantTabs(aTab)) + .map(function(aTab) { + let label = '* '+aTab.getAttribute('label'); + let nest = parseInt(aTab.getAttribute(this.kNEST) || 0) - base; + for (let i = 0; i < nest; i++) + { + label = ' '+label; + } + return label; + }, this) + .join('\n'); + } + + if (aTab.getAttribute(this.kTWISTY_HOVER) == 'true') { + let key = collapsed ? + 'tooltip.expandSubtree' : + 'tooltip.collapseSubtree' ; + label = label || aTab.getAttribute('label'); + label = label ? + this.stringbundle.getFormattedString(key+'.labeled', [label]) : + this.stringbundle.getString(key) ; + } + + if (label) + aEvent.target.setAttribute('label', label); + + return label; + }, /* Tree Style Tabの初期化が行われる前に復元されたセッションについてツリー構造を復元 */ diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 1ccba9c9..9aa9c2aa 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -411,17 +411,7 @@ TreeStyleTabBrowser.prototype = { b.createTooltip.toSource().replace( 'if (tn.hasAttribute("label")) {', diff --git a/locale/de-DE/treestyletab/treestyletab.properties b/locale/de-DE/treestyletab/treestyletab.properties index 6cbef18f..b79b56e7 100644 --- a/locale/de-DE/treestyletab/treestyletab.properties +++ b/locale/de-DE/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=Stellt Tabs in einer Baumstukur dar tooltip.collapseSubtree=Zweig zuklappen -tooltip.collapseSubtree.labeled=Zweig zuklappen ( %S ) +tooltip.collapseSubtree.labeled=Zweig zuklappen:\n%S tooltip.expandSubtree=Zweig aufklappen -tooltip.expandSubtree.labeled=Zweig aufklappen ( %S ) +tooltip.expandSubtree.labeled=Zweig aufklappen:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/en-US/treestyletab/treestyletab.properties b/locale/en-US/treestyletab/treestyletab.properties index 2d4a46b5..1ddd5c3a 100644 --- a/locale/en-US/treestyletab/treestyletab.properties +++ b/locale/en-US/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=Show tabs like a tree. tooltip.collapseSubtree=Collapse Tree -tooltip.collapseSubtree.labeled=Collapse Tree ( %S ) +tooltip.collapseSubtree.labeled=Collapse Tree:\n%S tooltip.expandSubtree=Expand Tree -tooltip.expandSubtree.labeled=Expand Tree ( %S ) +tooltip.expandSubtree.labeled=Expand Tree:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/es-ES/treestyletab/treestyletab.properties b/locale/es-ES/treestyletab/treestyletab.properties index 16830558..f51b8c29 100644 --- a/locale/es-ES/treestyletab/treestyletab.properties +++ b/locale/es-ES/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab (Pestaテアas estilo extensions.treestyletab@piro.sakura.ne.jp.description=Muestra las pestaテアas en vista de テ。rbol tooltip.collapseSubtree=Colapsar テ。rbol -tooltip.collapseSubtree.labeled=Colapsar テ。rbol ( %S ) +tooltip.collapseSubtree.labeled=Colapsar テ。rbol:\n%S tooltip.expandSubtree=Expandir テ。rbol -tooltip.expandSubtree.labeled=Expandir テ。rbol ( %S ) +tooltip.expandSubtree.labeled=Expandir テ。rbol:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/it-IT/treestyletab/treestyletab.properties b/locale/it-IT/treestyletab/treestyletab.properties index ff34acd1..6fd3d19e 100644 --- a/locale/it-IT/treestyletab/treestyletab.properties +++ b/locale/it-IT/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=Permette di visualizzare la barra delle schede in forma di albero tooltip.collapseSubtree=Contrai tutti -tooltip.collapseSubtree.labeled=Contrai tutti ( %S ) +tooltip.collapseSubtree.labeled=Contrai tutti:\n%S tooltip.expandSubtree=Espandi tutti -tooltip.expandSubtree.labeled=Espandi tutti ( %S ) +tooltip.expandSubtree.labeled=Espandi tutti:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/ja/treestyletab/treestyletab.properties b/locale/ja/treestyletab/treestyletab.properties index 71ddad6f..1de8e964 100644 --- a/locale/ja/treestyletab/treestyletab.properties +++ b/locale/ja/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=繝繝ェ繝シ蝙九ち繝 extensions.treestyletab@piro.sakura.ne.jp.description=繧ソ繝悶r繝繝ェ繝シ迥カ縺ォ陦ィ遉コ縺励∪縺吶 tooltip.collapseSubtree=繝繝ェ繝シ繧偵◆縺溘 -tooltip.collapseSubtree.labeled=繝繝ェ繝シ繧偵◆縺溘シ %S シ +tooltip.collapseSubtree.labeled=繝繝ェ繝シ繧偵◆縺溘:\n%S tooltip.expandSubtree=繝繝ェ繝シ繧貞ア暮幕縺吶k -tooltip.expandSubtree.labeled=繝繝ェ繝シ繧貞ア暮幕縺吶kシ %S シ +tooltip.expandSubtree.labeled=繝繝ェ繝シ繧貞ア暮幕縺吶k:\n%S dropLinkOnTab.title=繝峨Ο繝繝励&繧後◆繝ェ繝ウ繧ッ繧偵←縺ョ繧医≧縺ォ髢九″縺セ縺吶°シ dropLinkOnTab.text=繝ェ繝ウ繧ッ縺後ち繝悶↓繝峨Ο繝繝励&繧後∪縺励◆縲ゅヤ繝ェ繝シ蝙九ち繝悶ッ縲√ち繝悶↓繝峨Ο繝繝励&繧後◆繝ェ繝ウ繧ッ繧呈眠縺励>蟄舌ち繝悶→縺励※髢九¥縺薙→縺後〒縺阪∪縺吶ゅ←縺ョ繧医≧縺ォ謇ア縺縺セ縺吶°シ diff --git a/locale/pl-PL/treestyletab/treestyletab.properties b/locale/pl-PL/treestyletab/treestyletab.properties index bca041ec..2cbe9098 100644 --- a/locale/pl-PL/treestyletab/treestyletab.properties +++ b/locale/pl-PL/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=Wyナ孩ietla karty w ukナBdzie drzewa. tooltip.collapseSubtree=Zwiナ drzewo -tooltip.collapseSubtree.labeled=Zwiナ drzewo ( %S ) +tooltip.collapseSubtree.labeled=Zwiナ drzewo:\n%S tooltip.expandSubtree=Rozwiナ drzewo -tooltip.expandSubtree.labeled=Rozwiナ drzewo ( %S ) +tooltip.expandSubtree.labeled=Rozwiナ drzewo:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/ru-RU/treestyletab/treestyletab.properties b/locale/ru-RU/treestyletab/treestyletab.properties index 4873f867..d9525c22 100755 --- a/locale/ru-RU/treestyletab/treestyletab.properties +++ b/locale/ru-RU/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=ミ樮ひセミアムミーミカミオミスミクミオ ミイミコミサミーミエミセミコ ミイ ミイミクミエミオ ミエミオムミオミイミー. tooltip.collapseSubtree=ミ。ミイミオムミスムτび ミエミオムミオミイミセ -tooltip.collapseSubtree.labeled=ミ。ミイミオムミスムτび ミエミオムミオミイミセ ( %S ) +tooltip.collapseSubtree.labeled=ミ。ミイミオムミスムτび ミエミオムミオミイミセ:\n%S tooltip.expandSubtree=ミミーミキミイミオムミスムτび ミエミオムミオミイミセ -tooltip.expandSubtree.labeled=ミミーミキミイミオムミスムτび ミエミオムミオミイミセ ( %S ) +tooltip.expandSubtree.labeled=ミミーミキミイミオムミスムτび ミエミオムミオミイミセ:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/zh-CN/treestyletab/treestyletab.properties b/locale/zh-CN/treestyletab/treestyletab.properties index 91a88545..e40c67f0 100644 --- a/locale/zh-CN/treestyletab/treestyletab.properties +++ b/locale/zh-CN/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=莉・譬醍噪蠖「蠑乗仞遉コ譬遲セ縲 tooltip.collapseSubtree=謚伜匠譬 -tooltip.collapseSubtree.labeled=謚伜匠譬 ( %S ) +tooltip.collapseSubtree.labeled=謚伜匠譬:\n%S tooltip.expandSubtree=螻募シ譬 -tooltip.expandSubtree.labeled=螻募シ譬 ( %S ) +tooltip.expandSubtree.labeled=螻募シ譬:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link? diff --git a/locale/zh-TW/treestyletab/treestyletab.properties b/locale/zh-TW/treestyletab/treestyletab.properties index e251d3fd..5325e789 100644 --- a/locale/zh-TW/treestyletab/treestyletab.properties +++ b/locale/zh-TW/treestyletab/treestyletab.properties @@ -2,9 +2,9 @@ extensions.treestyletab@piro.sakura.ne.jp.name=Tree Style Tab extensions.treestyletab@piro.sakura.ne.jp.description=莉・讓ケ迢逶ョ骭鬘ッ遉コ蛻鬆√ tooltip.collapseSubtree=鞫コ逍頑ィケ -tooltip.collapseSubtree.labeled=鞫コ逍頑ィケシ%Sシ +tooltip.collapseSubtree.labeled=鞫コ逍頑ィケ:\n%S tooltip.expandSubtree=螻暮幕讓ケ -tooltip.expandSubtree.labeled=螻暮幕讓ケシ%Sシ +tooltip.expandSubtree.labeled=螻暮幕讓ケ:\n%S dropLinkOnTab.title=How to open the dropped link? dropLinkOnTab.text=A link has been dropped onto existing tab. Tree Style Tab can open the link as a new child tab. How to deal with the link?