Replace no-op function force_account_dirty with qof_book_mark_dirty

See bug #665998 for more details.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21740 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-12-18 18:13:02 +00:00
parent ef7d41a956
commit b24be97528

View File

@ -42,7 +42,6 @@
/* 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);
@ -61,7 +60,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);
force_account_dirty(a);
qof_book_mark_dirty(gnc_get_current_book());
xaccAccountCommitEdit(a);
}
@ -80,7 +79,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);
force_account_dirty(a);
qof_book_mark_dirty(gnc_get_current_book());
xaccAccountCommitEdit(a);
}
@ -99,7 +98,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);
force_account_dirty(a);
qof_book_mark_dirty(gnc_get_current_book());
xaccAccountCommitEdit(a);
}
@ -118,7 +117,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);
force_account_dirty(a);
qof_book_mark_dirty(gnc_get_current_book());
xaccAccountCommitEdit(a);
}
@ -141,20 +140,6 @@ 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)
{