[gnome-software] shell-extensions: Don't save static data in the XML
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] shell-extensions: Don't save static data in the XML
- Date: Fri, 25 May 2018 15:48:52 +0000 (UTC)
commit f4940e88469e0613507643d85a61d1153223b88c
Author: Richard Hughes <richard hughsie com>
Date: Tue May 22 10:35:07 2018 +0100
shell-extensions: Don't save static data in the XML
We automatically add this at startup if it is missing, and making the XML
smaller saves ~900 duplicate allocations of 'GNOME Shell Extension'.
plugins/core/gs-appstream.c | 2 ++
plugins/shell-extensions/gs-plugin-shell-extensions.c | 5 -----
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 3f42942c..02e7ff88 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -1191,6 +1191,8 @@ gs_appstream_add_extra_info (GsPlugin *plugin, AsApp *app)
case AS_APP_KIND_SHELL_EXTENSION:
as_app_add_category (app, "Addon");
as_app_add_category (app, "ShellExtension");
+ if (g_hash_table_size (as_app_get_comments (app)) == 0)
+ as_app_set_comment (app, NULL, "GNOME Shell Extension");
icon = as_icon_new ();
as_icon_set_kind (icon, AS_ICON_KIND_STOCK);
as_icon_set_name (icon, "application-x-addon-symbolic");
diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c
b/plugins/shell-extensions/gs-plugin-shell-extensions.c
index f55eb2fb..9fa4b9db 100644
--- a/plugins/shell-extensions/gs-plugin-shell-extensions.c
+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c
@@ -565,12 +565,7 @@ gs_plugin_shell_extensions_parse_app (GsPlugin *plugin,
return NULL;
}
- /* required to match categories in gnome-software */
- as_app_add_category (app, "Addon");
- as_app_add_category (app, "ShellExtension");
-
/* we have no data :/ */
- as_app_set_comment (app, NULL, "GNOME Shell Extension");
as_app_add_metadata (app, "GnomeSoftware::Plugin",
gs_plugin_get_name (plugin));
as_app_add_metadata (app, "GnomeSoftware::OriginHostnameUrl",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]