From 3d9faf70d8373ef9c05f83ac1c82c318e96f5b7f Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 24 Sep 2021 15:01:07 -0700 Subject: [PATCH] Parent the AQB balance dialog to the matcher window when it's present. --- gnucash/import-export/aqb/gnc-ab-utils.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c index 3c6799cf10..1a91d63083 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; }