diff --git a/ChangeLog b/ChangeLog index ee1f41f357..5b12e51028 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-07-15 Christian Stimming + + * src/import-export/hbci/druid-hbci-initial.c: Remove obsolete + buttons for aqbanking/hbci setup that are unneeded. Fix crash due + to dangling points by deleting all pointers after calling + AB_Banking_Fini. + 2006-07-14 Derek Atkins * configure.in: diff --git a/src/import-export/hbci/druid-hbci-initial.c b/src/import-export/hbci/druid-hbci-initial.c index 9379a9c1b6..ab2674eb26 100644 --- a/src/import-export/hbci/druid-hbci-initial.c +++ b/src/import-export/hbci/druid-hbci-initial.c @@ -51,13 +51,6 @@ /* #define DEFAULT_HBCI_VERSION 201 */ -typedef enum _infostate { - INI_UPDATE_ACCOUNTS, - INI_MATCH_ACCOUNTS, - UPDATE_ACCOUNTS, - MATCH_ACCOUNTS -} Infostate; - struct _hbciinitialinfo { GtkWidget *window; @@ -79,9 +72,6 @@ struct _hbciinitialinfo /* hbci_account (direct) -> gnucash_account -- DO NOT DELETE THE KEYS! */ GHashTable *gnc_hash; - /* Status of user's movement through the wizard */ - Infostate state; - }; static gboolean @@ -332,25 +322,6 @@ on_aqbutton_prepare (GnomeDruidPage *gnomedruidpage, } -static gboolean -on_accountlist_back (GnomeDruidPage *gnomedruidpage, - gpointer arg1, - gpointer user_data) -{ - HBCIInitialInfo *info = user_data; - g_assert(info); - - switch (info->state) { - case INI_MATCH_ACCOUNTS: - case MATCH_ACCOUNTS: - gnome_druid_set_page (GNOME_DRUID (info->druid), - GNOME_DRUID_PAGE (info->filepage)); - return TRUE; - default: - return FALSE; - } -} - static void on_accountlist_prepare (GnomeDruidPage *gnomedruidpage, gpointer arg1, @@ -422,28 +393,6 @@ on_accountlist_select_row (GtkCList *clist, gint row, -static void -on_button_clicked (GtkButton *button, - gpointer user_data) -{ - HBCIInitialInfo *info = user_data; - const char *name; - g_assert(info->druid); - - name = gtk_widget_get_name (GTK_WIDGET (button)); - if (strcmp (name, "aqhbci_button") == 0) { -/* info->state = ADD_BANK; */ - /* gnome_druid_set_page (GNOME_DRUID (info->druid), - GNOME_DRUID_PAGE (info->bankpage)); */ - } else if (strcmp (name, "updatelist_button") == 0) { - info->state = UPDATE_ACCOUNTS; - /* Nothing else to do. */ - } else { - printf("on_button_clicked: Oops, unknown button: %s\n", - name); - } -} - #if (AQBANKING_VERSION_MAJOR > 1) || \ ((AQBANKING_VERSION_MAJOR == 1) && \ (AQBANKING_VERSION_MINOR == 9) && \ @@ -593,8 +542,14 @@ on_aqhbci_button (GtkButton *button, /* Call the qt wizard. See the note above about why this approach is chosen. */ - /* In gtk2, this would be g_spawn_async or similar. */ + /* Reset existing mapping tables */ AB_Banking_Fini (info->api); + delete_hash (info->hbci_hash); + info->hbci_hash = NULL; + if (info->gnc_hash != NULL) + g_hash_table_destroy (info->gnc_hash); + info->gnc_hash = NULL; + /* In gtk2, this would be g_spawn_async or similar. */ { pid_t pid; pid = fork(); @@ -705,16 +660,8 @@ void gnc_hbci_initial_druid (void) info->accountlist = glade_xml_get_widget(xml, "account_page_list"); g_signal_connect (info->accountlist, "select_row", G_CALLBACK (on_accountlist_select_row), info); - g_signal_connect (glade_xml_get_widget (xml, "aqhbci_again_button"), - "clicked", - G_CALLBACK (on_aqhbci_button), info); - g_signal_connect (glade_xml_get_widget (xml, "updatelist_button"), - "clicked", - G_CALLBACK (on_button_clicked), info); g_signal_connect (page, "prepare", G_CALLBACK (on_accountlist_prepare), info); - g_signal_connect (page, "back", - G_CALLBACK (on_accountlist_back), info); } diff --git a/src/import-export/hbci/glade/hbci.glade b/src/import-export/hbci/glade/hbci.glade index 4eaa4e87df..eb32a35c74 100644 --- a/src/import-export/hbci/glade/hbci.glade +++ b/src/import-export/hbci/glade/hbci.glade @@ -185,108 +185,74 @@ Press "Cancel" if you do not wish to setup any HBCI connection now.

0 - + True False 0 - + True - False - 0 + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT - + True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS + True + 3 + 281,242,53 + GTK_SELECTION_SINGLE + True GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - True - True - 3 - 281,242,53 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_IN + + HBCI account name + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + - - - HBCI account name - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - + + + GnuCash account name + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + - - - GnuCash account name - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - - - - New? - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - + + + New? + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 - - 0 - True - True - - - - - - True - Click on the line of a HBCI account name if you want to match it to a GnuCash account. Click "Forward" when all desired accounts are matching. - False - False - GTK_JUSTIFY_LEFT - True - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - @@ -297,78 +263,23 @@ Press "Cancel" if you do not wish to setup any HBCI connection now.

- + True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - 5 - True - False - 5 - - - - True - True - Update -account list - True - GTK_RELIEF_NORMAL - True - - - 0 - False - False - - - - - - True - True - AqHBCI -Setup - True - GTK_RELIEF_NORMAL - True - - - 0 - False - False - - - - - - - - True - HBCI Setup - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - + Click on the line of a HBCI account name if you want to match it to a GnuCash account. Click "Forward" when all desired accounts are matching. + False + False + GTK_JUSTIFY_LEFT + True + False + 0.5 + 0.5 + 0 + 0 0 False - True + False
@@ -1519,6 +1430,7 @@ Press "Apply" now. 0
+ True @@ -1531,7 +1443,6 @@ Press "Apply" now. 0 - 0 @@ -1888,6 +1799,7 @@ Press "Apply" now. 2 + True @@ -1900,7 +1812,6 @@ Press "Apply" now. 1 - 0 @@ -2251,6 +2162,7 @@ Press "Apply" now. 0 + True @@ -2263,7 +2175,6 @@ Press "Apply" now. 0 - 0