From 8a9cae05e47c3c61187adf7610be55953708d952 Mon Sep 17 00:00:00 2001 From: "sspitzer@mozilla.org" Date: Sat, 24 Nov 2007 11:01:46 -0800 Subject: [PATCH] fix for bug #404871: 'Most Visited Starred Pages', 'Recently Starred Pages', 'Recently Visited Starred Pages' don't include bookmarks from the personal toolbar folder r=mano, a=blocking-firefox-3+ --- browser/base/content/browser.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 6c4c0586739..73fcf7e3b23 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -300,11 +300,12 @@ function initPlacesDefaultQueries() { var bookmarksMenuFolder = PlacesUtils.bookmarksMenuFolderId; var unfiledBookmarksFolder = PlacesUtils.unfiledBookmarksFolderId; + var toolbarFolder = PlacesUtils.toolbarFolderId; var tagsFolder = PlacesUtils.tagsFolderId; var defaultIndex = bmsvc.DEFAULT_INDEX; // index = 0, make it the first folder - var placesFolder = bmsvc.createFolder(PlacesUtils.toolbarFolderId, + var placesFolder = bmsvc.createFolder(toolbarFolder, placesFolderTitle, 0); @@ -314,7 +315,9 @@ function initPlacesDefaultQueries() { // exclude queries so that user created "saved searches" // and these queries (added automatically) are excluded var recentlyCreatedBookmarksItem = bmsvc.insertBookmark(placesFolder, - IO.newURI("place:folder=" + bookmarksMenuFolder + "&folder=" + unfiledBookmarksFolder + + IO.newURI("place:folder=" + bookmarksMenuFolder + + "&folder=" + unfiledBookmarksFolder + + "&folder=" + toolbarFolder + "&queryType=" + Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS + "&sort=" + Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING + @@ -324,7 +327,9 @@ function initPlacesDefaultQueries() { defaultIndex, recentlyCreatedBookmarksTitle); var recentlyVisitedBookmarksItem = bmsvc.insertBookmark(placesFolder, - IO.newURI("place:folder=" + bookmarksMenuFolder + "&folder=" + unfiledBookmarksFolder + + IO.newURI("place:folder=" + bookmarksMenuFolder + + "&folder=" + unfiledBookmarksFolder + + "&folder=" + toolbarFolder + "&queryType=" + Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS + "&sort=" + Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING + "&excludeItemIfParentHasAnnotation=livemark%2FfeedURI" + @@ -332,7 +337,9 @@ function initPlacesDefaultQueries() { defaultIndex, recentlyVisitedBookmarksTitle); var mostVisitedBookmarksItem = bmsvc.insertBookmark(placesFolder, - IO.newURI("place:folder=" + bookmarksMenuFolder + "&folder=" + unfiledBookmarksFolder + + IO.newURI("place:folder=" + bookmarksMenuFolder + + "&folder=" + unfiledBookmarksFolder + + "&folder=" + toolbarFolder + "&queryType=" + Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS + "&sort=" + Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING +