From 6718a1affa6977b7ab9891890ad2d4b11ed78da3 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Thu, 8 Sep 2016 12:29:32 +0900 Subject: [PATCH] Show "cancel" button in the confirmation dialog for bookmark groups --- modules/base.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/base.js b/modules/base.js index 856fab3d..cd07ebc1 100644 --- a/modules/base.js +++ b/modules/base.js @@ -325,11 +325,12 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, { var button = Services.prompt.confirmEx(this.browserWindow, utils.treeBundle.getString('openGroupBookmarkBehavior.title'), utils.treeBundle.getString('openGroupBookmarkBehavior.text'), - (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) + - (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1), + (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) | + (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1) | + (Services.prompt.BUTTON_TITLE_CACNEL * Services.prompt.BUTTON_POS_2), utils.treeBundle.getString('openGroupBookmarkBehavior.subTree'), utils.treeBundle.getString('openGroupBookmarkBehavior.separate'), - null, + '', utils.treeBundle.getString('openGroupBookmarkBehavior.never'), checked ); @@ -339,11 +340,12 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, { var behaviors = [ this.kGROUP_BOOKMARK_SUBTREE | dummyTabFlag, - this.kGROUP_BOOKMARK_SEPARATE + this.kGROUP_BOOKMARK_SEPARATE, + this.kGROUP_BOOKMARK_CANCEL ]; behavior = behaviors[button]; - if (checked.value) { + if (checked.value && button != this.kGROUP_BOOKMARK_CANCEL) { utils.setTreePref('openGroupBookmark.behavior', behavior); } return behavior;