[gnome-software/1276-software-became-unresponsive-while-updating-flatpaks: 25/26] gs-page: Emit resource install done when user declines installation
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1276-software-became-unresponsive-while-updating-flatpaks: 25/26] gs-page: Emit resource install done when user declines installation
- Date: Tue, 27 Jul 2021 16:32:01 +0000 (UTC)
commit 92c92f9adc7bb5903f3ad9d164620875f184f89f
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 20 20:00:58 2021 +0200
gs-page: Emit resource install done when user declines installation
Use can decline installation when the application is unavailable (from
a disabled repository), which should be also reported to any resource install
D-Bus request, to claim the result to the caller.
src/gs-page.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 92a90d0ca..e8077776f 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -271,8 +271,12 @@ gs_page_install_app (GsPage *page,
GtkResponseType response;
response = gs_app_notify_unavailable (app, GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET
(page), GTK_TYPE_WINDOW)));
- if (response != GTK_RESPONSE_OK)
+ if (response != GTK_RESPONSE_OK) {
+ g_autoptr(GError) error_local = NULL;
+ g_set_error_literal (&error_local, G_IO_ERROR, G_IO_ERROR_CANCELLED, "User declined
installation");
+ gs_application_emit_install_resources_done (GS_APPLICATION (g_application_get_default
()), NULL, error_local);
return;
+ }
}
helper = g_slice_new0 (GsPageHelper);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]