зеркало из https://github.com/mozilla/gecko-dev.git
Bug 534914: don't display "smart folders" or bookmark separators in our bookmark list since they aren't useful, r=mfinkle
This commit is contained in:
Родитель
7550828074
Коммит
f314dbc4b7
|
@ -805,17 +805,27 @@
|
|||
|
||||
let options = PlacesUtils.history.getNewQueryOptions();
|
||||
options.queryType = (this._type == "bookmarks" ? options.QUERY_TYPE_BOOKMARKS : options.QUERY_TYPE_HISTORY);
|
||||
|
||||
// Exclude "query" items (e.g. "smart folders")
|
||||
options.excludeQueries = true;
|
||||
|
||||
let query = PlacesUtils.history.getNewQuery();
|
||||
|
||||
if (aFolder)
|
||||
query.setFolders([aFolder], 1);
|
||||
|
||||
let result = PlacesUtils.history.executeQuery(query, options);
|
||||
let rootNode = result.root;
|
||||
rootNode.containerOpen = true;
|
||||
|
||||
let cc = rootNode.childCount;
|
||||
for (var i=0; i<cc; ++i) {
|
||||
var node = rootNode.getChild(i);
|
||||
let node = rootNode.getChild(i);
|
||||
|
||||
// Ignore separators
|
||||
if (node.type == node.RESULT_TYPE_SEPARATOR)
|
||||
continue;
|
||||
|
||||
if (this._mode == "folders" && node.type == node.RESULT_TYPE_FOLDER) {
|
||||
items.push(node);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче