[gnome-software/987-removing-layered-local-package-on-silverblue-does-not-notify-the-user-that-it-was-actually] gs-page: Notify about needed restart when the removal needs reboot



commit 002813ff882ad65f08080aad5f8b4beba7010820
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 16 12:00:05 2021 +0200

    gs-page: Notify about needed restart when the removal needs reboot
    
    Similar to an application install, when it has set it needs reboot,
    notify the user about it.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/987

 src/gs-page.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 41ac44b58..abf694203 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -203,6 +203,13 @@ gs_page_app_removed_cb (GObject *source,
                return;
        }
 
+       /* the app removal needs system reboot, e.g. for rpm-ostree */
+       if (gs_app_has_quirk (helper->app, GS_APP_QUIRK_NEEDS_REBOOT)) {
+               g_autoptr(GsAppList) list = gs_app_list_new ();
+               gs_app_list_add (list, helper->app);
+               gs_utils_reboot_notify (list, FALSE);
+       }
+
        if (!gs_app_is_installed (helper->app) &&
            GS_PAGE_GET_CLASS (page)->app_removed != NULL) {
                GS_PAGE_GET_CLASS (page)->app_removed (page, helper->app);


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