From 23b1a043ef94aa9aad2575deb9acfd5a2b330d46 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Wed, 21 Aug 2013 17:34:07 +0900 Subject: [PATCH] Add customizability for newly opened temporary groups (#537) --- content/treestyletab/bookmarksOverlay.js | 2 +- defaults/preferences/treestyletab.js | 2 ++ modules/window.js | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/bookmarksOverlay.js b/content/treestyletab/bookmarksOverlay.js index ed442b6b..61b32ba7 100644 --- a/content/treestyletab/bookmarksOverlay.js +++ b/content/treestyletab/bookmarksOverlay.js @@ -418,7 +418,7 @@ var TreeStyleTabBookmarksService = { treeStructure = sv.getTreeStructureFromItems(aIDs, 0); aURLs.unshift(sv.getGroupTabURI({ title: aFolderTitle, - temporary: true + temporary: TreeStyleTabUtils.getTreePref('openGroupBookmark.temporaryGroup') })); } } diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 669b97d3..587f9627 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -395,6 +395,7 @@ pref("extensions.treestyletab.dropLinksOnTab.behavior", 0); * 1 | 512 = Open as a new tree, as a flat group. */ pref("extensions.treestyletab.openGroupBookmark.behavior", 2304); /* 0 | 256 | 2048 */ +pref("extensions.treestyletab.openGroupBookmark.temporaryGroup", true); /** * How to treat tabs dropped to the Bookmarks menu or Bookmarks toolbar. * 0 = Always ask how bookmark the tree. @@ -617,6 +618,7 @@ pref("extensions.multipletab.show.multipletab-selection-item-createSubtree", tru * the first selected tab becomes the parent. */ pref("extensions.treestyletab.createSubtree.underParent", true); +pref("extensions.treestyletab.createSubtree.underParent.temporaryGroup", true); /** * Size of pinned tabs in the vertical tab bar. diff --git a/modules/window.js b/modules/window.js index 7af1686e..23c52010 100644 --- a/modules/window.js +++ b/modules/window.js @@ -1350,7 +1350,9 @@ TreeStyleTabWindow.prototype = { ); var root = utils.getTreePref('createSubtree.underParent') ? - b.addTab(this.getGroupTabURI({ temporary: true })) : + b.addTab(this.getGroupTabURI({ + temporary: utils.getTreePref('createSubtree.underParent.temporaryGroup') + })) : aTabs.shift() ; var self = this; this.Deferred.next(function(self) {