Skip to content

Commit

Permalink
Revert "Replace no-op function force_account_dirty with qof_book_mark…
Browse files Browse the repository at this point in the history
…_dirty"

This commit had some unintended changes.

This reverts commit 6b6eba2d7e56a4359ca646abb2b0c6c965712ce0.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21739 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
gjanssens committed Dec 18, 2011
1 parent 885898f commit ef7d41a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
23 changes: 19 additions & 4 deletions src/import-export/aqbanking/gnc-ab-kvp.c
Expand Up @@ -42,6 +42,7 @@
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = G_LOG_DOMAIN;

static void force_account_dirty(Account *acct);
static kvp_frame *gnc_ab_get_account_kvp(const Account *a, gboolean create);
static kvp_frame *gnc_ab_get_book_kvp(QofBook *b, gboolean create);

Expand All @@ -60,7 +61,7 @@ gnc_ab_set_account_accountid(Account *a, const gchar *id)
kvp_value *value = kvp_value_new_string(id);
xaccAccountBeginEdit(a);
kvp_frame_set_slot_nc(frame, AB_ACCOUNT_ID, value);
qof_book_mark_dirty(gnc_get_current_book());
force_account_dirty(a);
xaccAccountCommitEdit(a);
}

Expand All @@ -79,7 +80,7 @@ gnc_ab_set_account_bankcode(Account *a, const gchar *code)
kvp_value *value = kvp_value_new_string(code);
xaccAccountBeginEdit(a);
kvp_frame_set_slot_nc(frame, AB_BANK_CODE, value);
qof_book_mark_dirty(gnc_get_current_book());
force_account_dirty(a);
xaccAccountCommitEdit(a);
}

Expand All @@ -98,7 +99,7 @@ gnc_ab_set_account_uid(Account *a, guint32 uid)
kvp_value *value = kvp_value_new_gint64(uid);
xaccAccountBeginEdit(a);
kvp_frame_set_slot_nc(frame, AB_ACCOUNT_UID, value);
qof_book_mark_dirty(gnc_get_current_book());
force_account_dirty(a);
xaccAccountCommitEdit(a);
}

Expand All @@ -117,7 +118,7 @@ gnc_ab_set_account_trans_retrieval(Account *a, Timespec time)
kvp_value *value = kvp_value_new_timespec(time);
xaccAccountBeginEdit(a);
kvp_frame_set_slot_nc(frame, AB_TRANS_RETRIEVAL, value);
qof_book_mark_dirty(gnc_get_current_book());
force_account_dirty(a);
xaccAccountCommitEdit(a);
}

Expand All @@ -140,6 +141,20 @@ gnc_ab_set_book_template_list(QofBook *b, GList *template_list)
qof_book_commit_edit(b);
}

static void
force_account_dirty(Account *acct)
{
gchar *name = g_strdup(xaccAccountGetName(acct));
QofBook *book = gnc_get_current_book ();
/* This is necessary because modifying the KvpFrames doesn't mark
* accounts dirty, which means the changes wont be propagated to the
* backend.
*/
qof_book_mark_dirty(book);
xaccAccountSetName(acct, name);
g_free(name);
}

static kvp_frame *
gnc_ab_get_account_kvp(const Account *a, gboolean create)
{
Expand Down
1 change: 0 additions & 1 deletion src/report/standard-reports/standard-reports.scm
Expand Up @@ -118,7 +118,6 @@
)
)

(gnc:debug "stdrpt-dir=" (gnc-path-get-stdreportsdir))
(gnc:debug "dir-files=" (directory-files (gnc-path-get-stdreportsdir)))
(gnc:debug "processed=" (process-file-list (directory-files (gnc-path-get-stdreportsdir))))
(gnc:debug "report-list=" (get-report-list))
Expand Down

0 comments on commit ef7d41a

Please sign in to comment.