[gnome-software/603-gnome-software-reports-unknown-error-when-there-is-a-signing-issue: 206/207] gs-shell: Add a handler for the GsPluginLoader::ask-user-accepts signal




commit 0c80f4a1d1b8b1374dbf5fca1a1c042d8563e83d
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 20 14:19:42 2021 +0200

    gs-shell: Add a handler for the GsPluginLoader::ask-user-accepts signal
    
    Use the previously added function to handle the pre-previously
    added signal.

 src/gs-shell.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 9e2cde8c8..57441cc75 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -415,6 +415,17 @@ gs_shell_basic_auth_start_cb (GsPluginLoader *plugin_loader,
                                  G_CALLBACK (gtk_window_destroy), dialog);
 }
 
+static gboolean
+gs_shell_ask_user_accepts_cb (GsPluginLoader *plugin_loader,
+                             const gchar *title,
+                             const gchar *msg,
+                             const gchar *details,
+                             const gchar *accept_label,
+                             GsShell *shell)
+{
+       return gs_utils_ask_user_accepts (GTK_WINDOW (shell), title, msg, details, accept_label);
+}
+
 static void
 free_back_entry (BackEntry *entry)
 {
@@ -2194,6 +2205,9 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        g_signal_connect_object (shell->plugin_loader, "basic-auth-start",
                                 G_CALLBACK (gs_shell_basic_auth_start_cb),
                                 shell, 0);
+       g_signal_connect_object (shell->plugin_loader, "ask-user-accepts",
+                                G_CALLBACK (gs_shell_ask_user_accepts_cb),
+                                shell, 0);
 
        g_object_bind_property (shell->plugin_loader, "allow-updates",
                                shell->pages[GS_SHELL_MODE_UPDATES], "visible",


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