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

This commit is contained in:
mozilla.mano@sent.com 2008-04-07 22:51:23 -07:00
Родитель 141d486d96
Коммит a5bccfb40b
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -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"));