appDisplay: Do not show NoDisplay directories either

https://bugzilla.gnome.org/show_bug.cgi?id=658176
This commit is contained in:
Jasper St. Pierre 2011-09-04 19:15:13 -04:00
parent 0af108211c
commit 3b6d907577

View File

@ -208,6 +208,7 @@ ViewByCategories.prototype = {
if (!entry.get_app_info().get_nodisplay()) if (!entry.get_app_info().get_nodisplay())
appList.push(app); appList.push(app);
} else if (nextType == GMenu.TreeItemType.DIRECTORY) { } else if (nextType == GMenu.TreeItemType.DIRECTORY) {
if (!dir.get_is_nodisplay())
this._loadCategory(iter.get_directory(), appList); this._loadCategory(iter.get_directory(), appList);
} }
} }
@ -262,6 +263,8 @@ ViewByCategories.prototype = {
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) { while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.DIRECTORY) { if (nextType == GMenu.TreeItemType.DIRECTORY) {
var dir = iter.get_directory(); var dir = iter.get_directory();
if (dir.get_is_nodisplay())
continue;
this._addCategory(dir.get_name(), i, dir); this._addCategory(dir.get_name(), i, dir);
i++; i++;
} }