Support read-only containers. Bug 320005, r=ben.

Original committer: bryner%brianryner.com
Original revision: 1.19
Original date: 2005/12/12 21:03:04
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 18:14:34 +00:00
parent 76350949b8
commit b2b963dbb5

View File

@ -187,6 +187,13 @@ NS_IMETHODIMP nsNavHistoryResultNode::GetChild(PRInt32 aIndex,
return NS_OK;
}
/* readonly attribute boolean childrenReadOnly; */
NS_IMETHODIMP nsNavHistoryResultNode::GetChildrenReadOnly(PRBool *aResult)
{
*aResult = PR_TRUE;
return NS_OK;
}
// nsINavBookmarkObserver implementation
/* void onBeginUpdateBatch(); */
@ -508,6 +515,19 @@ nsNavHistoryQueryNode::GetWantAllDetails(PRBool *aResult)
return NS_OK;
}
NS_IMETHODIMP
nsNavHistoryQueryNode::GetChildrenReadOnly(PRBool *aResult)
{
PRInt64 folderId = GetFolderId();
if (folderId == 0) {
*aResult = PR_TRUE;
return NS_OK;
}
return nsNavBookmarks::GetBookmarksService()->GetFolderReadonly(folderId,
aResult);
}
nsresult
nsNavHistoryQueryNode::CreateNode(nsIURI *aBookmark,
nsNavHistoryResultNode **aNode)