mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/business/business-core/file/gnc-*.c:
Add a "slots" parameter to allow for future expansion. Right now this is completely ignored (which will allow future releases to add a kvp-frame slots to any business function and allow that file to be read by older versions). Right now the slot is ignored, but that's better than barfing on the data file. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9285 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ddedc9f25b
commit
499a4d5e76
@ -1,3 +1,12 @@
|
||||
2003-09-11 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/business/business-core/file/gnc-*.c:
|
||||
Add a "slots" parameter to allow for future expansion. Right
|
||||
now this is completely ignored (which will allow future releases
|
||||
to add a kvp-frame slots to any business function and allow that
|
||||
file to be read by older versions). Right now the slot is ignored,
|
||||
but that's better than barfing on the data file.
|
||||
|
||||
2003-09-09 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/gnome-utils/dialog-transfer.c: during the dialog startup it
|
||||
|
@ -58,6 +58,7 @@ const gchar *address_version_string = "2.0.0";
|
||||
#define addr_phone_string "addr:phone"
|
||||
#define addr_fax_string "addr:fax"
|
||||
#define addr_email_string "addr:email"
|
||||
#define addr_slots_string "addr:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -173,6 +174,12 @@ address_email_handler (xmlNodePtr node, gpointer addr_pdata)
|
||||
return set_string(node, pdata->address, gncAddressSetEmail);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
address_slots_handler (xmlNodePtr node, gpointer addr_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler address_handlers_v2[] = {
|
||||
{ addr_name_string, address_name_handler, 0, 0 },
|
||||
{ addr_addr1_string, address_addr1_handler, 0, 0 },
|
||||
@ -182,6 +189,7 @@ static struct dom_tree_handler address_handlers_v2[] = {
|
||||
{ addr_phone_string, address_phone_handler, 0, 0 },
|
||||
{ addr_fax_string, address_fax_handler, 0, 0 },
|
||||
{ addr_email_string, address_email_handler, 0, 0 },
|
||||
{ addr_slots_string, address_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -63,6 +63,7 @@ const gchar *billterm_version_string = "2.0.0";
|
||||
#define billterm_invisible_string "billterm:invisible"
|
||||
#define billterm_parent_string "billterm:parent"
|
||||
#define billterm_child_string "billterm:child"
|
||||
#define billterm_slots_string "billterm:slots"
|
||||
|
||||
#define gnc_daystype_string "billterm:days"
|
||||
#define days_duedays_string "bt-days:due-days"
|
||||
@ -403,6 +404,12 @@ billterm_prox_data_handler (xmlNodePtr node, gpointer billterm_pdata)
|
||||
return dom_tree_to_prox_data (node, pdata);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
billterm_slots_handler (xmlNodePtr node, gpointer billterm_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler billterm_handlers_v2[] = {
|
||||
{ billterm_guid_string, billterm_guid_handler, 1, 0 },
|
||||
{ billterm_name_string, billterm_name_handler, 1, 0 },
|
||||
@ -411,6 +418,7 @@ static struct dom_tree_handler billterm_handlers_v2[] = {
|
||||
{ billterm_invisible_string, billterm_invisible_handler, 1, 0 },
|
||||
{ billterm_parent_string, billterm_parent_handler, 0, 0 },
|
||||
{ billterm_child_string, billterm_child_handler, 0, 0 },
|
||||
{ billterm_slots_string, billterm_slots_handler, 0, 0 },
|
||||
{ gnc_daystype_string, billterm_days_data_handler, 0, 0 },
|
||||
{ gnc_proximotype_string, billterm_prox_data_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
|
@ -72,6 +72,7 @@ const gchar *customer_version_string = "2.0.0";
|
||||
#define cust_currency_string "cust:currency"
|
||||
#define cust_taxtable_string "cust:taxtable"
|
||||
#define cust_taxtableoverride_string "cust:use-tt"
|
||||
#define cust_slots_string "cust:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -367,6 +368,12 @@ customer_taxtableoverride_handler (xmlNodePtr node, gpointer cust_pdata)
|
||||
return set_boolean (node, pdata->customer, gncCustomerSetTaxTableOverride);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
customer_slots_handler (xmlNodePtr node, gpointer cust_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler customer_handlers_v2[] = {
|
||||
{ cust_name_string, customer_name_handler, 1, 0 },
|
||||
{ cust_guid_string, customer_guid_handler, 1, 0 },
|
||||
@ -383,6 +390,7 @@ static struct dom_tree_handler customer_handlers_v2[] = {
|
||||
{ "cust:commodity", customer_currency_handler, 0, 0 }, /* XXX */
|
||||
{ cust_taxtable_string, customer_taxtable_handler, 0, 0 },
|
||||
{ cust_taxtableoverride_string, customer_taxtableoverride_handler, 0, 0 },
|
||||
{ cust_slots_string, customer_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -67,6 +67,7 @@ const gchar *employee_version_string = "2.0.0";
|
||||
#define employee_rate_string "employee:rate"
|
||||
#define employee_currency_string "employee:currency"
|
||||
#define employee_ccard_string "employee:ccard"
|
||||
#define employee_slots_string "employee:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -285,6 +286,12 @@ employee_ccard_handler (xmlNodePtr node, gpointer employee_pdata)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
employee_slots_handler (xmlNodePtr node, gpointer employee_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler employee_handlers_v2[] = {
|
||||
{ employee_username_string, employee_username_handler, 1, 0 },
|
||||
{ employee_guid_string, employee_guid_handler, 1, 0 },
|
||||
@ -298,6 +305,7 @@ static struct dom_tree_handler employee_handlers_v2[] = {
|
||||
{ employee_currency_string, employee_currency_handler, 0, 0 }, /* XXX */
|
||||
{ "employee:commodity", employee_currency_handler, 0, 0 }, /* XXX */
|
||||
{ employee_ccard_string, employee_ccard_handler, 0, 0 },
|
||||
{ employee_slots_string, employee_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -93,6 +93,7 @@ const gchar *entry_version_string = "2.0.0";
|
||||
#define entry_order_string "entry:order"
|
||||
#define entry_invoice_string "entry:invoice"
|
||||
#define entry_bill_string "entry:bill"
|
||||
#define entry_slots_string "entry:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -650,6 +651,12 @@ entry_price_handler (xmlNodePtr node, gpointer entry_pdata)
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
entry_slots_handler (xmlNodePtr node, gpointer entry_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler entry_handlers_v2[] = {
|
||||
{ entry_guid_string, entry_guid_handler, 1, 0 },
|
||||
{ entry_date_string, entry_date_handler, 1, 0 },
|
||||
@ -685,6 +692,7 @@ static struct dom_tree_handler entry_handlers_v2[] = {
|
||||
{ entry_order_string, entry_order_handler, 0, 0 },
|
||||
{ entry_invoice_string, entry_invoice_handler, 0, 0 },
|
||||
{ entry_bill_string, entry_bill_handler, 0, 0 },
|
||||
{ entry_slots_string, entry_slots_handler, 0, 0 },
|
||||
|
||||
/* Old XML support */
|
||||
{ "entry:acct", entry_acct_handler, 0, 0 },
|
||||
|
@ -72,6 +72,7 @@ const gchar *invoice_version_string = "2.0.0";
|
||||
#define invoice_currency_string "invoice:currency"
|
||||
#define invoice_billto_string "invoice:billto"
|
||||
#define invoice_tochargeamt_string "invoice:charge-amt"
|
||||
#define invoice_slots_string "invoice:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -398,6 +399,12 @@ invoice_tochargeamt_handler (xmlNodePtr node, gpointer invoice_pdata)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
invoice_slots_handler (xmlNodePtr node, gpointer invoice_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler invoice_handlers_v2[] = {
|
||||
{ invoice_guid_string, invoice_guid_handler, 1, 0 },
|
||||
{ invoice_id_string, invoice_id_handler, 1, 0 },
|
||||
@ -415,6 +422,7 @@ static struct dom_tree_handler invoice_handlers_v2[] = {
|
||||
{ "invoice:commodity", invoice_currency_handler, 0, 0 },
|
||||
{ invoice_billto_string, invoice_billto_handler, 0, 0 },
|
||||
{ invoice_tochargeamt_string, invoice_tochargeamt_handler, 0, 0},
|
||||
{ invoice_slots_string, invoice_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -62,6 +62,7 @@ const gchar *job_version_string = "2.0.0";
|
||||
#define job_reference_string "job:reference"
|
||||
#define job_owner_string "job:owner"
|
||||
#define job_active_string "job:active"
|
||||
#define job_slots_string "job:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -195,6 +196,12 @@ job_active_handler (xmlNodePtr node, gpointer job_pdata)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
job_slots_handler (xmlNodePtr node, gpointer job_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler job_handlers_v2[] = {
|
||||
{ job_guid_string, job_guid_handler, 1, 0 },
|
||||
{ job_id_string, job_id_handler, 1, 0 },
|
||||
@ -202,6 +209,7 @@ static struct dom_tree_handler job_handlers_v2[] = {
|
||||
{ job_reference_string, job_reference_handler, 0, 0 },
|
||||
{ job_owner_string, job_owner_handler, 1, 0 },
|
||||
{ job_active_string, job_active_handler, 1, 0 },
|
||||
{ job_slots_string, job_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -64,6 +64,7 @@ const gchar *order_version_string = "2.0.0";
|
||||
#define order_notes_string "order:notes"
|
||||
#define order_reference_string "order:reference"
|
||||
#define order_active_string "order:active"
|
||||
#define order_slots_string "order:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -229,6 +230,12 @@ order_active_handler (xmlNodePtr node, gpointer order_pdata)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
order_slots_handler (xmlNodePtr node, gpointer order_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler order_handlers_v2[] = {
|
||||
{ order_guid_string, order_guid_handler, 1, 0 },
|
||||
{ order_id_string, order_id_handler, 1, 0 },
|
||||
@ -238,6 +245,7 @@ static struct dom_tree_handler order_handlers_v2[] = {
|
||||
{ order_notes_string, order_notes_handler, 0, 0 },
|
||||
{ order_reference_string, order_reference_handler, 0, 0 },
|
||||
{ order_active_string, order_active_handler, 1, 0 },
|
||||
{ order_slots_string, order_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -63,6 +63,7 @@ const gchar *taxtable_version_string = "2.0.0";
|
||||
#define taxtable_parent_string "taxtable:parent"
|
||||
#define taxtable_child_string "taxtable:child"
|
||||
#define taxtable_entries_string "taxtable:entries"
|
||||
#define taxtable_slots_string "taxtable:slots"
|
||||
|
||||
#define gnc_taxtableentry_string "gnc:GncTaxTableEntry"
|
||||
#define ttentry_account_string "tte:acct"
|
||||
@ -357,6 +358,12 @@ taxtable_entries_handler (xmlNodePtr node, gpointer taxtable_pdata)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
taxtable_slots_handler (xmlNodePtr node, gpointer taxtable_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler taxtable_handlers_v2[] = {
|
||||
{ taxtable_guid_string, taxtable_guid_handler, 1, 0 },
|
||||
{ taxtable_name_string, taxtable_name_handler, 1, 0 },
|
||||
@ -365,6 +372,7 @@ static struct dom_tree_handler taxtable_handlers_v2[] = {
|
||||
{ taxtable_parent_string, taxtable_parent_handler, 0, 0 },
|
||||
{ taxtable_child_string, taxtable_child_handler, 0, 0 },
|
||||
{ taxtable_entries_string, taxtable_entries_handler, 1, 0 },
|
||||
{ taxtable_slots_string, taxtable_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -69,6 +69,7 @@ const gchar *vendor_version_string = "2.0.0";
|
||||
#define vendor_currency_string "vendor:currency"
|
||||
#define vendor_taxtable_string "vendor:taxtable"
|
||||
#define vendor_taxtableoverride_string "vendor:use-tt"
|
||||
#define vendor_slots_string "vendor:slots"
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
@ -314,6 +315,12 @@ vendor_taxtableoverride_handler (xmlNodePtr node, gpointer vendor_pdata)
|
||||
return set_boolean (node, pdata->vendor, gncVendorSetTaxTableOverride);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
vendor_slots_handler (xmlNodePtr node, gpointer vendor_pdata)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct dom_tree_handler vendor_handlers_v2[] = {
|
||||
{ vendor_name_string, vendor_name_handler, 1, 0 },
|
||||
{ vendor_guid_string, vendor_guid_handler, 1, 0 },
|
||||
@ -327,6 +334,7 @@ static struct dom_tree_handler vendor_handlers_v2[] = {
|
||||
{ "vendor:commodity", vendor_currency_handler, 0, 0 }, /* XXX */
|
||||
{ vendor_taxtable_string, vendor_taxtable_handler, 0, 0 },
|
||||
{ vendor_taxtableoverride_string, vendor_taxtableoverride_handler, 0, 0 },
|
||||
{ vendor_slots_string, vendor_slots_handler, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user