From d9e13abd838b6274d4887b09d701c62da56367d7 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Wed, 17 Feb 2016 16:46:29 +0900 Subject: [PATCH] Redirect users to other vertical tab addons --- .../en-US/treestyletab/treestyletab.properties | 4 ++++ locale/ja/treestyletab/treestyletab.properties | 4 ++++ modules/utils.js | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/locale/en-US/treestyletab/treestyletab.properties b/locale/en-US/treestyletab/treestyletab.properties index f3211932..ed62f5fb 100644 --- a/locale/en-US/treestyletab/treestyletab.properties +++ b/locale/en-US/treestyletab/treestyletab.properties @@ -53,3 +53,7 @@ compatibility_STM_warning_never=Don't show this dialog anymore. closeTabsToTheEnd_vertical_label=Close Tabs to the Bottom closeTabsToTheEnd_vertical_accesskey=b + + +migration.treeNeverRevoked.title=Tree features of Tree Style Tab is now activated mandatorily! +migration.treeNeverRevoked.text=Note: Some preferences to disable tree features permanently now disappeared from Tree Style Tab. If you just require only a vertical tab bar without tree features, then please switch to an alternative addon e.g. "Vertical Tabs", "Side Tabs", or others. diff --git a/locale/ja/treestyletab/treestyletab.properties b/locale/ja/treestyletab/treestyletab.properties index 38b9763d..d216d7c7 100644 --- a/locale/ja/treestyletab/treestyletab.properties +++ b/locale/ja/treestyletab/treestyletab.properties @@ -53,3 +53,7 @@ compatibility_STM_warning_never=今後この確認を表示しない closeTabsToTheEnd_vertical_label=下のタブをすべて閉じる closeTabsToTheEnd_vertical_accesskey=b + + +migration.treeNeverRevoked.title=ツリー型タブのツリー表示が強制的に有効化されました +migration.treeNeverRevoked.text=注意:ツリー型タブからツリー表示を無効化するためのいくつかの設定が廃止されました。ツリー表示を常時無効化して縦型のタブバーのみを利用したい場合には、「Vertical Tabs」「Side Tabs」などの代替アドオンを利用して下さい。 diff --git a/modules/utils.js b/modules/utils.js index 55e8dcaa..d01eb75c 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -69,7 +69,7 @@ XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabConstants', 'resource://treestyletab-modules/constants.js', 'TreeStyleTabConstants'); const TST_PREF_PREFIX = 'extensions.treestyletab.'; -const TST_PREF_VERSION = 12; +const TST_PREF_VERSION = 13; var TreeStyleTabUtils = { @@ -234,6 +234,20 @@ var TreeStyleTabUtils = { if (backupValue !== null) prefs.setPref('browser.tabs.insertRelatedAfterCurrent', backupValue); } + case 12: + { + let orient = /^(left|right)$/.test(this.getTreePref('tabbar.position')) ? 'vertical' : 'horizontal' ; + let disabledCollapseExpand = this.getTreePref('allowSubtreeCollapseExpand.' + orient) === false; + let disabledIndent = this.getTreePref('indent.' + orient) == 0 || + this.getTreePref('indent.min.' + orient) == 0; + let treeWasRevoked = disabledCollapseExpand || (disabledIndent && orient == 'vertical'); + if (treeWasRevoked) { + Services.prompt.alert(this.browserWindow, + this.treeBundle.getString('migration.treeNeverRevoked.title'), + this.treeBundle.getString('migration.treeNeverRevoked.text') + ); + } + } default: for (let i = 0, maxi = orientalPrefs.length; i < maxi; i++) {