[gnome-software] appstream: mark applications as available when no better state is set



commit 08ce47091101d56dca75440b37c14a17b525808e
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Sep 1 19:42:59 2013 +0200

    appstream: mark applications as available when no better state is set
    
    We coming from the hardcoded plugins, instead of packagekit, we
    don't know the installed state, so assume the app is available.
    Also, increase the priority, so appstream is run after datadir-apps
    (which also sets the installed state).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707185

 src/plugins/gs-plugin-appstream.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index a59f643..c929a48 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -474,7 +474,7 @@ gs_plugin_initialize (GsPlugin *plugin)
 gdouble
 gs_plugin_get_priority (GsPlugin *plugin)
 {
-       return 1.0f;
+       return 2.0f;
 }
 
 /**
@@ -572,6 +572,9 @@ gs_plugin_refine_item (GsPlugin *plugin,
        /* set package name */
        if (item->pkgname != NULL && gs_app_get_metadata_item (app, "package-name") == NULL)
                gs_app_set_metadata (app, "package-name", item->pkgname);
+
+       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
 out:
        g_free (icon_path);
        if (pixbuf != NULL)


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