[gnome-software] Do not try to set a package SYSTEM->NORMAL



commit de7beb076a591e6fbfced76bd034b97c60ca5bc4
Author: Richard Hughes <richard hughsie com>
Date:   Thu Sep 19 11:29:38 2013 +0100

    Do not try to set a package SYSTEM->NORMAL
    
    This fixes a WARNING on the console when searching for system apps.

 src/plugins/gs-plugin-datadir-apps.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-datadir-apps.c b/src/plugins/gs-plugin-datadir-apps.c
index dbefc0a..80443d3 100644
--- a/src/plugins/gs-plugin-datadir-apps.c
+++ b/src/plugins/gs-plugin-datadir-apps.c
@@ -109,7 +109,14 @@ gs_plugin_datadir_apps_set_from_cache_item (GsApp *app,
                gs_app_set_pixbuf (app, cache_item->pixbuf);
 
        /* mark as an application */
-       gs_app_set_kind (app, GS_APP_KIND_NORMAL);
+       switch (gs_app_get_kind (app)) {
+       case GS_APP_KIND_UNKNOWN:
+       case GS_APP_KIND_PACKAGE:
+               gs_app_set_kind (app, GS_APP_KIND_NORMAL);
+               break;
+       default:
+               break;
+       }
 }
 
 /**



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