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




commit c4fbd3b268072e2ec91a0409c80770f87a9aa170
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..ca1fbfc70 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]