[gnome-software] Fix the speed regression by using the correct icon cache key



commit 45ee0edd722fc93d4ec25ced8ebdf3e0f20abc37
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jan 3 12:17:15 2014 +0000

    Fix the speed regression by using the correct icon cache key

 src/gs-plugin.h                      |    2 +-
 src/plugins/gs-plugin-datadir-apps.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-plugin.h b/src/gs-plugin.h
index 3792648..864e3dc 100644
--- a/src/gs-plugin.h
+++ b/src/gs-plugin.h
@@ -70,7 +70,7 @@ struct GsPlugin {
        GsPluginUpdatesChanged   updates_changed_fn;
        gpointer                 updates_changed_user_data;
        GsProfile               *profile;
-       GHashTable              *icon_cache;
+       GHashTable              *icon_cache;    /* key is the id.desktop */
 };
 
 typedef enum {
diff --git a/src/plugins/gs-plugin-datadir-apps.c b/src/plugins/gs-plugin-datadir-apps.c
index 95444a7..0428252 100644
--- a/src/plugins/gs-plugin-datadir-apps.c
+++ b/src/plugins/gs-plugin-datadir-apps.c
@@ -205,7 +205,7 @@ gs_plugin_datadir_apps_extract_desktop_data (GsPlugin *plugin,
                goto out;
 
        /* do we have an icon in the cache? */
-       icon_tmp = g_hash_table_lookup (plugin->icon_cache, app_id);
+       icon_tmp = g_hash_table_lookup (plugin->icon_cache, app_id_full_noprefix);
        if (icon_tmp != NULL) {
                pixbuf = gdk_pixbuf_new_from_file (icon_tmp, NULL);
        } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]