appDisplay: Don't show NoDisplay items in the Applications tab

This commit is contained in:
Jasper St. Pierre 2011-08-29 15:29:49 -04:00
parent 0133c6e174
commit 5d138e1b79
2 changed files with 4 additions and 2 deletions

View File

@ -205,6 +205,7 @@ ViewByCategories.prototype = {
if (nextType == GMenu.TreeItemType.ENTRY) { if (nextType == GMenu.TreeItemType.ENTRY) {
var entry = iter.get_entry(); var entry = iter.get_entry();
var app = this._appSystem.lookup_app_by_tree_entry(entry); var app = this._appSystem.lookup_app_by_tree_entry(entry);
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) {
this._loadCategory(iter.get_directory(), appList); this._loadCategory(iter.get_directory(), appList);

View File

@ -582,6 +582,7 @@ shell_app_system_get_all (ShellAppSystem *self)
while (g_hash_table_iter_next (&iter, &key, &value)) while (g_hash_table_iter_next (&iter, &key, &value))
{ {
ShellApp *app = value; ShellApp *app = value;
if (!g_desktop_app_info_get_nodisplay (shell_app_get_app_info (app)))
result = g_slist_prepend (result, app); result = g_slist_prepend (result, app);
} }
return result; return result;