Bug 414974 - Disallow removing special queries from the left pane. r=dietrich, a=schrep.

This commit is contained in:
mozilla.mano@sent.com 2008-01-31 10:10:40 -08:00
parent afd8b4efe2
commit 13e9731037

View File

@ -276,10 +276,14 @@ PlacesController.prototype = {
if (nodes[i] == root)
return false;
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
// Disallow removing shortcuts from the left pane
var nodeItemId = nodes[i].itemId;
if (PlacesUtils.annotations
.itemHasAnnotation(nodeItemId, ORGANIZER_QUERY_ANNO))
return false;
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
if (!aIsMoveCommand &&
PlacesUtils.nodeIsFolder(nodes[i]) &&
(nodeItemId == PlacesUtils.toolbarFolderId ||
nodeItemId == PlacesUtils.unfiledBookmarksFolderId ||
nodeItemId == PlacesUtils.bookmarksMenuFolderId))