[gnome-shell/wip/desktop-file-index: 2/16] app-system: Remove lookup_app_by_tree_entry
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/desktop-file-index: 2/16] app-system: Remove lookup_app_by_tree_entry
- Date: Wed, 2 Oct 2013 22:23:20 +0000 (UTC)
commit f165cc23c037f8e3d5220037df9b12fda76fd572
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Feb 8 22:54:50 2013 -0500
app-system: Remove lookup_app_by_tree_entry
We want to move away from gnome-menus eventually, so the simple
utility method isn't really worth keeping around. Reimplement it
in the one place that uses it.
https://bugzilla.gnome.org/show_bug.cgi?id=698486
js/ui/appDisplay.js | 5 +++--
src/shell-app-system.c | 19 -------------------
src/shell-app-system.h | 2 --
3 files changed, 3 insertions(+), 23 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 52d7b70..888267d 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -55,8 +55,9 @@ function _loadCategory(dir, view) {
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.ENTRY) {
let entry = iter.get_entry();
- let app = appSystem.lookup_app_by_tree_entry(entry);
- if (!entry.get_app_info().get_nodisplay())
+ let appInfo = entry.get_app_info();
+ let app = appSystem.lookup_app(entry.get_desktop_file_id());
+ if (appInfo.should_show())
view.addApp(app);
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {
let itemDir = iter.get_directory();
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index f312b80..c0971c6 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -450,25 +450,6 @@ shell_app_system_lookup_app (ShellAppSystem *self,
}
/**
- * shell_app_system_lookup_app_by_tree_entry:
- * @system: a #ShellAppSystem
- * @entry: a #GMenuTreeEntry
- *
- * Find a #ShellApp corresponding to a #GMenuTreeEntry.
- *
- * Return value: (transfer none): The #ShellApp for @entry, or %NULL if none
- */
-ShellApp *
-shell_app_system_lookup_app_by_tree_entry (ShellAppSystem *self,
- GMenuTreeEntry *entry)
-{
- /* If we looked up directly in ->entry_to_app, we'd lose the
- * override of running apps. Thus, indirect through the id.
- */
- return shell_app_system_lookup_app (self, gmenu_tree_entry_get_desktop_file_id (entry));
-}
-
-/**
* shell_app_system_lookup_app_for_path:
* @system: a #ShellAppSystem
* @desktop_path: (type utf8): UTF-8 encoded absolute file name
diff --git a/src/shell-app-system.h b/src/shell-app-system.h
index 6b3cd89..4305878 100644
--- a/src/shell-app-system.h
+++ b/src/shell-app-system.h
@@ -43,8 +43,6 @@ GMenuTree *shell_app_system_get_tree (ShellAppSystem *s
ShellApp *shell_app_system_lookup_app (ShellAppSystem *system,
const char *id);
-ShellApp *shell_app_system_lookup_app_by_tree_entry (ShellAppSystem *system,
- GMenuTreeEntry *entry);
ShellApp *shell_app_system_lookup_app_for_path (ShellAppSystem *system,
const char *desktop_path);
ShellApp *shell_app_system_lookup_heuristic_basename (ShellAppSystem *system,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]