void xaccAccountScrubKvp (Account *account) { const gchar *str; gchar *str2; KvpFrame *frame; if (!account) return; str = kvp_frame_get_string(account->inst.kvp_data, "notes"); if (str) { str2 = g_strstrip(g_strdup(str)); if (strlen(str2) == 0) kvp_frame_set_slot_nc (account->inst.kvp_data, "notes", NULL); g_free(str2); } str = kvp_frame_get_string(account->inst.kvp_data, "placeholder"); if (str && strcmp(str, "false") == 0) kvp_frame_set_slot_nc (account->inst.kvp_data, "placeholder", NULL); frame = kvp_frame_get_frame(account->inst.kvp_data, "hbci"); if (frame && kvp_frame_is_empty(frame)) { kvp_frame_set_frame_nc(account->inst.kvp_data, "hbci", NULL); } }
void gncEntryCommitEdit (GncEntry *entry) { /* GnuCash 2.6.3 and earlier didn't handle entry kvp's... */ if (!kvp_frame_is_empty (entry->inst.kvp_data)) gnc_features_set_used (qof_instance_get_book (QOF_INSTANCE (entry)), GNC_FEATURE_KVP_EXTRA_DATA); if (!qof_commit_edit (QOF_INSTANCE(entry))) return; qof_commit_edit_part2 (&entry->inst, gncEntryOnError, gncEntryOnDone, entry_free); }
void gncAddressCommitEdit (GncAddress *addr) { /* GnuCash 2.6.3 and earlier didn't handle address kvp's... */ if (!kvp_frame_is_empty (addr->inst.kvp_data)) gnc_features_set_used (qof_instance_get_book (QOF_INSTANCE (addr)), GNC_FEATURE_KVP_EXTRA_DATA); if (!qof_commit_edit (QOF_INSTANCE(addr))) return; qof_commit_edit_part2 (&addr->inst, gncAddressOnError, gncAddressOnDone, address_free); }
void qof_backend_prepare_frame(QofBackend *be) { g_return_if_fail(be); if (!kvp_frame_is_empty(be->backend_configuration)) { kvp_frame_delete(be->backend_configuration); be->backend_configuration = kvp_frame_new(); } be->config_count = 0; }
void gncTaxTableCommitEdit (GncTaxTable *table) { /* GnuCash 2.6.3 and earlier didn't handle taxtable kvp's... */ if (!kvp_frame_is_empty (table->inst.kvp_data)) gnc_features_set_used (qof_instance_get_book (QOF_INSTANCE (table)), GNC_FEATURE_KVP_EXTRA_DATA); if (!qof_commit_edit (QOF_INSTANCE(table))) return; qof_commit_edit_part2 (&table->inst, gncTaxTableOnError, gncTaxTableOnDone, table_free); }