diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2022-10-10 18:02:39 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-10-14 15:34:12 +0100 |
commit | 008b474644f31e352906443c619d51d7d420a89a (patch) | |
tree | 5275e65aa55ecdbf6855aa5a797ef65f19d0b0ca /libappstream-builder/plugins/asb-plugin-appdata.c | |
parent | 943b990dd8dd36c603688e8493abf71bad60bf5f (diff) | |
download | appstream-glib-008b474644f31e352906443c619d51d7d420a89a.tar.gz |
asb-plugin-appdata: Never add default icons to firmware, IMs or codecs
Consumers of the appdata file are perfectly capable of adding their own
default icons, and the specification doesn’t require icons to be present
for any of these component types.
If appstream-builder provides a default icon, software centres cannot
work out whether it’s provided by the component authors or by
appstream-builder. This means software centres cannot override it with
their own desktop-specific default icons.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
See: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1483
Fixes: #419
Diffstat (limited to 'libappstream-builder/plugins/asb-plugin-appdata.c')
-rw-r--r-- | libappstream-builder/plugins/asb-plugin-appdata.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-appdata.c b/libappstream-builder/plugins/asb-plugin-appdata.c index 4bb910a..22d57fa 100644 --- a/libappstream-builder/plugins/asb-plugin-appdata.c +++ b/libappstream-builder/plugins/asb-plugin-appdata.c @@ -138,33 +138,14 @@ asb_plugin_process_filename (AsbPlugin *plugin, /* fix up various components as required */ if (asb_context_get_flag (plugin->ctx, ASB_CONTEXT_FLAG_ADD_DEFAULT_ICONS)) { - /* add icon for firmware */ - if (as_app_get_kind (AS_APP (app)) == AS_APP_KIND_FIRMWARE) { - g_autoptr(AsIcon) icon = NULL; - icon = as_icon_new (); - as_icon_set_kind (icon, AS_ICON_KIND_STOCK); - as_icon_set_name (icon, "application-x-executable"); - as_app_add_icon (AS_APP (app), icon); - } - /* fix up input methods */ if (as_app_get_kind (AS_APP (app)) == AS_APP_KIND_INPUT_METHOD) { - g_autoptr(AsIcon) icon = NULL; - icon = as_icon_new (); - as_icon_set_kind (icon, AS_ICON_KIND_STOCK); - as_icon_set_name (icon, "system-run-symbolic"); - as_app_add_icon (AS_APP (app), icon); as_app_add_category (AS_APP (app), "Addons"); as_app_add_category (AS_APP (app), "InputSources"); } /* fix up codecs */ if (as_app_get_kind (AS_APP (app)) == AS_APP_KIND_CODEC) { - g_autoptr(AsIcon) icon = NULL; - icon = as_icon_new (); - as_icon_set_kind (icon, AS_ICON_KIND_STOCK); - as_icon_set_name (icon, "application-x-addon"); - as_app_add_icon (AS_APP (app), icon); as_app_add_category (AS_APP (app), "Addons"); as_app_add_category (AS_APP (app), "Codecs"); } |