[gnome-shell/wip/app-system-rewrite: 10/13] app-system: Remove visible_id_to_app
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/app-system-rewrite: 10/13] app-system: Remove visible_id_to_app
- Date: Thu, 26 Sep 2013 20:25:38 +0000 (UTC)
commit 6b27c477afa01f062615474498ec9e447b5ddd6d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Apr 20 18:55:35 2013 -0400
app-system: Remove visible_id_to_app
Since appDisplay.js makes its own GMenu tree, it's not necessary
anymore. This does mean that searches will show apps in NoDisplay
categories, but that's an obscure enough edge case not to matter.
https://bugzilla.gnome.org/show_bug.cgi?id=698486
src/shell-app-system.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 4344039..d3df405 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -40,7 +40,6 @@ struct _ShellAppSystemPrivate {
GMenuTree *apps_tree;
GHashTable *running_apps;
- GHashTable *visible_id_to_app;
GHashTable *id_to_app;
GHashTable *startup_wm_class_to_app;
};
@@ -88,9 +87,6 @@ shell_app_system_init (ShellAppSystem *self)
NULL,
(GDestroyNotify)g_object_unref);
- /* All the objects in this hash table are owned by id_to_app */
- priv->visible_id_to_app = g_hash_table_new (g_str_hash, g_str_equal);
-
priv->startup_wm_class_to_app = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL,
(GDestroyNotify)g_object_unref);
@@ -113,7 +109,6 @@ shell_app_system_finalize (GObject *object)
g_hash_table_destroy (priv->running_apps);
g_hash_table_destroy (priv->id_to_app);
- g_hash_table_destroy (priv->visible_id_to_app);
g_hash_table_destroy (priv->startup_wm_class_to_app);
G_OBJECT_CLASS (shell_app_system_parent_class)->finalize (object);
@@ -190,8 +185,6 @@ on_apps_tree_changed_cb (GMenuTree *tree,
g_assert (tree == self->priv->apps_tree);
- g_hash_table_remove_all (self->priv->visible_id_to_app);
-
if (!gmenu_tree_load_sync (self->priv->apps_tree, &error))
{
if (error)
@@ -237,8 +230,6 @@ on_apps_tree_changed_cb (GMenuTree *tree,
}
g_hash_table_replace (self->priv->id_to_app, (char*)id, app);
- if (!gmenu_tree_entry_get_is_nodisplay_recurse (entry))
- g_hash_table_replace (self->priv->visible_id_to_app, (char*)id, app);
startup_wm_class = g_desktop_app_info_get_startup_wm_class (info);
if (startup_wm_class)
@@ -547,7 +538,7 @@ GSList *
shell_app_system_initial_search (ShellAppSystem *self,
GSList *terms)
{
- return search_tree (self, terms, self->priv->visible_id_to_app);
+ return search_tree (self, terms, self->priv->id_to_app);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]