[gnome-software: 1/2] gs-page: Correctly set interactive status for app installation




commit 9135b75002658aa3e5c70c84ccb98b3f6af57d03
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Mar 25 01:01:22 2021 +0000

    gs-page: Correctly set interactive status for app installation
    
    `gs_page_install_app()` can be called in response to the `install`
    action on the `GApplication`. This can be used to install an app while
    gnome-software is hidden in the background, with no window showing.
    
    In that case, the installation should be done in non-interactive mode,
    to avoid polkit popups being presented to the user with no context. This
    can happen, in particular, when logged in as a user with parental
    controls enabled, such that every app installation requires
    administrator approval.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 src/gs-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 566263917..87effb97f 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -262,7 +262,7 @@ gs_page_install_app (GsPage *page,
        helper->interaction = interaction;
 
        plugin_job = gs_plugin_job_newv (helper->action,
-                                        "interactive", TRUE,
+                                        "interactive", (interaction == GS_SHELL_INTERACTION_FULL),
                                         "app", helper->app,
                                         NULL);
        gs_plugin_loader_job_process_async (priv->plugin_loader,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]