[gnome-software/wip/hughsie/sandbox-ui: 4/7] Save the origin-hostname in the shell extensions metadata
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/sandbox-ui: 4/7] Save the origin-hostname in the shell extensions metadata
- Date: Thu, 7 Jul 2016 19:43:10 +0000 (UTC)
commit 6b43f1d0d92ac02694d7ba36c568b7ec63600326
Author: Richard Hughes <richard hughsie com>
Date: Thu Jul 7 10:07:38 2016 +0100
Save the origin-hostname in the shell extensions metadata
src/plugins/gs-appstream.c | 5 +++++
src/plugins/gs-plugin-shell-extensions.c | 6 +++++-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 5b92601..a2a9e1f 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -664,6 +664,11 @@ gs_appstream_refine_app (GsPlugin *plugin,
}
}
+ /* we saved the origin hostname in the metadata */
+ tmp = as_app_get_metadata_item (item, "GnomeSoftware::OriginHostnameUrl");
+ if (tmp != NULL && gs_app_get_origin_hostname (app) == NULL)
+ gs_app_set_origin_hostname (app, tmp);
+
/* is there any update information */
if (!gs_appstream_refine_app_updates (plugin, app, item, error))
return FALSE;
diff --git a/src/plugins/gs-plugin-shell-extensions.c b/src/plugins/gs-plugin-shell-extensions.c
index 68545f7..c043acc 100644
--- a/src/plugins/gs-plugin-shell-extensions.c
+++ b/src/plugins/gs-plugin-shell-extensions.c
@@ -515,7 +515,11 @@ gs_plugin_shell_extensions_parse_app (GsPlugin *plugin,
/* 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::Plugin",
+ gs_plugin_get_name (plugin));
+ as_app_add_metadata (app, "GnomeSoftware::OriginHostnameUrl",
+ SHELL_EXTENSIONS_API_URI);
+
return app;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]