Commit 0642e6e3 authored by Richard Hughes's avatar Richard Hughes

Add an application kind of firmware-update

This allows us to handle it specially in the various pages.
parent 76eca569
......@@ -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;
}
......
......@@ -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;
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment