From c8e6afa61b3bded1ce08ee9aba79d566906a9e37 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Tue, 8 Apr 2008 05:51:23 +0000 Subject: [PATCH] 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 --- .../browser/components/places/content/treeView.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mozilla/browser/components/places/content/treeView.js b/mozilla/browser/components/places/content/treeView.js index 60acf787a68..44ab9bcd942 100644 --- a/mozilla/browser/components/places/content/treeView.js +++ b/mozilla/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"));