[gnome-software/603-gnome-software-reports-unknown-error-when-there-is-a-signing-issue: 163/164] gs-shell: Add a handler for the GsPluginLoader::ask-untrusted signal
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/603-gnome-software-reports-unknown-error-when-there-is-a-signing-issue: 163/164] gs-shell: Add a handler for the GsPluginLoader::ask-untrusted signal
- Date: Mon, 29 Nov 2021 11:02:50 +0000 (UTC)
commit 719b009398ac73dcaa2e67229fd6443d89650afd
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 14 15:48:51 2021 +0200
gs-shell: Add a handler for the GsPluginLoader::ask-untrusted 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 f3baf41c9..02435ec42 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_untrusted_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)
{
@@ -2201,6 +2212,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-untrusted",
+ G_CALLBACK (gs_shell_ask_untrusted_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]