mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 20:55:39 +00:00
Bug 414974 - Disallow removing special queries from the left pane. r=dietrich, a=schrep.
This commit is contained in:
parent
afd8b4efe2
commit
13e9731037
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user