From 7198c8b4ada5951cec149d8044b3f920f95f3e4f Mon Sep 17 00:00:00 2001 From: "sspitzer%mozilla.org" Date: Fri, 20 Jul 2007 04:18:44 +0000 Subject: [PATCH] fix for bug #388860: New folder button on Add Bookmark panel does nothing r=dietrich --- browser/components/places/content/bookmarkProperties.js | 2 +- browser/components/places/content/bookmarkProperties.xul | 2 +- browser/components/places/content/tree.xml | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/browser/components/places/content/bookmarkProperties.js b/browser/components/places/content/bookmarkProperties.js index 6b32c35832d..95c88386009 100755 --- a/browser/components/places/content/bookmarkProperties.js +++ b/browser/components/places/content/bookmarkProperties.js @@ -1022,7 +1022,7 @@ var BookmarkPropertiesPanel = { expander.className = "up"; expander.setAttribute("tooltiptext", expander.getAttribute("tooltiptextup")); - document.documentElement.buttons = "accept,cancel, extra2"; + document.documentElement.buttons = "accept,cancel,extra2"; if (!this._folderTree.treeBoxObject.view.isContainerOpen(0)) this._folderTree.treeBoxObject.view.toggleOpenState(0); diff --git a/browser/components/places/content/bookmarkProperties.xul b/browser/components/places/content/bookmarkProperties.xul index e64aaf200fd..8bfe2ec9d7b 100755 --- a/browser/components/places/content/bookmarkProperties.xul +++ b/browser/components/places/content/bookmarkProperties.xul @@ -164,7 +164,7 @@ persist="height" onselect="BookmarkPropertiesPanel.onFolderTreeSelect();" showRoot="true" - place="place:folder=2&group=3&excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1" + place="place:folder=2&group=3&excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1&queryType=1" hidecolumnpicker="true"> diff --git a/browser/components/places/content/tree.xml b/browser/components/places/content/tree.xml index 6afa944165f..5e988f9e407 100644 --- a/browser/components/places/content/tree.xml +++ b/browser/components/places/content/tree.xml @@ -439,8 +439,11 @@ // there is no insertion point for history queries // so bail out now and save a lot of work when updating commands var options = asQuery(this.getResult().root).queryOptions; - if (options.queryType == options.QUERY_TYPE_HISTORY) + if (options.queryType == options.QUERY_TYPE_HISTORY) { + NS_ASSERT(this.getResult().root.folderCount == 0, + "wrong queryType, see bug #388860"); return null; + } var orientation = NHRVO.DROP_AFTER; // If there is no selection, insert at the end of the container.