From a5bccfb40bbcb0fc22b721ea3a081b1c6830ef70 Mon Sep 17 00:00:00 2001 From: "mozilla.mano@sent.com" Date: Mon, 7 Apr 2008 22:51:23 -0700 Subject: [PATCH] Bug 408660 - Should be able to set icons for special folders in the organizer. r=dietrich. --- browser/components/places/content/treeView.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js index 60acf787a68..44ab9bcd942 100644 --- a/browser/components/places/content/treeView.js +++ b/browser/components/places/content/treeView.js @@ -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"));