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.
This commit is contained in:
Jasper St. Pierre 2013-10-02 18:22:07 -04:00
parent d84b018ba7
commit 76eca409a3

View File

@ -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);