[gnome-software] Do not show a dialog if the action is manually cancelled



commit 7af4d699bfc5bb6e204c44921abd1b029fd7297c
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 8 17:47:56 2016 +0100

    Do not show a dialog if the action is manually cancelled

 src/gs-page.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 7cd7de4..798c844 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -128,6 +128,12 @@ gs_page_app_installed_cb (GObject *source,
        ret = gs_plugin_loader_app_action_finish (plugin_loader,
                                                  res,
                                                  &error);
+       if (g_error_matches (error,
+                            G_IO_ERROR,
+                            G_IO_ERROR_CANCELLED)) {
+               g_debug ("%s", error->message);
+               return;
+       }
        if (!ret) {
                /* try to authenticate then retry */
                if (g_error_matches (error,
@@ -198,6 +204,12 @@ gs_page_app_removed_cb (GObject *source,
        ret = gs_plugin_loader_app_action_finish (plugin_loader,
                                                  res,
                                                  &error);
+       if (g_error_matches (error,
+                            G_IO_ERROR,
+                            G_IO_ERROR_CANCELLED)) {
+               g_debug ("%s", error->message);
+               return;
+       }
        if (!ret) {
                /* try to authenticate then retry */
                if (g_error_matches (error,


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