Cancel to open bookmarks if "how to open the bookmark folder?" confirmation dialog is canceled.
See: https://github.com/piroor/treestyletab/issues/1155
This commit is contained in:
parent
55e6927cc2
commit
02211ea227
@ -335,7 +335,8 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (button < 0)
|
if (button < 0)
|
||||||
button = 1;
|
return this.kGROUP_BOOKMARK_CANCEL;
|
||||||
|
|
||||||
var behaviors = [
|
var behaviors = [
|
||||||
this.kGROUP_BOOKMARK_SUBTREE | dummyTabFlag,
|
this.kGROUP_BOOKMARK_SUBTREE | dummyTabFlag,
|
||||||
this.kGROUP_BOOKMARK_SEPARATE
|
this.kGROUP_BOOKMARK_SEPARATE
|
||||||
|
@ -297,7 +297,8 @@ var TreeStyleTabBookmarksService = inherit(TreeStyleTabConstants, {
|
|||||||
var TST = aBrowserWindow.TreeStyleTabService;
|
var TST = aBrowserWindow.TreeStyleTabService;
|
||||||
|
|
||||||
result.behavior = TST.openGroupBookmarkBehavior();
|
result.behavior = TST.openGroupBookmarkBehavior();
|
||||||
if (result.behavior & this.kGROUP_BOOKMARK_SUBTREE) {
|
if (result.behavior != this.kGROUP_BOOKMARK_CANCEL &&
|
||||||
|
result.behavior & this.kGROUP_BOOKMARK_SUBTREE) {
|
||||||
log('handleTabsOpenProcess: open as a group');
|
log('handleTabsOpenProcess: open as a group');
|
||||||
let treeStructure = result.behavior & this.kGROUP_BOOKMARK_DONT_RESTORE_TREE_STRUCTURE ?
|
let treeStructure = result.behavior & this.kGROUP_BOOKMARK_DONT_RESTORE_TREE_STRUCTURE ?
|
||||||
null :
|
null :
|
||||||
@ -429,6 +430,9 @@ PlacesUIUtils._openTabset = function(aItemsToOpen, aEvent, aWindow, ...aArgs) {
|
|||||||
var result = BS.handleTabsOpenProcess(where, aEvent, w, ids, uris, aItemsToOpen, this.__treestyletab__folderName);
|
var result = BS.handleTabsOpenProcess(where, aEvent, w, ids, uris, aItemsToOpen, this.__treestyletab__folderName);
|
||||||
log(' result: ', result);
|
log(' result: ', result);
|
||||||
|
|
||||||
|
if (result.behavior == this.kGROUP_BOOKMARK_CANCEL)
|
||||||
|
return;
|
||||||
|
|
||||||
var tabs = TST.doAndGetNewTabs((function() {
|
var tabs = TST.doAndGetNewTabs((function() {
|
||||||
this.__treestyletab__openTabset(aItemsToOpen, aEvent, aWindow, ...aArgs);
|
this.__treestyletab__openTabset(aItemsToOpen, aEvent, aWindow, ...aArgs);
|
||||||
}).bind(this), w.gBrowser);
|
}).bind(this), w.gBrowser);
|
||||||
|
@ -235,6 +235,7 @@ var TreeStyleTabConstants = Object.freeze({
|
|||||||
kGROUP_BOOKMARK_USE_DUMMY_FORCE : 1024,
|
kGROUP_BOOKMARK_USE_DUMMY_FORCE : 1024,
|
||||||
kGROUP_BOOKMARK_DONT_RESTORE_TREE_STRUCTURE : 512,
|
kGROUP_BOOKMARK_DONT_RESTORE_TREE_STRUCTURE : 512,
|
||||||
kGROUP_BOOKMARK_EXPAND_ALL_TREE : 2048,
|
kGROUP_BOOKMARK_EXPAND_ALL_TREE : 2048,
|
||||||
|
kGROUP_BOOKMARK_CANCEL : -1,
|
||||||
|
|
||||||
|
|
||||||
CONTENT_SCRIPT : 'chrome://treestyletab/content/content-utils.js',
|
CONTENT_SCRIPT : 'chrome://treestyletab/content/content-utils.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user