[gnome-software] Use in-app notifications for interactive install, remove and update



commit 176ca21f411e24107028bc404574e7167a03615e
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 23 12:23:36 2017 +0100

    Use in-app notifications for interactive install, remove and update
    
    This makes the 'AC power is required' notification appear when trying to
    schedule a Dell firmware update on battery power.

 src/gs-page.c         |    4 ++++
 src/gs-updates-page.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 8f4441c..234aca5 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -91,6 +91,7 @@ gs_page_install_authenticate_cb (GtkDialog *dialog,
        }
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
                                         "app", helper->app,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
                                            helper->cancellable,
@@ -300,6 +301,7 @@ gs_page_install_app (GsPage *page,
        helper->interaction = interaction;
        plugin_job = gs_plugin_job_newv (helper->action,
                                         "app", helper->app,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (priv->plugin_loader,
                                            plugin_job,
@@ -425,6 +427,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
        /* generic fallback */
        plugin_job = gs_plugin_job_newv (helper->action,
                                         "app", app,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
                                            helper->cancellable,
@@ -477,6 +480,7 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
                g_autoptr(GsPluginJob) plugin_job = NULL;
                plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
                                                 "app", app,
+                                                "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                                 NULL);
                g_debug ("remove %s", gs_app_get_id (app));
                gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 2de357c..56ffeec 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -1557,6 +1557,7 @@ trigger_upgrade (GsUpdatesPage *self)
 
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_UPGRADE_TRIGGER,
                                         "app", upgrade,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,
                                            self->cancellable,


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