gnucash maint: Parent the AQB balance dialog to the matcher window when it's present.
John Ralls
jralls at code.gnucash.org
Fri Sep 24 18:01:40 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/3d9faf70 (commit)
from https://github.com/Gnucash/gnucash/commit/b6cbc978 (commit)
commit 3d9faf70d8373ef9c05f83ac1c82c318e96f5b7f
Author: John Ralls <jralls at ceridwen.us>
Date: Fri Sep 24 15:01:07 2021 -0700
Parent the AQB balance dialog to the matcher window when it's present.
diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index 3c6799cf1..1a91d6308 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -1033,16 +1033,18 @@ bal_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
if (!(data->awaiting & AWAIT_BALANCES))
{
+ GtkWindow *parent = data->generic_importer ?
+ GTK_WINDOW(data->generic_importer) :
+ GTK_WINDOW(data->parent);
+ const char* balance_msg =
+ _("The bank has sent balance information in its response.\n"
+ "Do you want to import it?");
/* Ignore zero balances if we don't await a balance */
if (!booked_bal || AB_Value_IsZero(AB_Balance_GetValue(booked_bal)))
return NULL;
/* Ask the user whether to import unawaited non-zero balance */
- if (gnc_verify_dialog (GTK_WINDOW (data->parent), TRUE, "%s",
- _("The bank has sent balance information "
- "in its response."
- "\n"
- "Do you want to import it?")))
+ if (gnc_verify_dialog (parent, TRUE, "%s", balance_msg))
{
data->awaiting |= AWAIT_BALANCES;
}
Summary of changes:
gnucash/import-export/aqb/gnc-ab-utils.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list