[gnome-software] flatpak: Show a detailed status message when downloading AppStream metadata
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] flatpak: Show a detailed status message when downloading AppStream metadata
- Date: Mon, 22 May 2017 11:20:10 +0000 (UTC)
commit da435aaef911e488fd381f2c39d59945c95ef881
Author: Richard Hughes <richard hughsie com>
Date: Mon May 22 11:54:22 2017 +0100
flatpak: Show a detailed status message when downloading AppStream metadata
plugins/flatpak/gs-flatpak.c | 11 +++++++++++
po/POTFILES.in | 1 +
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 26fb2f6..a47862f 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -29,6 +29,7 @@
#include <config.h>
+#include <glib/gi18n.h>
#include <flatpak.h>
#include "gs-appstream.h"
@@ -452,12 +453,22 @@ gs_flatpak_refresh_appstream_remote (GsFlatpak *self,
GCancellable *cancellable,
GError **error)
{
+ g_autofree gchar *str = NULL;
g_autoptr(AsProfileTask) ptask = NULL;
+ g_autoptr(GsApp) app_dl = gs_app_new (gs_plugin_get_name (self->plugin));
+
ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
"%s::refresh-appstream{%s}",
gs_flatpak_get_id (self),
remote_name);
g_assert (ptask != NULL);
+
+ /* TRANSLATORS: status text when downloading new metadata */
+ str = g_strdup_printf (_("Getting flatpak metadata for %s…"), remote_name);
+ gs_app_set_summary_missing (app_dl, str);
+ gs_app_set_progress (app_dl, 0); // FIXME
+ gs_plugin_status_update (self->plugin, app_dl,
+ GS_PLUGIN_STATUS_DOWNLOADING);
if (!flatpak_installation_update_appstream_sync (self->installation,
remote_name,
NULL,
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6c54871..4f7a8ab 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -76,6 +76,7 @@ plugins/epiphany/org.gnome.Software.Plugin.Epiphany.metainfo.xml.in
plugins/external-appstream/gs-install-appstream.c
plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
plugins/flatpak/org.gnome.Software.Plugin.Flatpak.metainfo.xml.in
+plugins/flatpak/gs-flatpak.c
plugins/fwupd/gs-plugin-fwupd.c
plugins/fwupd/org.gnome.Software.Plugin.Fwupd.metainfo.xml.in
plugins/limba/org.gnome.Software.Plugin.Limba.metainfo.xml.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]