[gnome-software/1276-software-became-unresponsive-while-updating-flatpaks] gs-page: Emit resource install done when user declines installation



commit bf4262c3f1f1fea6870b4b3f00c3c7419e15fddd
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 8792852f9..a234944f0 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]