[gnome-software/603-gnome-software-reports-unknown-error-when-there-is-a-signing-issue: 388/389] gs-shell: Add a handler for the GsPluginLoader::ask-user-accepts 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: 388/389] gs-shell: Add a handler for the GsPluginLoader::ask-user-accepts signal
- Date: Mon, 20 Sep 2021 12:27:00 +0000 (UTC)
commit 9cebcf451214cd7566c5d6390a3ca3a30d5a6ffb
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 18c9e98f4..fc51ad5f4 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_widget_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)
{
@@ -2203,6 +2214,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]