Do not prepare the match page in the online banking wizard twice.

This would online_init() the api too often and lead to a crash.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17346 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2008-07-20 02:09:06 +00:00
parent 35a35be305
commit 8582d3290c

View File

@@ -88,6 +88,7 @@ struct _ABInitialInfo {
GtkWidget *druid;
/* account match page */
gboolean match_page_prepared;
GtkTreeView *account_view;
GtkListStore *account_store;
@@ -309,13 +310,18 @@ dai_match_page_prepare_cb(GnomeDruidPage *druid_page, GtkWidget *widget,
Account *root;
AccCbData data;
g_return_if_fail(info && info->api);
/* No way back */
gnome_druid_set_buttons_sensitive(GNOME_DRUID(info->druid),
FALSE, TRUE, TRUE, TRUE);
/* Do not run this twice */
if (info->match_page_prepared)
return;
else
info->match_page_prepared = TRUE;
/* Load aqbanking accounts */
AB_Banking_OnlineInit(info->api);
@@ -738,6 +744,7 @@ gnc_ab_initial_druid(void)
info->deferred_info = NULL;
info->gnc_hash = NULL;
info->match_page_prepared = FALSE;
info->account_view =
GTK_TREE_VIEW(glade_xml_get_widget(xml, "account_page_view"));
info->account_store = gtk_list_store_new(NUM_ACCOUNT_LIST_COLS,