Bug 408660 - Should be able to set icons for special folders in the organizer. r=dietrich.

git-svn-id: svn://10.0.0.236/trunk@249773 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mozilla.mano%sent.com
2008-04-08 05:51:23 +00:00
parent c22cc7765b
commit c8e6afa61b

View File

@@ -890,6 +890,7 @@ PlacesTreeView.prototype = {
properties = new Array();
var nodeType = node.type;
if (PlacesUtils.containerTypes.indexOf(nodeType) != -1) {
var itemId = node.itemId;
if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY) {
properties.push(this._getAtomFor("query"));
if (this._showQueryAsFolder)
@@ -897,13 +898,23 @@ PlacesTreeView.prototype = {
}
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER ||
nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT) {
if (PlacesUtils.annotations.itemHasAnnotation(node.itemId,
if (PlacesUtils.annotations.itemHasAnnotation(itemId,
LMANNO_FEEDURI))
properties.push(this._getAtomFor("livemark"));
else if (PlacesUtils.bookmarks.getFolderIdForItem(node.itemId) ==
else if (PlacesUtils.bookmarks.getFolderIdForItem(itemId) ==
PlacesUtils.tagsFolderId)
properties.push(this._getAtomFor("tagContainer"));
}
if (itemId != -1) {
var oqAnno;
try {
oqAnno = PlacesUtils.annotations.getItemAnnotation(itemId, ORGANIZER_QUERY_ANNO);
properties.push(this._getAtomFor("OrganizerQuery_" + oqAnno));
}
catch (ex) { /* not a special query */ }
}
}
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
properties.push(this._getAtomFor("separator"));