ブックマークのツリー構造を復元しないオプションを追加
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4884 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
4e5870b43b
commit
a786cade9a
@ -174,8 +174,11 @@ var TreeStyleTabBookmarksService = {
|
|||||||
) {
|
) {
|
||||||
let openGroupBookmarkBehavior = TreeStyleTabBookmarksService.openGroupBookmarkBehavior();
|
let openGroupBookmarkBehavior = TreeStyleTabBookmarksService.openGroupBookmarkBehavior();
|
||||||
if (openGroupBookmarkBehavior & TreeStyleTabBookmarksService.kGROUP_BOOKMARK_SUBTREE) {
|
if (openGroupBookmarkBehavior & TreeStyleTabBookmarksService.kGROUP_BOOKMARK_SUBTREE) {
|
||||||
let treeStructure = TreeStyleTabBookmarksService.getTreeStructureFromItems(ids);
|
let treeStructure = openGroupBookmarkBehavior & TreeStyleTabBookmarksService.kGROUP_BOOKMARK_DONT_RESTORE_TREE_STRUCTURE ?
|
||||||
|
null :
|
||||||
|
TreeStyleTabBookmarksService.getTreeStructureFromItems(ids) ;
|
||||||
if (
|
if (
|
||||||
|
treeStructure &&
|
||||||
openGroupBookmarkBehavior & TreeStyleTabBookmarksService.kGROUP_BOOKMARK_USE_DUMMY &&
|
openGroupBookmarkBehavior & TreeStyleTabBookmarksService.kGROUP_BOOKMARK_USE_DUMMY &&
|
||||||
treeStructure.filter(function(aParent, aIndex) { return aParent == -1; }).length > 1
|
treeStructure.filter(function(aParent, aIndex) { return aParent == -1; }).length > 1
|
||||||
) {
|
) {
|
||||||
|
@ -94,8 +94,15 @@ function initTabPane()
|
|||||||
function onSyncGroupBookmarkUIToPref()
|
function onSyncGroupBookmarkUIToPref()
|
||||||
{
|
{
|
||||||
ensureGroupBookmarkItems();
|
ensureGroupBookmarkItems();
|
||||||
var behavior = parseInt(gGroupBookmarkRadio.value);
|
var behavior = gGroupBookmarkBehaviorPref.value;
|
||||||
if (gGroupBookmarkUnderParent.checked) behavior += 256;
|
if (behavior & 1) behavior ^= 1;
|
||||||
|
if (behavior & 2) behavior ^= 2;
|
||||||
|
if (behavior & 4) behavior ^= 4;
|
||||||
|
if (behavior & 256) behavior ^= 256;
|
||||||
|
|
||||||
|
behavior |= parseInt(gGroupBookmarkRadio.value);
|
||||||
|
|
||||||
|
if (gGroupBookmarkUnderParent.checked) behavior |= 256;
|
||||||
|
|
||||||
if (behavior & 1)
|
if (behavior & 1)
|
||||||
gGroupBookmarkUnderParent.removeAttribute('disabled');
|
gGroupBookmarkUnderParent.removeAttribute('disabled');
|
||||||
|
@ -1214,6 +1214,7 @@ var TreeStyleTabService = {
|
|||||||
kGROUP_BOOKMARK_SEPARATE : 2,
|
kGROUP_BOOKMARK_SEPARATE : 2,
|
||||||
kGROUP_BOOKMARK_REPLACE : 4,
|
kGROUP_BOOKMARK_REPLACE : 4,
|
||||||
kGROUP_BOOKMARK_USE_DUMMY : 256,
|
kGROUP_BOOKMARK_USE_DUMMY : 256,
|
||||||
|
kGROUP_BOOKMARK_DONT_RESTORE_TREE_STRUCTURE : 512,
|
||||||
|
|
||||||
/* Initializing */
|
/* Initializing */
|
||||||
|
|
||||||
|
@ -83,7 +83,9 @@ pref("extensions.treestyletab.urlbar.loadSameDomainToNewTab.asChild", true);
|
|||||||
pref("extensions.treestyletab.urlbar.invertDefaultBehavior", true);
|
pref("extensions.treestyletab.urlbar.invertDefaultBehavior", true);
|
||||||
// 0 = always ask, 1 = load into the tab, 2 = open new child tab
|
// 0 = always ask, 1 = load into the tab, 2 = open new child tab
|
||||||
pref("extensions.treestyletab.dropLinksOnTab.behavior", 0);
|
pref("extensions.treestyletab.dropLinksOnTab.behavior", 0);
|
||||||
// 0 = always ask, 1 = tree, 2 = separate, 4 = replace, 256 = use dummy tab (for subtree)
|
// 0 = always ask, 1 = tree, 2 = separate, 4 = replace
|
||||||
|
// 256 = use dummy tab (for subtree)
|
||||||
|
// 512 = do not restore tree structure
|
||||||
pref("extensions.treestyletab.openGroupBookmark.behavior", 256);
|
pref("extensions.treestyletab.openGroupBookmark.behavior", 256);
|
||||||
pref("extensions.treestyletab.useEffectiveTLD", true);
|
pref("extensions.treestyletab.useEffectiveTLD", true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user