[gnome-shell] appDisplay: Don't show NoDisplay items in the Applications tab
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] appDisplay: Don't show NoDisplay items in the Applications tab
- Date: Mon, 29 Aug 2011 19:56:18 +0000 (UTC)
commit 5d138e1b7932daa8e6cba13074478c25a21e6003
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Aug 29 15:29:49 2011 -0400
appDisplay: Don't show NoDisplay items in the Applications tab
js/ui/appDisplay.js | 3 ++-
src/shell-app-system.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 1a6e28a..8669d2b 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -205,7 +205,8 @@ ViewByCategories.prototype = {
if (nextType == GMenu.TreeItemType.ENTRY) {
var entry = iter.get_entry();
var app = this._appSystem.lookup_app_by_tree_entry(entry);
- appList.push(app);
+ if (!entry.get_app_info().get_nodisplay())
+ appList.push(app);
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {
this._loadCategory(iter.get_directory(), appList);
}
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 1d89800..4bdfc80 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -582,7 +582,8 @@ shell_app_system_get_all (ShellAppSystem *self)
while (g_hash_table_iter_next (&iter, &key, &value))
{
ShellApp *app = value;
- result = g_slist_prepend (result, app);
+ if (!g_desktop_app_info_get_nodisplay (shell_app_get_app_info (app)))
+ result = g_slist_prepend (result, app);
}
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]