mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #539957: Replace struct named assignments by C99 "designated initializers"
Patch by Halton Huo. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17724 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -373,17 +373,17 @@ int gncAddressCompare (const GncAddress *a, const GncAddress *b)
|
||||
|
||||
static QofObject GncAddressDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_ADDRESS,
|
||||
type_label: "Address",
|
||||
create: (gpointer)qofAddressCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: NULL,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_ADDRESS,
|
||||
.type_label = "Address",
|
||||
.create = (gpointer)qofAddressCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = NULL,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncAddressRegister (void)
|
||||
|
||||
@@ -705,17 +705,17 @@ static void _gncBillTermDestroy (QofBook *book)
|
||||
|
||||
static QofObject gncBillTermDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Billing Term",
|
||||
create: (gpointer)gncBillTermCreate,
|
||||
book_begin: _gncBillTermCreate,
|
||||
book_end: _gncBillTermDestroy,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: NULL,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Billing Term",
|
||||
.create = (gpointer)gncBillTermCreate,
|
||||
.book_begin = _gncBillTermCreate,
|
||||
.book_end = _gncBillTermDestroy,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = NULL,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncBillTermRegister (void)
|
||||
|
||||
@@ -578,17 +578,17 @@ static const char * _gncCustomerPrintable (gpointer item)
|
||||
|
||||
static QofObject gncCustomerDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Customer",
|
||||
create: (gpointer)gncCustomerCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: (const char* (*)(gpointer))gncCustomerGetName,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Customer",
|
||||
.create = (gpointer)gncCustomerCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = (const char* (*)(gpointer))gncCustomerGetName,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncCustomerRegister (void)
|
||||
|
||||
@@ -420,17 +420,17 @@ static const char * _gncEmployeePrintable (gpointer item)
|
||||
|
||||
static QofObject gncEmployeeDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Employee",
|
||||
create: (gpointer)gncEmployeeCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: _gncEmployeePrintable,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Employee",
|
||||
.create = (gpointer)gncEmployeeCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = _gncEmployeePrintable,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncEmployeeRegister (void)
|
||||
|
||||
@@ -1240,17 +1240,17 @@ int gncEntryCompare (const GncEntry *a, const GncEntry *b)
|
||||
|
||||
static QofObject gncEntryDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Order/Invoice/Bill Entry",
|
||||
create: (gpointer)gncEntryCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: NULL,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Order/Invoice/Bill Entry",
|
||||
.create = (gpointer)gncEntryCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = NULL,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncEntryRegister (void)
|
||||
|
||||
@@ -1681,17 +1681,17 @@ static const char * _gncInvoicePrintable (gpointer obj)
|
||||
|
||||
static QofObject gncInvoiceDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Invoice",
|
||||
create: (gpointer)gncInvoiceCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: _gncInvoicePrintable,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Invoice",
|
||||
.create = (gpointer)gncInvoiceCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = _gncInvoicePrintable,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
static void
|
||||
|
||||
@@ -368,17 +368,17 @@ static const char * _gncJobPrintable (gpointer item)
|
||||
|
||||
static QofObject gncJobDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Job",
|
||||
create: (gpointer)gncJobCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: _gncJobPrintable,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Job",
|
||||
.create = (gpointer)gncJobCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = _gncJobPrintable,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncJobRegister (void)
|
||||
|
||||
@@ -422,17 +422,17 @@ _gncOrderPrintable (gpointer obj)
|
||||
|
||||
static QofObject gncOrderDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Order",
|
||||
create: (gpointer)gncOrderCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: _gncOrderPrintable,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Order",
|
||||
.create = (gpointer)gncOrderCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = _gncOrderPrintable,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncOrderRegister (void)
|
||||
|
||||
@@ -802,17 +802,17 @@ static void _gncTaxTableDestroy (QofBook *book)
|
||||
|
||||
static QofObject gncTaxTableDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Tax Table",
|
||||
create: (gpointer)gncTaxTableCreate,
|
||||
book_begin: _gncTaxTableCreate,
|
||||
book_end: _gncTaxTableDestroy,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: NULL,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Tax Table",
|
||||
.create = (gpointer)gncTaxTableCreate,
|
||||
.book_begin = _gncTaxTableCreate,
|
||||
.book_end = _gncTaxTableDestroy,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = NULL,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncTaxTableRegister (void)
|
||||
|
||||
@@ -521,17 +521,17 @@ static const char * _gncVendorPrintable (gpointer item)
|
||||
|
||||
static QofObject gncVendorDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: _GNC_MOD_NAME,
|
||||
type_label: "Vendor",
|
||||
create: (gpointer)gncVendorCreate,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: _gncVendorPrintable,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = _GNC_MOD_NAME,
|
||||
.type_label = "Vendor",
|
||||
.create = (gpointer)gncVendorCreate,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = _gncVendorPrintable,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean gncVendorRegister (void)
|
||||
|
||||
@@ -4535,17 +4535,17 @@ xaccAccountForEachTransaction(const Account *acc, TransactionCallback proc,
|
||||
/* QofObject function implementation and registration */
|
||||
|
||||
static QofObject account_object_def = {
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_ACCOUNT,
|
||||
type_label: "Account",
|
||||
create: (gpointer)xaccMallocAccount,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: (const char* (*)(gpointer)) xaccAccountGetName,
|
||||
version_cmp: (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_ACCOUNT,
|
||||
.type_label = "Account",
|
||||
.create = (gpointer)xaccMallocAccount,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = (const char* (*)(gpointer)) xaccAccountGetName,
|
||||
.version_cmp = (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean xaccAccountRegister (void)
|
||||
|
||||
@@ -162,15 +162,15 @@ sxtg_mark_clean(QofCollection *col)
|
||||
|
||||
static QofObject sxtg_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_SXTG,
|
||||
type_label: "Scheduled Transaction Templates",
|
||||
book_begin: sxtg_book_begin,
|
||||
book_end: sxtg_book_end,
|
||||
is_dirty: sxtg_is_dirty,
|
||||
mark_clean: sxtg_mark_clean,
|
||||
foreach: NULL,
|
||||
printable: NULL,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_SXTG,
|
||||
.type_label = "Scheduled Transaction Templates",
|
||||
.book_begin = sxtg_book_begin,
|
||||
.book_end = sxtg_book_end,
|
||||
.is_dirty = sxtg_is_dirty,
|
||||
.mark_clean = sxtg_mark_clean,
|
||||
.foreach = NULL,
|
||||
.printable = NULL,
|
||||
};
|
||||
|
||||
/* ====================================================================== */
|
||||
@@ -294,32 +294,32 @@ book_sxlist_notsaved(const QofCollection *col)
|
||||
|
||||
static QofObject sxes_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_SXES,
|
||||
type_label: "Scheduled Transactions List",
|
||||
create: NULL,
|
||||
book_begin: book_sxes_setup,
|
||||
book_end: NULL,
|
||||
is_dirty: book_sxlist_notsaved,
|
||||
mark_clean: book_sxns_mark_saved,
|
||||
foreach: NULL,
|
||||
printable: NULL,
|
||||
version_cmp: NULL
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_SXES,
|
||||
.type_label = "Scheduled Transactions List",
|
||||
.create = NULL,
|
||||
.book_begin = book_sxes_setup,
|
||||
.book_end = NULL,
|
||||
.is_dirty = book_sxlist_notsaved,
|
||||
.mark_clean = book_sxns_mark_saved,
|
||||
.foreach = NULL,
|
||||
.printable = NULL,
|
||||
.version_cmp = NULL
|
||||
};
|
||||
|
||||
static QofObject sxtt_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_SXTT,
|
||||
type_label: "Scheduled Transaction Templates",
|
||||
create: NULL,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: NULL,
|
||||
mark_clean: NULL,
|
||||
foreach: NULL,
|
||||
printable: NULL,
|
||||
version_cmp: NULL,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_SXTT,
|
||||
.type_label = "Scheduled Transaction Templates",
|
||||
.create = NULL,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = NULL,
|
||||
.mark_clean = NULL,
|
||||
.foreach = NULL,
|
||||
.printable = NULL,
|
||||
.version_cmp = NULL,
|
||||
};
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -851,17 +851,17 @@ gnc_sx_get_defer_instances( SchedXaction *sx )
|
||||
|
||||
static QofObject SXDesc =
|
||||
{
|
||||
interface_version : QOF_OBJECT_VERSION,
|
||||
e_type : GNC_SX_ID,
|
||||
type_label : "Scheduled Transaction",
|
||||
create : (gpointer)xaccSchedXactionMalloc,
|
||||
book_begin : NULL,
|
||||
book_end : NULL,
|
||||
is_dirty : qof_collection_is_dirty,
|
||||
mark_clean : qof_collection_mark_clean,
|
||||
foreach : qof_collection_foreach,
|
||||
printable : NULL,
|
||||
version_cmp : (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_SX_ID,
|
||||
.type_label = "Scheduled Transaction",
|
||||
.create = (gpointer)xaccSchedXactionMalloc,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = NULL,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -1758,17 +1758,17 @@ xaccSplitUnvoid(Split *split)
|
||||
/* Hook into the QofObject registry */
|
||||
|
||||
static QofObject split_object_def = {
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_SPLIT,
|
||||
type_label: "Split",
|
||||
create: (gpointer)xaccMallocSplit,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: (const char* (*)(gpointer)) xaccSplitGetMemo,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_SPLIT,
|
||||
.type_label = "Split",
|
||||
.create = (gpointer)xaccMallocSplit,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = (const char* (*)(gpointer)) xaccSplitGetMemo,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
static gpointer
|
||||
|
||||
@@ -1912,17 +1912,17 @@ xaccTransFindSplitByAccount(const Transaction *trans, const Account *acc)
|
||||
|
||||
/* Hook into the QofObject registry */
|
||||
static QofObject trans_object_def = {
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_TRANS,
|
||||
type_label: "Transaction",
|
||||
create: (gpointer)xaccMallocTransaction,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: (const char* (*)(gpointer)) xaccTransGetDescription,
|
||||
version_cmp: (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_TRANS,
|
||||
.type_label = "Transaction",
|
||||
.create = (gpointer)xaccMallocTransaction,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = (const char* (*)(gpointer)) xaccTransGetDescription,
|
||||
.version_cmp = (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -596,17 +596,17 @@ gnc_budget_get_default (QofBook *book)
|
||||
/* Define the QofObject. */
|
||||
static QofObject budget_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_BUDGET,
|
||||
type_label: "Budget",
|
||||
create: (gpointer)gnc_budget_new,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: (const char* (*)(gpointer)) gnc_budget_get_name,
|
||||
version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_BUDGET,
|
||||
.type_label = "Budget",
|
||||
.create = (gpointer)gnc_budget_new,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = (const char* (*)(gpointer)) gnc_budget_get_name,
|
||||
.version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2319,28 +2319,28 @@ gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book)
|
||||
|
||||
static QofObject commodity_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_COMMODITY,
|
||||
type_label: "Commodity",
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: (const char* (*)(gpointer)) gnc_commodity_get_fullname,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_COMMODITY,
|
||||
.type_label = "Commodity",
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = (const char* (*)(gpointer)) gnc_commodity_get_fullname,
|
||||
};
|
||||
|
||||
static QofObject namespace_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_COMMODITY_NAMESPACE,
|
||||
type_label: "Namespace",
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: NULL,
|
||||
mark_clean: NULL,
|
||||
foreach: NULL,
|
||||
printable: NULL,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_COMMODITY_NAMESPACE,
|
||||
.type_label = "Namespace",
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = NULL,
|
||||
.mark_clean = NULL,
|
||||
.foreach = NULL,
|
||||
.printable = NULL,
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -2375,17 +2375,17 @@ commodity_table_book_end (QofBook *book)
|
||||
|
||||
static QofObject commodity_table_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_COMMODITY_TABLE,
|
||||
type_label: "CommodityTable",
|
||||
create: NULL,
|
||||
book_begin: commodity_table_book_begin,
|
||||
book_end: commodity_table_book_end,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: NULL,
|
||||
printable: NULL,
|
||||
version_cmp: NULL,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_COMMODITY_TABLE,
|
||||
.type_label = "CommodityTable",
|
||||
.create = NULL,
|
||||
.book_begin = commodity_table_book_begin,
|
||||
.book_end = commodity_table_book_end,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = NULL,
|
||||
.printable = NULL,
|
||||
.version_cmp = NULL,
|
||||
};
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -438,17 +438,17 @@ gnc_lot_get_latest_split (GNCLot *lot)
|
||||
|
||||
static QofObject gncLotDesc =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_LOT,
|
||||
type_label: "Lot",
|
||||
create: (gpointer)gnc_lot_new,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: qof_collection_foreach,
|
||||
printable: NULL,
|
||||
version_cmp: (int (*)(gpointer,gpointer))qof_instance_version_cmp,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_LOT,
|
||||
.type_label = "Lot",
|
||||
.create = (gpointer)gnc_lot_new,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = qof_collection_foreach,
|
||||
.printable = NULL,
|
||||
.version_cmp = (int (*)(gpointer,gpointer))qof_instance_version_cmp,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2444,32 +2444,32 @@ price_printable(gpointer obj)
|
||||
|
||||
static QofObject price_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_PRICE,
|
||||
type_label: "Price",
|
||||
create: price_create,
|
||||
book_begin: NULL,
|
||||
book_end: NULL,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: price_foreach,
|
||||
printable: price_printable,
|
||||
version_cmp: NULL,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_PRICE,
|
||||
.type_label = "Price",
|
||||
.create = price_create,
|
||||
.book_begin = NULL,
|
||||
.book_end = NULL,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = price_foreach,
|
||||
.printable = price_printable,
|
||||
.version_cmp = NULL,
|
||||
};
|
||||
|
||||
static QofObject pricedb_object_def =
|
||||
{
|
||||
interface_version: QOF_OBJECT_VERSION,
|
||||
e_type: GNC_ID_PRICEDB,
|
||||
type_label: "PriceDB",
|
||||
create: NULL,
|
||||
book_begin: pricedb_book_begin,
|
||||
book_end: pricedb_book_end,
|
||||
is_dirty: qof_collection_is_dirty,
|
||||
mark_clean: qof_collection_mark_clean,
|
||||
foreach: NULL,
|
||||
printable: NULL,
|
||||
version_cmp: NULL,
|
||||
.interface_version = QOF_OBJECT_VERSION,
|
||||
.e_type = GNC_ID_PRICEDB,
|
||||
.type_label = "PriceDB",
|
||||
.create = NULL,
|
||||
.book_begin = pricedb_book_begin,
|
||||
.book_end = pricedb_book_end,
|
||||
.is_dirty = qof_collection_is_dirty,
|
||||
.mark_clean = qof_collection_mark_clean,
|
||||
.foreach = NULL,
|
||||
.printable = NULL,
|
||||
.version_cmp = NULL,
|
||||
};
|
||||
|
||||
gboolean
|
||||
|
||||
Reference in New Issue
Block a user