[gnome-software] Show an in-app notification when a flatpak runtime cannot be found
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Show an in-app notification when a flatpak runtime cannot be found
- Date: Wed, 21 Sep 2016 18:56:04 +0000 (UTC)
commit 82b890963f7e6beb9893f8de122d3f6ecf8fae79
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 21 19:51:40 2016 +0100
Show an in-app notification when a flatpak runtime cannot be found
src/gs-shell.c | 14 ++++++++++++++
src/plugins/gs-flatpak.c | 4 ++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 9b846c3..f2b380b 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -863,6 +863,20 @@ gs_shell_show_event_install (GsShell *shell, GsPluginEvent *event)
str_app);
}
break;
+ case GS_PLUGIN_ERROR_NOT_SUPPORTED:
+ if (origin != NULL) {
+ str_origin = gs_shell_get_title_from_origin (origin);
+ /* TRANSLATORS: failure text for the in-app notification */
+ g_string_append_printf (str, _("Unable to install %s as "
+ "runtime %s not available"),
+ str_app, str_origin);
+ } else {
+ /* TRANSLATORS: failure text for the in-app notification */
+ g_string_append_printf (str, _("Unable to install %s "
+ "as not supported"),
+ str_app);
+ }
+ break;
case GS_PLUGIN_ERROR_NO_NETWORK:
/* TRANSLATORS: failure text for the in-app notification */
g_string_append (str, _("Unable to install: internet access was "
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index b1a8a13..9be8fab 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -1856,14 +1856,17 @@ gs_flatpak_app_install (GsFlatpak *self,
/* the runtime could come from a different remote to the app */
if (!gs_refine_item_metadata (self, runtime, cancellable, error)) {
+ gs_utils_error_add_unique_id (error, runtime);
gs_app_set_state_recover (app);
return FALSE;
}
if (!gs_plugin_refine_item_origin (self, runtime, cancellable, error)) {
+ gs_utils_error_add_unique_id (error, runtime);
gs_app_set_state_recover (app);
return FALSE;
}
if (!gs_plugin_refine_item_state (self, runtime, cancellable, error)) {
+ gs_utils_error_add_unique_id (error, runtime);
gs_app_set_state_recover (app);
return FALSE;
}
@@ -1873,6 +1876,7 @@ gs_flatpak_app_install (GsFlatpak *self,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
"Failed to find runtime %s",
gs_app_get_source_default (runtime));
+ gs_utils_error_add_unique_id (error, runtime);
gs_app_set_state_recover (app);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]