From 76b257584843150ad8c111c61b591dfabf7ac629 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Mon, 5 Jun 2023 20:17:37 +0100 Subject: [PATCH] Allow warning dialogs to be the dismiss-only variant All existing dialogs are either QUESTION or WARNING. Allow INFO, ERROR and OTHER to remember being dismissed without asking a question. --- gnucash/gnome-utils/dialog-utils.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gnucash/gnome-utils/dialog-utils.c b/gnucash/gnome-utils/dialog-utils.c index 01f8c49b75..e96e4d77e3 100644 --- a/gnucash/gnome-utils/dialog-utils.c +++ b/gnucash/gnome-utils/dialog-utils.c @@ -749,18 +749,12 @@ gnc_dialog_run (GtkDialog *dialog, const gchar *pref_name) return response; /* Add in the checkboxes to find out if the answer should be remembered. */ -#if 0 if (GTK_IS_MESSAGE_DIALOG(dialog)) { GtkMessageType type; g_object_get(dialog, "message-type", &type, (gchar*)NULL); - ask = (type == GTK_MESSAGE_QUESTION); + ask = (type == GTK_MESSAGE_QUESTION || type == GTK_MESSAGE_WARNING); } - else - { - ask = FALSE; - } -#endif perm = gtk_check_button_new_with_mnemonic (ask ? _("Remember and don't _ask me again.")