[gnome-software] Initialize the AppStream data if using gs_plugin_add_category_apps()



commit b3c55611b064cf1c7066feb0da118082c1b3ffe4
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 2 14:53:17 2013 +0100

    Initialize the AppStream data if using gs_plugin_add_category_apps()

 src/plugins/gs-plugin-appstream.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index d0179f7..2d99bb1 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -737,6 +737,14 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
        GsCategory *parent;
        guint i;
 
+       /* load XML files */
+       if (g_once_init_enter (&plugin->priv->done_init)) {
+               ret = gs_plugin_startup (plugin, error);
+               g_once_init_leave (&plugin->priv->done_init, TRUE);
+               if (!ret)
+                       goto out;
+       }
+
        /* get the two search terms */
        search_id1 = gs_category_get_id (category);
        parent = gs_category_get_parent (category);


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