Add upstream patch avoid_double_init_of_gui.patch to fix broken AqBanking 6.x integration
Micha Lenk
4 years ago
0 | Author: Christian Stimming <christian@cstimming.de> | |
1 | Date: Sun Sep 29 21:58:42 2019 +0200 | |
2 | Subject: [aqbanking] Bug 797430: Avoid double init of gui | |
3 | ||
4 | Patch by Mike Pieper. Thanks! | |
5 | ||
6 | Explanation for why this is necessary: The previous (old) behaviour | |
7 | changed in 62f7aa66. Before this commit (or when AQBANKING6 is not | |
8 | set) it calls AB_JobSepaTransfer_new. For AQBANKING6 it calls | |
9 | AB_Transaction_new. AB_Transaction_new is not using gui. Therefore | |
10 | gui->state stays on INIT, while before it made several status changes | |
11 | (=> RUNNING, FINISHED, HIDDEN). On second call to gnc_GWEN_Gui_get it | |
12 | checks the state and finds it still in INIT which seems to be wrong. | |
13 | ||
14 | So the right fix is to either use gui in AB_Transaction_new or to | |
15 | remove first allocation, which is done here. | |
16 | ||
17 | Origin: upstream, https://github.com/Gnucash/gnucash/commit/82e9b14dc5fde111821577cce546932fdb1e2418 | |
18 | Bug: https://bugs.gnucash.org/show_bug.cgi?id=797430 | |
19 | Last-Update: 2019-10-20 | |
20 | ||
21 | diff --git a/gnucash/import-export/aqb/gnc-ab-transfer.c b/gnucash/import-export/aqb/gnc-ab-transfer.c | |
22 | index 928d97cef..153aaab36 100644 | |
23 | --- a/gnucash/import-export/aqb/gnc-ab-transfer.c | |
24 | +++ b/gnucash/import-export/aqb/gnc-ab-transfer.c | |
25 | @@ -142,6 +142,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc, | |
26 | GNC_AB_JOB_STATUS job_status; | |
27 | GncABImExContextImport *ieci = NULL; | |
28 | ||
29 | +#ifndef AQBANKING6 | |
30 | /* Get a GUI object */ | |
31 | gui = gnc_GWEN_Gui_get(parent); | |
32 | if (!gui) | |
33 | @@ -150,6 +151,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc, | |
34 | aborted = TRUE; | |
35 | goto repeat; | |
36 | } | |
37 | +#endif | |
38 | ||
39 | /* Let the user enter the values */ | |
40 | result = gnc_ab_trans_dialog_run_until_ok(td); |