diff --git a/ChangeLog b/ChangeLog index 5c9c029e8f..da9596f200 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-26 Christian Stimming + + * src/import-export/hbci/gnc-hbci-kvp.c (force_account_dirty): + Force account 'dirty' after modifying the kvp_frame. Hopefully + fixes #165096. + 2005-02-21 Christian Stimming * src/import-export/import-backend.c, import-backend.h, diff --git a/src/import-export/hbci/gnc-hbci-kvp.c b/src/import-export/hbci/gnc-hbci-kvp.c index 2759e3529c..16443169fb 100644 --- a/src/import-export/hbci/gnc-hbci-kvp.c +++ b/src/import-export/hbci/gnc-hbci-kvp.c @@ -31,6 +31,14 @@ #define HBCI_TRANS_RETRIEVAL "trans-retrieval" #define HBCI_ACCOUNTS "hbci-accounts" +static void force_account_dirty(Account *acct) +{ + /* This is necessary because modifying the KvpFrames doesn't mark + accounts dirty, which means the changes wont be propagated to the + backend. */ + xaccAccountSetName(acct, xaccAccountGetName(acct)); +} + /* Account */ char *gnc_hbci_get_account_accountid (Account *a) { @@ -56,6 +64,7 @@ void gnc_hbci_set_account_accountid (Account *a, const char *id) kvp_value *value = kvp_value_new_string (id); xaccAccountBeginEdit(a); kvp_frame_set_slot_nc (frame, HBCI_ACCOUNT_ID, value); + force_account_dirty (a); xaccAccountCommitEdit (a); } void gnc_hbci_set_account_bankcode (Account *a, const char *code) @@ -64,6 +73,7 @@ void gnc_hbci_set_account_bankcode (Account *a, const char *code) kvp_value *value = kvp_value_new_string (code); xaccAccountBeginEdit (a); kvp_frame_set_slot_nc (frame, HBCI_BANK_CODE, value); + force_account_dirty (a); xaccAccountCommitEdit (a); } void gnc_hbci_set_account_countrycode (Account *a, gint code) @@ -72,6 +82,7 @@ void gnc_hbci_set_account_countrycode (Account *a, gint code) kvp_value *value = kvp_value_new_gint64 (code); xaccAccountBeginEdit (a); kvp_frame_set_slot_nc (frame, HBCI_COUNTRY_CODE, value); + force_account_dirty (a); xaccAccountCommitEdit (a); } gint gnc_hbci_get_account_uid (Account *a) @@ -86,6 +97,7 @@ void gnc_hbci_set_account_uid (Account *a, gint uid) kvp_value *value = kvp_value_new_gint64 (uid); xaccAccountBeginEdit (a); kvp_frame_set_slot_nc (frame, HBCI_ACCOUNT_UID, value); + force_account_dirty (a); xaccAccountCommitEdit (a); } Timespec gnc_hbci_get_account_trans_retrieval (Account *a) @@ -100,6 +112,7 @@ void gnc_hbci_set_account_trans_retrieval (Account *a, Timespec time) kvp_value *value = kvp_value_new_timespec (time); xaccAccountBeginEdit (a); kvp_frame_set_slot_nc (frame, HBCI_TRANS_RETRIEVAL, value); + force_account_dirty (a); xaccAccountCommitEdit (a); }