[gnome-software] Add an application kind of firmware-update



commit 0642e6e3e6d38f112484ff579a1754e8e69d319b
Author: Richard Hughes <richard hughsie com>
Date:   Wed Nov 25 16:30:10 2015 +0000

    Add an application kind of firmware-update
    
    This allows us to handle it specially in the various pages.

 src/gs-app.c                  |    2 ++
 src/gs-app.h                  |    1 +
 src/plugins/gs-plugin-fwupd.c |    4 ++--
 3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index dc6315c..ff08a16 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -156,6 +156,8 @@ gs_app_kind_to_string (GsAppKind kind)
                return "core";
        if (kind == GS_APP_KIND_DISTRO_UPGRADE)
                return "distro-upgrade";
+       if (kind == GS_APP_KIND_FIRMWARE_UPDATE)
+               return "firmware-update";
        return NULL;
 }
 
diff --git a/src/gs-app.h b/src/gs-app.h
index 0513e41..a69f4c0 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -47,6 +47,7 @@ typedef enum {
        GS_APP_KIND_SOURCE,             /* src  [ install:1 remove:0 update:0 ] */
        GS_APP_KIND_CORE,               /* pkg  [ install:0 remove:0 update:1 ] */
        GS_APP_KIND_DISTRO_UPGRADE,     /* meta [ install:0 remove:0 update:1 ] */
+       GS_APP_KIND_FIRMWARE_UPDATE,    /* app  [ install:0 remove:0 update:1 ] */
        GS_APP_KIND_LAST
 } GsAppKind;
 
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index ea64b37..9c88493 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -402,7 +402,7 @@ gs_plugin_add_update_app (GsPlugin *plugin,
        gs_app_set_id_kind (app, AS_ID_KIND_FIRMWARE);
        gs_app_add_source_id (app, filename_cache);
        gs_app_add_category (app, "System");
-       gs_app_set_kind (app, GS_APP_KIND_SYSTEM);
+       gs_app_set_kind (app, GS_APP_KIND_FIRMWARE_UPDATE);
        gs_app_set_metadata (app, "fwupd::DeviceID", id);
        gs_app_set_metadata (app, "DataDir::desktop-icon", "application-x-firmware");
        gs_plugin_add_app (list, app);
@@ -1098,7 +1098,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
        gs_app_set_metadata (app, "DataDir::desktop-icon", "application-x-firmware");
        gs_app_set_id_kind (app, AS_ID_KIND_FIRMWARE);
        gs_app_set_management_plugin (app, "fwupd");
-       gs_app_set_kind (app, GS_APP_KIND_SYSTEM);
+       gs_app_set_kind (app, GS_APP_KIND_FIRMWARE_UPDATE);
        gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
        gs_app_add_source_id (app, filename);
        gs_app_add_category (app, "System");


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