diff --git a/xpfe/components/bookmarks/resources/bookmarks.js b/xpfe/components/bookmarks/resources/bookmarks.js index 532c0200314..378a381af6f 100644 --- a/xpfe/components/bookmarks/resources/bookmarks.js +++ b/xpfe/components/bookmarks/resources/bookmarks.js @@ -205,7 +205,7 @@ function doPaste() if (RDFC.IndexOf(IDRes) > 0) { - dump("Unable to add ID:'" + theID + "' as its already in this folder.\n"); + debug("Unable to add ID:'" + theID + "' as its already in this folder.\n"); continue; } @@ -506,17 +506,29 @@ function fillContextMenu(name) var select_list = treeNode.selectedItems; - debug("# of Nodes selected: " + treeNode.selectedItems.length); + debug("# of Nodes selected: " + treeNode.selectedItems.length + "\n"); // perform intersection of commands over selected nodes var cmdArray = new Array(); - - for (var nodeIndex=0; nodeIndexAppendElement(kNC_BookmarkCommand_DeleteBookmark); } - if (isBookmarkFolder) + if (isBookmarkFolder && (source != kNC_BookmarksRoot)) { cmdArray->AppendElement(kNC_BookmarkCommand_DeleteBookmarkFolder); } @@ -3640,6 +3640,10 @@ nsBookmarksService::ReadBookmarks() NS_ASSERTION(NS_SUCCEEDED(rv), "Unable to make NC:BookmarksRoot a sequence"); if (NS_FAILED(rv)) return rv; + // Make sure bookmark's root has the correct type + rv = mInner->Assert(kNC_BookmarksRoot, kRDF_type, kNC_Folder, PR_TRUE); + if (NS_FAILED(rv)) return rv; + PRBool foundIERoot = PR_FALSE; #ifdef DEBUG