From 8bd7db922725e86c4e8e06f16cd79dc4ce3c7084 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 2 Oct 2013 18:22:07 -0400 Subject: [PATCH] app-system: Don't use gmenu_tree_entry_get_desktop_app_info It's a broken method when it comes to giving us a useful GDesktopAppInfo, and it's hard to fix libgmenu properly, so simply recreate the app info using the desktop file ID that libgmenu has. --- src/shell-app-system.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell-app-system.c b/src/shell-app-system.c index e83700561..3e199d223 100644 --- a/src/shell-app-system.c +++ b/src/shell-app-system.c @@ -341,7 +341,7 @@ on_apps_tree_changed_cb (GMenuTree *tree, else g_free (prefix); - info = gmenu_tree_entry_get_app_info (entry); + info = g_desktop_app_info_new (gmenu_tree_entry_get_desktop_file_id (entry)); app = g_hash_table_lookup (self->priv->id_to_app, id); if (app != NULL) @@ -363,6 +363,8 @@ on_apps_tree_changed_cb (GMenuTree *tree, app = _shell_app_new (info); } + g_object_unref (info); + 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);