[gnome-software] Promote packages found in the desktop-db to kind normal+desktop



commit ee6325592b31a0e45a56fd2efaa7402a0a8c4f13
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 17 12:59:06 2014 +0000

    Promote packages found in the desktop-db to kind normal+desktop

 src/plugins/gs-plugin-desktopdb.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-desktopdb.c b/src/plugins/gs-plugin-desktopdb.c
index 041ac0a..3d9e68b 100644
--- a/src/plugins/gs-plugin-desktopdb.c
+++ b/src/plugins/gs-plugin-desktopdb.c
@@ -124,6 +124,14 @@ gs_plugin_desktopdb_set_metadata (GsPlugin *plugin,
                gs_app_set_id (app, id);
        }
 
+       /* promote to an app if just a package */
+       if (gs_app_get_kind (app) == GS_APP_KIND_PACKAGE)
+               gs_app_set_kind (app, GS_APP_KIND_NORMAL);
+
+       /* promote to a desktop type */
+       if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_UNKNOWN)
+               gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+
        gs_app_set_metadata (app,
                             "DataDir::desktop-filename",
                             desktop_file);


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