[gnome-software/1910-software-fails-to-show-unhandled-error-from-fwupd] gs-shell: Consider errors from non-interactive actions as handled



commit 5fa3835fd7d1b34ac370d97c49fd94d4cbd293e4
Author: Milan Crha <mcrha redhat com>
Date:   Fri Sep 30 12:02:07 2022 +0200

    gs-shell: Consider errors from non-interactive actions as handled
    
    When the error is ignored due to the action being non-interactive,
    it should not be "notified" of on the terminal as "not handled error".
    
    Related to https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1910

 src/gs-shell.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index beb76f0e9..2f8c25b81 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -1264,7 +1264,7 @@ gs_shell_show_event_refresh (GsShell *shell, GsPluginEvent *event)
 
        /* ignore any errors from background downloads */
        if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-               return FALSE;
+               return TRUE;
 
        if (g_error_matches (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_DOWNLOAD_FAILED)) {
                if (origin != NULL) {
@@ -1484,7 +1484,7 @@ gs_shell_show_event_update (GsShell *shell, GsPluginEvent *event)
 
        /* ignore any errors from background downloads */
        if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-               return FALSE;
+               return TRUE;
 
        if (g_error_matches (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_DOWNLOAD_FAILED)) {
                if (app != NULL && origin != NULL) {
@@ -1786,7 +1786,7 @@ gs_shell_show_event_remove (GsShell *shell, GsPluginEvent *event)
        } else {
                /* non-interactive generic */
                if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-                       return FALSE;
+                       return TRUE;
                /* TRANSLATORS: failure text for the in-app notification,
                 * where the %s is the application name (e.g. "GIMP") */
                g_string_append_printf (str, _("Unable to remove %s"), str_app);
@@ -1845,7 +1845,7 @@ gs_shell_show_event_launch (GsShell *shell, GsPluginEvent *event)
        } else {
                /* non-interactive generic */
                if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-                       return FALSE;
+                       return TRUE;
                /* TRANSLATORS: we failed to get a proper error code */
                g_string_append (str, _("Sorry, something went wrong"));
                gs_shell_append_detailed_error (shell, str, error);
@@ -1893,7 +1893,7 @@ gs_shell_show_event_file_to_app (GsShell *shell, GsPluginEvent *event)
        } else {
                /* non-interactive generic */
                if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-                       return FALSE;
+                       return TRUE;
                /* TRANSLATORS: we failed to get a proper error code */
                g_string_append (str, _("Sorry, something went wrong"));
                gs_shell_append_detailed_error (shell, str, error);
@@ -1931,7 +1931,7 @@ gs_shell_show_event_url_to_app (GsShell *shell, GsPluginEvent *event)
        } else {
                /* non-interactive generic */
                if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-                       return FALSE;
+                       return TRUE;
                /* TRANSLATORS: we failed to get a proper error code */
                g_string_append (str, _("Sorry, something went wrong"));
                gs_shell_append_detailed_error (shell, str, error);
@@ -1984,7 +1984,7 @@ gs_shell_show_event_fallback (GsShell *shell, GsPluginEvent *event)
        } else {
                /* non-interactive generic */
                if (!gs_plugin_event_has_flag (event, GS_PLUGIN_EVENT_FLAG_INTERACTIVE))
-                       return FALSE;
+                       return TRUE;
                /* TRANSLATORS: we failed to get a proper error code */
                g_string_append (str, _("Sorry, something went wrong"));
                gs_shell_append_detailed_error (shell, str, error);


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