[gnome-software] repos dialog: Show errors as shell events



commit 3388e2aa7fdc5f458887a6f4e915c5a74d2f8a89
Author: Kalev Lember <klember redhat com>
Date:   Thu Mar 8 08:24:55 2018 +0100

    repos dialog: Show errors as shell events
    
    We could definitely do better, but this is at least something to get
    errors show up until we get error handling in the repos dialog itself.
    
    A minor quirk is that cancelling polkit dialogs makes permission errors
    show up, which is ... not great.

 src/gs-repos-dialog.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
index da60b8d9..47495a3d 100644
--- a/src/gs-repos-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -194,6 +194,7 @@ enable_repo (GsReposDialog *dialog, GsApp *repo)
        g_debug ("enabling repo %s", gs_app_get_id (install_data->repo));
        plugin_job = gs_plugin_job_newv (install_data->action,
                                         "app", repo,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (dialog->plugin_loader, plugin_job,
                                            dialog->cancellable,
@@ -220,6 +221,7 @@ remove_repo_response_cb (GtkDialog *confirm_dialog,
        g_debug ("removing repo %s", gs_app_get_id (remove_data->repo));
        plugin_job = gs_plugin_job_newv (remove_data->action,
                                         "app", remove_data->repo,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (dialog->plugin_loader, plugin_job,
                                            dialog->cancellable,
@@ -395,6 +397,7 @@ install_third_party_repo (GsReposDialog *dialog, gboolean install)
 
        plugin_job = gs_plugin_job_newv (install_data->action,
                                         "app", dialog->third_party_repo,
+                                        "failure-flags", GS_PLUGIN_FAILURE_FLAGS_USE_EVENTS,
                                         NULL);
        gs_plugin_loader_job_process_async (dialog->plugin_loader,
                                            plugin_job,


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