Replace more obsolete #define'd function names by their current names.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19936 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-12-13 21:00:23 +00:00
parent 75d71c93a3
commit febe74e6c0
62 changed files with 219 additions and 340 deletions

View File

@ -32,7 +32,7 @@
typedef struct typedef struct
{ {
GNCIdType entity_type; QofIdType entity_type;
QofEventId event_mask; QofEventId event_mask;
} EntityTypeEventInfo; } EntityTypeEventInfo;
@ -143,7 +143,7 @@ destroy_event_hash_helper (gpointer key, gpointer value, gpointer user_data)
GncGUID *guid = key; GncGUID *guid = key;
EventInfo *ei = value; EventInfo *ei = value;
xaccGUIDFree (guid); guid_free (guid);
g_free (ei); g_free (ei);
return TRUE; return TRUE;
@ -199,7 +199,7 @@ add_event (ComponentEventInfo *cei, const GncGUID *entity,
if (g_hash_table_lookup_extended (hash, entity, &key, &value)) if (g_hash_table_lookup_extended (hash, entity, &key, &value))
{ {
g_hash_table_remove (hash, entity); g_hash_table_remove (hash, entity);
xaccGUIDFree (key); guid_free (key);
g_free (value); g_free (value);
} }
} }
@ -212,7 +212,7 @@ add_event (ComponentEventInfo *cei, const GncGUID *entity,
{ {
GncGUID *key; GncGUID *key;
key = xaccGUIDMalloc (); key = guid_malloc ();
*key = *entity; *key = *entity;
ei = g_new (EventInfo, 1); ei = g_new (EventInfo, 1);
@ -229,7 +229,7 @@ add_event (ComponentEventInfo *cei, const GncGUID *entity,
} }
static void static void
add_event_type (ComponentEventInfo *cei, GNCIdTypeConst entity_type, add_event_type (ComponentEventInfo *cei, QofIdTypeConst entity_type,
QofEventId event_mask, gboolean or_in) QofEventId event_mask, gboolean or_in)
{ {
QofEventId *mask; QofEventId *mask;
@ -476,7 +476,7 @@ gnc_gui_component_watch_entity_direct (gint component_id,
void void
gnc_gui_component_watch_entity_type (gint component_id, gnc_gui_component_watch_entity_type (gint component_id,
GNCIdTypeConst entity_type, QofIdTypeConst entity_type,
QofEventId event_mask) QofEventId event_mask)
{ {
ComponentInfo *ci; ComponentInfo *ci;
@ -606,7 +606,7 @@ static void
match_type_helper (gpointer key, gpointer value, gpointer user_data) match_type_helper (gpointer key, gpointer value, gpointer user_data)
{ {
ComponentEventInfo *cei = user_data; ComponentEventInfo *cei = user_data;
GNCIdType id_type = key; QofIdType id_type = key;
QofEventId * et = value; QofEventId * et = value;
QofEventId * et_2; QofEventId * et_2;

View File

@ -196,7 +196,7 @@ void gnc_gui_component_watch_entity_direct (gint component_id,
* setting the mask to 0 turns off watching for the entity type * setting the mask to 0 turns off watching for the entity type
*/ */
void gnc_gui_component_watch_entity_type (gint component_id, void gnc_gui_component_watch_entity_type (gint component_id,
GNCIdTypeConst entity_type, QofIdTypeConst entity_type,
QofEventId event_mask); QofEventId event_mask);
/* gnc_gui_get_entity_events /* gnc_gui_get_entity_events

View File

@ -851,7 +851,7 @@ gnc_account_create_opening_balance (Account *account,
xaccTransBeginEdit (trans); xaccTransBeginEdit (trans);
xaccTransSetCurrency (trans, xaccAccountGetCommodity (account)); xaccTransSetCurrency (trans, xaccAccountGetCommodity (account));
xaccTransSetDateSecs (trans, date); xaccTransSetDatePostedSecs (trans, date);
xaccTransSetDescription (trans, _("Opening Balance")); xaccTransSetDescription (trans, _("Opening Balance"));
split = xaccMallocSplit (book); split = xaccMallocSplit (book);

View File

@ -1432,8 +1432,8 @@ account_restore_after_child_handler(gpointer data_for_children,
{ {
gnc_commodity *com = (gnc_commodity *) child_result->data; gnc_commodity *com = (gnc_commodity *) child_result->data;
g_return_val_if_fail(com, FALSE); g_return_val_if_fail(com, FALSE);
if (DxaccAccountGetSecurity(a)) return FALSE; if (xaccAccountGetCommodity(a)) return FALSE;
DxaccAccountSetSecurity(a, com); xaccAccountSetCommodity(a, com);
/* let the normal child_result handler clean up com */ /* let the normal child_result handler clean up com */
} }

View File

@ -129,7 +129,7 @@ static GtkWidget * gnc_owner_new (GtkWidget *label, GtkWidget *hbox,
owner->owner.undefined); owner->owner.undefined);
gtk_box_pack_start (GTK_BOX (hbox), edit, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), edit, FALSE, FALSE, 0);
if (label) if (label)
gtk_label_set_text (GTK_LABEL (label), _(gncObjectGetTypeLabel (type_name))); gtk_label_set_text (GTK_LABEL (label), _(qof_object_get_type_label (type_name)));
return edit; return edit;
} }
@ -510,7 +510,7 @@ generic_omenu_refresh_handler (GHashTable *changes, gpointer user_data)
static OpMenuData * static OpMenuData *
make_generic_optionmenu (GtkWidget *omenu, QofBook *book, make_generic_optionmenu (GtkWidget *omenu, QofBook *book,
gboolean none_ok, GNCIdType type_name, gboolean none_ok, QofIdType type_name,
GList * (*get_list)(QofBook*), GList * (*get_list)(QofBook*),
GenericLookup_t get_name, GenericLookup_t get_name,
gpointer *result) gpointer *result)

View File

@ -319,7 +319,7 @@ gnc_customer_window_ok_cb (GtkWidget *widget, gpointer data)
gnc_ui_to_customer (cw, customer); gnc_ui_to_customer (cw, customer);
} }
cw->created_customer = customer; cw->created_customer = customer;
cw->customer_guid = *xaccGUIDNULL (); cw->customer_guid = *guid_null ();
} }
gnc_close_gui_component (cw->component_id); gnc_close_gui_component (cw->component_id);
@ -351,7 +351,7 @@ gnc_customer_window_destroy_cb (GtkWidget *widget, gpointer data)
{ {
gncCustomerBeginEdit (customer); gncCustomerBeginEdit (customer);
gncCustomerDestroy (customer); gncCustomerDestroy (customer);
cw->customer_guid = *xaccGUIDNULL (); cw->customer_guid = *guid_null ();
} }
gnc_unregister_gui_component (cw->component_id); gnc_unregister_gui_component (cw->component_id);
@ -791,7 +791,7 @@ GNCSearchWindow *
gnc_customer_search (GncCustomer *start, QofBook *book) gnc_customer_search (GncCustomer *start, QofBook *book)
{ {
QofQuery *q, *q2 = NULL; QofQuery *q, *q2 = NULL;
GNCIdType type = GNC_CUSTOMER_MODULE_NAME; QofIdType type = GNC_CUSTOMER_MODULE_NAME;
struct _customer_select_window *sw; struct _customer_select_window *sw;
static GList *params = NULL; static GList *params = NULL;
static GList *columns = NULL; static GList *columns = NULL;

View File

@ -255,7 +255,7 @@ gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data)
gnc_ui_to_employee (ew, employee); gnc_ui_to_employee (ew, employee);
} }
ew->created_employee = employee; ew->created_employee = employee;
ew->employee_guid = *xaccGUIDNULL (); ew->employee_guid = *guid_null ();
} }
gnc_close_gui_component (ew->component_id); gnc_close_gui_component (ew->component_id);
@ -287,7 +287,7 @@ gnc_employee_window_destroy_cb (GtkWidget *widget, gpointer data)
{ {
gncEmployeeBeginEdit (employee); gncEmployeeBeginEdit (employee);
gncEmployeeDestroy (employee); gncEmployeeDestroy (employee);
ew->employee_guid = *xaccGUIDNULL (); ew->employee_guid = *guid_null ();
} }
gnc_unregister_gui_component (ew->component_id); gnc_unregister_gui_component (ew->component_id);
@ -697,7 +697,7 @@ free_employee_cb (gpointer user_data)
GNCSearchWindow * GNCSearchWindow *
gnc_employee_search (GncEmployee *start, QofBook *book) gnc_employee_search (GncEmployee *start, QofBook *book)
{ {
GNCIdType type = GNC_EMPLOYEE_MODULE_NAME; QofIdType type = GNC_EMPLOYEE_MODULE_NAME;
struct _employee_select_window *sw; struct _employee_select_window *sw;
QofQuery *q, *q2 = NULL; QofQuery *q, *q2 = NULL;
static GList *params = NULL; static GList *params = NULL;

View File

@ -403,7 +403,7 @@ gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data)
return; return;
/* Ok, we don't need this anymore */ /* Ok, we don't need this anymore */
iw->invoice_guid = *xaccGUIDNULL (); iw->invoice_guid = *guid_null ();
/* if this is a NEW_INVOICE, and created_invoice is NON-NULL, the /* if this is a NEW_INVOICE, and created_invoice is NON-NULL, the
* open up a new window with the invoice. This used to be done * open up a new window with the invoice. This used to be done
@ -441,7 +441,7 @@ gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data)
{ {
gncInvoiceBeginEdit (invoice); gncInvoiceBeginEdit (invoice);
gncInvoiceDestroy (invoice); gncInvoiceDestroy (invoice);
iw->invoice_guid = *xaccGUIDNULL (); iw->invoice_guid = *guid_null ();
} }
gnc_entry_ledger_destroy (iw->ledger); gnc_entry_ledger_destroy (iw->ledger);
@ -2373,7 +2373,7 @@ free_invoice_cb (gpointer user_data)
GNCSearchWindow * GNCSearchWindow *
gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book) gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book)
{ {
GNCIdType type = GNC_INVOICE_MODULE_NAME; QofIdType type = GNC_INVOICE_MODULE_NAME;
struct _invoice_select_window *sw; struct _invoice_select_window *sw;
QofQuery *q, *q2 = NULL; QofQuery *q, *q2 = NULL;
GncOwnerType owner_type = GNC_OWNER_CUSTOMER; GncOwnerType owner_type = GNC_OWNER_CUSTOMER;
@ -2668,7 +2668,7 @@ gnc_invoice_search_edit (gpointer start, gpointer book)
DialogQueryList * DialogQueryList *
gnc_invoice_show_bills_due (QofBook *book, double days_in_advance) gnc_invoice_show_bills_due (QofBook *book, double days_in_advance)
{ {
GNCIdType type = GNC_INVOICE_MODULE_NAME; QofIdType type = GNC_INVOICE_MODULE_NAME;
Query *q; Query *q;
QueryPredData_t pred_data; QueryPredData_t pred_data;
time_t end_date; time_t end_date;
@ -2715,8 +2715,8 @@ gnc_invoice_show_bills_due (QofBook *book, double days_in_advance)
/* Watch out: Do *not* translate the string "Invoice" here because /* Watch out: Do *not* translate the string "Invoice" here because
it must match the QofObject.type_label string exactly, which it must match the QofObject.type_label string exactly, which
implies it is used in untranslated form! */ implies it is used in untranslated form! */
pred_data = gncQueryStringPredicate (COMPARE_NEQ, "Invoice", pred_data = qof_query_string_predicate (QOF_COMPARE_NEQ, "Invoice",
STRING_MATCH_NORMAL, FALSE); QOF_STRING_MATCH_NORMAL, FALSE);
qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_TYPE), pred_data, QOF_QUERY_AND); qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_TYPE), pred_data, QOF_QUERY_AND);
end_date = time(NULL); end_date = time(NULL);
@ -2726,7 +2726,7 @@ gnc_invoice_show_bills_due (QofBook *book, double days_in_advance)
ts.tv_sec = (gint64) end_date; ts.tv_sec = (gint64) end_date;
ts.tv_nsec = 0; ts.tv_nsec = 0;
pred_data = gncQueryDatePredicate (COMPARE_LTE, DATE_MATCH_NORMAL, ts); pred_data = qof_query_date_predicate (QOF_COMPARE_LTE, QOF_DATE_MATCH_NORMAL, ts);
qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_DUE), pred_data, QOF_QUERY_AND); qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_DUE), pred_data, QOF_QUERY_AND);
res = qof_query_run(q); res = qof_query_run(q);

View File

@ -181,7 +181,7 @@ gnc_job_window_ok_cb (GtkWidget *widget, gpointer data)
/* Now save off the job so we can return it */ /* Now save off the job so we can return it */
jw->created_job = jw_get_job (jw); jw->created_job = jw_get_job (jw);
jw->job_guid = *xaccGUIDNULL (); jw->job_guid = *guid_null ();
gnc_close_gui_component (jw->component_id); gnc_close_gui_component (jw->component_id);
} }
@ -213,7 +213,7 @@ gnc_job_window_destroy_cb (GtkWidget *widget, gpointer data)
{ {
gncJobBeginEdit (job); gncJobBeginEdit (job);
gncJobDestroy (job); gncJobDestroy (job);
jw->job_guid = *xaccGUIDNULL (); jw->job_guid = *guid_null ();
} }
gnc_unregister_gui_component (jw->component_id); gnc_unregister_gui_component (jw->component_id);
@ -527,7 +527,7 @@ GNCSearchWindow *
gnc_job_search (GncJob *start, GncOwner *owner, QofBook *book) gnc_job_search (GncJob *start, GncOwner *owner, QofBook *book)
{ {
QofQuery *q, *q2 = NULL; QofQuery *q, *q2 = NULL;
GNCIdType type = GNC_JOB_MODULE_NAME; QofIdType type = GNC_JOB_MODULE_NAME;
struct _job_select_window *sw; struct _job_select_window *sw;
static GList *params = NULL; static GList *params = NULL;
static GList *columns = NULL; static GList *columns = NULL;

View File

@ -213,7 +213,7 @@ gnc_order_window_ok_cb (GtkWidget *widget, gpointer data)
return; return;
/* Ok, we don't need this anymore */ /* Ok, we don't need this anymore */
ow->order_guid = *xaccGUIDNULL (); ow->order_guid = *guid_null ();
gnc_close_gui_component (ow->component_id); gnc_close_gui_component (ow->component_id);
} }
@ -334,7 +334,7 @@ gnc_order_window_destroy_cb (GtkWidget *widget, gpointer data)
{ {
gncOrderBeginEdit (order); gncOrderBeginEdit (order);
gncOrderDestroy (order); gncOrderDestroy (order);
ow->order_guid = *xaccGUIDNULL (); ow->order_guid = *guid_null ();
} }
if (ow->ledger) if (ow->ledger)
@ -821,7 +821,7 @@ free_order_cb (gpointer user_data)
GNCSearchWindow * GNCSearchWindow *
gnc_order_search (GncOrder *start, GncOwner *owner, QofBook *book) gnc_order_search (GncOrder *start, GncOwner *owner, QofBook *book)
{ {
GNCIdType type = GNC_ORDER_MODULE_NAME; QofIdType type = GNC_ORDER_MODULE_NAME;
struct _order_select_window *sw; struct _order_select_window *sw;
QofQuery *q, *q2 = NULL; QofQuery *q, *q2 = NULL;
static GList *params = NULL; static GList *params = NULL;

View File

@ -239,7 +239,7 @@ gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data)
gnc_ui_to_vendor (vw, vendor); gnc_ui_to_vendor (vw, vendor);
} }
vw->created_vendor = vendor; vw->created_vendor = vendor;
vw->vendor_guid = *xaccGUIDNULL (); vw->vendor_guid = *guid_null ();
} }
gnc_close_gui_component (vw->component_id); gnc_close_gui_component (vw->component_id);
@ -271,7 +271,7 @@ gnc_vendor_window_destroy_cb (GtkWidget *widget, gpointer data)
{ {
gncVendorBeginEdit (vendor); gncVendorBeginEdit (vendor);
gncVendorDestroy (vendor); gncVendorDestroy (vendor);
vw->vendor_guid = *xaccGUIDNULL (); vw->vendor_guid = *guid_null ();
} }
gnc_unregister_gui_component (vw->component_id); gnc_unregister_gui_component (vw->component_id);
@ -652,7 +652,7 @@ free_vendor_cb (gpointer user_data)
GNCSearchWindow * GNCSearchWindow *
gnc_vendor_search (GncVendor *start, QofBook *book) gnc_vendor_search (GncVendor *start, QofBook *book)
{ {
GNCIdType type = GNC_VENDOR_MODULE_NAME; QofIdType type = GNC_VENDOR_MODULE_NAME;
struct _vendor_select_window *sw; struct _vendor_select_window *sw;
QofQuery *q, *q2 = NULL; QofQuery *q, *q2 = NULL;
static GList *params = NULL; static GList *params = NULL;

View File

@ -261,10 +261,10 @@ make_how_menu (GNCSearchCoreType *fe)
GtkComboBox *combo; GtkComboBox *combo;
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is"), GUID_MATCH_ANY); gnc_combo_box_search_add(combo, _("is"), QOF_GUID_MATCH_ANY);
gnc_combo_box_search_add(combo, _("is not"), GUID_MATCH_NONE); gnc_combo_box_search_add(combo, _("is not"), QOF_GUID_MATCH_NONE);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : GUID_MATCH_ANY); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_GUID_MATCH_ANY);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -317,7 +317,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
guid = gncOwnerGetGUID (&(priv->owner)); guid = gncOwnerGetGUID (&(priv->owner));
l = g_list_prepend (l, (gpointer)guid); l = g_list_prepend (l, (gpointer)guid);
return gncQueryGUIDPredicate (fi->how, l); return qof_query_guid_predicate (fi->how, l);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchOwner
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
guid_match_t how; QofGuidMatch how;
}; };
struct _GNCSearchOwnerClass struct _GNCSearchOwnerClass

View File

@ -62,7 +62,7 @@ gnc_entry_ledger_clear_blank_entry (GncEntryLedger *ledger)
gncEntryDestroy (entry); gncEntryDestroy (entry);
} }
ledger->blank_entry_guid = *xaccGUIDNULL (); ledger->blank_entry_guid = *guid_null ();
ledger->blank_entry_edited = FALSE; ledger->blank_entry_edited = FALSE;
} }
@ -309,7 +309,7 @@ GncEntryLedger * gnc_entry_ledger_new (QofBook *book, GncEntryLedgerType type)
break; break;
} }
ledger->blank_entry_guid = *xaccGUIDNULL(); ledger->blank_entry_guid = *guid_null();
ledger->blank_entry_edited = FALSE; ledger->blank_entry_edited = FALSE;
{ {

View File

@ -67,7 +67,7 @@ gnc_entry_ledger_save (GncEntryLedger *ledger, gboolean do_commit)
if (ledger->blank_entry_edited) if (ledger->blank_entry_edited)
{ {
ledger->last_date_entered = gncEntryGetDate (entry); ledger->last_date_entered = gncEntryGetDate (entry);
ledger->blank_entry_guid = *xaccGUIDNULL (); ledger->blank_entry_guid = *guid_null ();
ledger->blank_entry_edited = FALSE; ledger->blank_entry_edited = FALSE;
blank_entry = NULL; blank_entry = NULL;
} }
@ -117,7 +117,7 @@ gnc_entry_ledger_save (GncEntryLedger *ledger, gboolean do_commit)
{ {
if (do_commit) if (do_commit)
{ {
ledger->blank_entry_guid = *xaccGUIDNULL (); ledger->blank_entry_guid = *guid_null ();
blank_entry = NULL; blank_entry = NULL;
ledger->last_date_entered = gncEntryGetDate (entry); ledger->last_date_entered = gncEntryGetDate (entry);
} }

View File

@ -93,7 +93,7 @@ static void
gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries) gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries)
{ {
GList *node; GList *node;
GNCIdType type = NULL; QofIdType type = NULL;
gnc_gui_component_clear_watches (ledger->component_id); gnc_gui_component_clear_watches (ledger->component_id);

View File

@ -419,7 +419,7 @@ void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
break; break;
default: default:
ledger->blank_entry_guid = *xaccGUIDNULL (); ledger->blank_entry_guid = *guid_null ();
break; break;
} }
ledger->blank_entry_edited = FALSE; ledger->blank_entry_edited = FALSE;

View File

@ -509,15 +509,9 @@ void xaccAccountSetAutoInterestXfer (Account *account, gboolean value);
/** Set the account's commodity */ /** Set the account's commodity */
void xaccAccountSetCommodity (Account *account, gnc_commodity *comm); void xaccAccountSetCommodity (Account *account, gnc_commodity *comm);
/** @deprecated do not use */
#define DxaccAccountSetSecurity xaccAccountSetCommodity
/** Get the account's commodity */ /** Get the account's commodity */
/*@ dependent @*/ gnc_commodity * xaccAccountGetCommodity (const Account *account); /*@ dependent @*/ gnc_commodity * xaccAccountGetCommodity (const Account *account);
/** @deprecated do not use */
#define DxaccAccountGetSecurity xaccAccountGetCommodity
/** Return the SCU for the account. If a non-standard SCU has been /** Return the SCU for the account. If a non-standard SCU has been
* set for the account, that is returned; else the default SCU for * set for the account, that is returned; else the default SCU for
* the account commodity is returned. * the account commodity is returned.
@ -534,9 +528,6 @@ int xaccAccountGetCommoditySCUi (const Account *account);
*/ */
void xaccAccountSetCommoditySCU (Account *account, int frac); void xaccAccountSetCommoditySCU (Account *account, int frac);
/** @deprecated -- do not use for future development */
#define xaccAccountSetCommoditySCUandFlag xaccAccountSetCommoditySCU
/** Set the flag indicating that this account uses a non-standard SCU. */ /** Set the flag indicating that this account uses a non-standard SCU. */
void xaccAccountSetNonStdSCU (Account *account, gboolean flag); void xaccAccountSetNonStdSCU (Account *account, gboolean flag);

View File

@ -7,23 +7,3 @@
#define xaccGUIDNew(guid,book) \ #define xaccGUIDNew(guid,book) \
qof_instance_guid_new (qof_book_get_entity_table (book), (guid)) qof_instance_guid_new (qof_book_get_entity_table (book), (guid))
#define xaccGUIDNULL guid_null
#define xaccGUIDMalloc guid_malloc
#define xaccGUIDFree guid_free
#define GNCIdTypeConst QofIdTypeConst
#define GNCIdType QofIdType
#define GNCEntityTable QofInstanceTable
#define xaccGUIDTypeEntityTable qof_guid_type
#define xaccEntityTableNew qof_instance_new
#define xaccEntityTableDestroy qof_instance_destroy
#define xaccGUIDNewEntityTable qof_instance_guid_new
#define xaccLookupEntity qof_instance_lookup
#define xaccStoreEntity qof_instance_store
#define xaccRemoveEntity qof_instance_remove
#define xaccForeachEntity qof_instance_foreach
#define foreachObjectCB QofInstanceForeachCB

View File

@ -2,67 +2,3 @@
#include "qof.h" #include "qof.h"
#define QueryPredData_t QofQueryPredData* #define QueryPredData_t QofQueryPredData*
#define gncQueryStringPredicate qof_query_string_predicate
#define gncQueryDatePredicate qof_query_date_predicate
#define gncQueryNumericPredicate qof_query_numeric_predicate
#define gncQueryGUIDPredicate qof_query_guid_predicate
#define gncQueryInt32Predicate qof_query_int32_predicate
#define gncQueryInt64Predicate qof_query_int64_predicate
#define gncQueryDoublePredicate qof_query_double_predicate
#define gncQueryBooleanPredicate qof_query_boolean_predicate
#define gncQueryCharPredicate qof_query_char_predicate
#define gncQueryKVPPredicate qof_query_kvp_predicate
#define gncQueryCorePredicateFree qof_query_core_predicate_free
#define COMPARE_LT QOF_COMPARE_LT
#define COMPARE_LTE QOF_COMPARE_LTE
#define COMPARE_EQUAL QOF_COMPARE_EQUAL
#define COMPARE_GT QOF_COMPARE_GT
#define COMPARE_GTE QOF_COMPARE_GTE
#define COMPARE_NEQ QOF_COMPARE_NEQ
#define STRING_MATCH_NORMAL QOF_STRING_MATCH_NORMAL
#define STRING_MATCH_CASEINSENSITIVE QOF_STRING_MATCH_CASEINSENSITIVE
#define DATE_MATCH_NORMAL QOF_DATE_MATCH_NORMAL
#define DATE_MATCH_ROUNDED QOF_DATE_MATCH_ROUNDED
#define NUMERIC_MATCH_ANY QOF_NUMERIC_MATCH_ANY
#define NUMERIC_MATCH_CREDIT QOF_NUMERIC_MATCH_CREDIT
#define NUMERIC_MATCH_DEBIT QOF_NUMERIC_MATCH_DEBIT
#define GUID_MATCH_ANY QOF_GUID_MATCH_ANY
#define GUID_MATCH_NONE QOF_GUID_MATCH_NONE
#define GUID_MATCH_NULL QOF_GUID_MATCH_NULL
#define GUID_MATCH_ALL QOF_GUID_MATCH_ALL
#define GUID_MATCH_LIST_ANY QOF_GUID_MATCH_LIST_ANY
#define CHAR_MATCH_ANY QOF_CHAR_MATCH_ANY
#define CHAR_MATCH_NONE QOF_CHAR_MATCH_NONE
#define char_match_t QofCharMatch
#define guid_match_t QofGuidMatch
#define numeric_match_t QofNumericMatch
#define date_match_t QofDateMatch
#define string_match_t QofStringMatch
#define query_compare_t QofQueryCompare
#define gncQueryCoreInit qof_query_core_init
#define gncQueryCoreShutdown qof_query_core_shutdown
#define gncQueryCoreGetPredicate qof_query_core_get_predicate
#define gncQueryCoreGetCompare qof_query_core_get_compare
#define gncQueryCorePredicateEqual qof_query_core_predicate_equal
#define QUERYCORE_GUID QOF_TYPE_GUID
#define QUERYCORE_DEBCRED QOF_TYPE_DEBCRED
#define QUERYCORE_BOOLEAN QOF_TYPE_BOOLEAN
#define QUERYCORE_NUMERIC QOF_TYPE_NUMERIC
#define QUERYCORE_STRING QOF_TYPE_STRING
#define QUERYCORE_DATE QOF_TYPE_DATE
#define QUERYCORE_INT64 QOF_TYPE_INT64
#define QUERYCORE_DOUBLE QOF_TYPE_DOUBLE
#define QueryAccess QofAccessFunc
#define gncQueryCoreToString qof_query_core_to_string

View File

@ -3,10 +3,5 @@
#define query_object_def _QofParam #define query_object_def _QofParam
#define QueryObjectDef QofParam #define QueryObjectDef QofParam
#define QuerySort QofSortFunc
#define gncQueryObjectRegister qof_class_register
#define gncQueryObjectParameterType qof_class_get_parameter_type
#define gncQueryObjectGetParameterGetter qof_class_get_parameter_getter
#define gncQueryObjectGetParameter qof_class_get_parameter

View File

@ -1187,7 +1187,7 @@ xaccAccountScrubCommodity (Account *account)
/* Use the 'obsolete' routines to try to figure out what the /* Use the 'obsolete' routines to try to figure out what the
* account commodity should have been. */ * account commodity should have been. */
commodity = DxaccAccountGetSecurity (account); commodity = xaccAccountGetCommodity (account);
if (commodity) if (commodity)
{ {
xaccAccountSetCommodity (account, commodity); xaccAccountSetCommodity (account, commodity);

View File

@ -455,7 +455,6 @@ void xaccTransSetDatePostedGDate (Transaction *trans, GDate date);
date of the transaction, specified by a time_t (see ctime(3)). The date of the transaction, specified by a time_t (see ctime(3)). The
posted date is the date when this transaction was posted at the posted date is the date when this transaction was posted at the
bank. */ bank. */
#define xaccTransSetDateSecs xaccTransSetDatePostedSecs
void xaccTransSetDatePostedSecs (Transaction *trans, time_t time); void xaccTransSetDatePostedSecs (Transaction *trans, time_t time);
/** The xaccTransSetDatePostedTS() method does the same thing as /** The xaccTransSetDatePostedTS() method does the same thing as

View File

@ -1,8 +1,6 @@
#include "qof.h" #include "qof.h"
#define gnc_session_get_url qof_session_get_url
QofSession * gnc_get_current_session (void); QofSession * gnc_get_current_session (void);
void gnc_clear_current_session(void); void gnc_clear_current_session(void);
void gnc_set_current_session (QofSession *session); void gnc_set_current_session (QofSession *session);

View File

@ -23,7 +23,7 @@
#include "gncIDSearch.h" #include "gncIDSearch.h"
static void * search(QofBook * book, const gchar *id, void * object, GNCIdType type); static void * search(QofBook * book, const gchar *id, void * object, QofIdType type);
/*********************************************************************** /***********************************************************************
* Search the book for a Customer/Invoice/Bill with the same ID. * Search the book for a Customer/Invoice/Bill with the same ID.
* If it exists return a valid object, if not then returns NULL. * If it exists return a valid object, if not then returns NULL.
@ -35,7 +35,7 @@ GncCustomer *
gnc_search_customer_on_id (QofBook * book, const gchar *id) gnc_search_customer_on_id (QofBook * book, const gchar *id)
{ {
GncCustomer *customer = NULL; GncCustomer *customer = NULL;
GNCIdType type = GNC_CUSTOMER_MODULE_NAME; QofIdType type = GNC_CUSTOMER_MODULE_NAME;
customer = (GncCustomer*)search(book, id, customer, type); customer = (GncCustomer*)search(book, id, customer, type);
return customer; return customer;
} }
@ -44,7 +44,7 @@ GncInvoice *
gnc_search_invoice_on_id (QofBook * book, const gchar *id) gnc_search_invoice_on_id (QofBook * book, const gchar *id)
{ {
GncInvoice *invoice = NULL; GncInvoice *invoice = NULL;
GNCIdType type = GNC_INVOICE_MODULE_NAME; QofIdType type = GNC_INVOICE_MODULE_NAME;
invoice = (GncInvoice*)search(book, id, invoice, type); invoice = (GncInvoice*)search(book, id, invoice, type);
return invoice; return invoice;
} }
@ -54,7 +54,7 @@ GncInvoice *
gnc_search_bill_on_id (QofBook * book, const gchar *id) gnc_search_bill_on_id (QofBook * book, const gchar *id)
{ {
GncInvoice *bill = NULL; GncInvoice *bill = NULL;
GNCIdType type = GNC_INVOICE_MODULE_NAME; QofIdType type = GNC_INVOICE_MODULE_NAME;
bill = (GncInvoice*)search(book, id, bill, type); bill = (GncInvoice*)search(book, id, bill, type);
return bill; return bill;
} }
@ -63,7 +63,7 @@ GncVendor *
gnc_search_vendor_on_id (QofBook * book, const gchar *id) gnc_search_vendor_on_id (QofBook * book, const gchar *id)
{ {
GncVendor *vendor = NULL; GncVendor *vendor = NULL;
GNCIdType type = GNC_VENDOR_MODULE_NAME; QofIdType type = GNC_VENDOR_MODULE_NAME;
vendor = (GncVendor*)search(book, id, vendor, type); vendor = (GncVendor*)search(book, id, vendor, type);
return vendor; return vendor;
} }
@ -73,7 +73,7 @@ gnc_search_vendor_on_id (QofBook * book, const gchar *id)
* Generic search called after setting up stuff * Generic search called after setting up stuff
* DO NOT call directly but type tests should fail anyway * DO NOT call directly but type tests should fail anyway
****************************************************************/ ****************************************************************/
static void * search(QofBook * book, const gchar *id, void * object, GNCIdType type) static void * search(QofBook * book, const gchar *id, void * object, QofIdType type)
{ {
void *c; void *c;
GList *result; GList *result;
@ -88,7 +88,7 @@ static void * search(QofBook * book, const gchar *id, void * object, GNCIdType t
q = qof_query_create_for (type); q = qof_query_create_for (type);
qof_query_set_book (q, book); qof_query_set_book (q, book);
// Search only the id field // Search only the id field
string_pred_data = gncQueryStringPredicate (COMPARE_EQUAL, id, STRING_MATCH_NORMAL, FALSE); string_pred_data = qof_query_string_predicate (QOF_COMPARE_EQUAL, id, QOF_STRING_MATCH_NORMAL, FALSE);
if (strcmp(type, GNC_CUSTOMER_MODULE_NAME)) if (strcmp(type, GNC_CUSTOMER_MODULE_NAME))
{ {

View File

@ -1,21 +1 @@
#include "qof.h" #include "qof.h"
#define GncObject_t QofObject
#define gncObjectLookup qof_object_lookup
#define gncObjectRegister qof_object_register
#define gncObjectGetTypeLabel qof_object_get_type_label
#define gncObjectRegisterBackend qof_object_register_backend
#define gncObjectLookupBackend qof_object_lookup_backend
#define gncObjectForeachBackend qof_object_foreach_backend
#define gncObjectInitialize qof_object_initialize
#define gncObjectShutdown qof_object_shutdown
#define gncObjectBookBegin qof_object_book_begin
#define gncObjectBookEnd qof_object_book_end
#define gncObjectIsDirty qof_object_is_dirty
#define gncObjectMarkClean qof_object_mark_clean
#define gncObjectForeachType qof_object_foreach_type
#define gncObjectForeach qof_object_foreach
#define gncObjectPrintable qof_object_printable

View File

@ -2134,7 +2134,7 @@ make_trans_query (Transaction *trans, TestQueryTypes query_types)
GList * list; GList * list;
GList * node; GList * node;
/* GUID_MATCH_ALL */ /* QOF_GUID_MATCH_ALL */
list = NULL; list = NULL;
for (node = xaccTransGetSplitList (trans); node; node = node->next) for (node = xaccTransGetSplitList (trans); node; node = node->next)
{ {
@ -2144,14 +2144,14 @@ make_trans_query (Transaction *trans, TestQueryTypes query_types)
xaccQueryAddAccountMatch (q, list, QOF_GUID_MATCH_ALL, QOF_QUERY_AND); xaccQueryAddAccountMatch (q, list, QOF_GUID_MATCH_ALL, QOF_QUERY_AND);
g_list_free (list); g_list_free (list);
/* GUID_MATCH_NONE */ /* QOF_GUID_MATCH_NONE */
list = NULL; list = NULL;
list = g_list_prepend (list, get_random_guid ()); list = g_list_prepend (list, get_random_guid ());
list = g_list_prepend (list, get_random_guid ()); list = g_list_prepend (list, get_random_guid ());
list = g_list_prepend (list, get_random_guid ()); list = g_list_prepend (list, get_random_guid ());
xaccQueryAddAccountGUIDMatch (q, list, QOF_GUID_MATCH_NONE, QOF_QUERY_AND); xaccQueryAddAccountGUIDMatch (q, list, QOF_GUID_MATCH_NONE, QOF_QUERY_AND);
/* GUID_MATCH_ANY */ /* QOF_GUID_MATCH_ANY */
{ {
GncGUID * guid = get_random_guid (); GncGUID * guid = get_random_guid ();
*guid = *xaccAccountGetGUID (a); *guid = *xaccAccountGetGUID (a);

View File

@ -105,7 +105,7 @@ struct _GNCSearchWindow
/* What we're searching for, and how */ /* What we're searching for, and how */
const gchar * type_label; const gchar * type_label;
GNCIdTypeConst search_for; QofIdTypeConst search_for;
GNCSearchType grouping; /* Match Any, Match All */ GNCSearchType grouping; /* Match Any, Match All */
const QofParam * get_guid; /* Function to GetGUID from the object */ const QofParam * get_guid; /* Function to GetGUID from the object */
int search_type; /* New, Narrow, Add, Delete */ int search_type; /* New, Narrow, Add, Delete */
@ -898,7 +898,7 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
if (sw->type_label) if (sw->type_label)
type_label = sw->type_label; type_label = sw->type_label;
else else
type_label = _(gncObjectGetTypeLabel (sw->search_for)); type_label = _(qof_object_get_type_label (sw->search_for));
gtk_label_set_text (GTK_LABEL (label), type_label); gtk_label_set_text (GTK_LABEL (label), type_label);
/* Set the 'add criterion' button */ /* Set the 'add criterion' button */
@ -939,7 +939,7 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
/* Figure out if we this object-type has an "active" parameter, and /* Figure out if we this object-type has an "active" parameter, and
* if not, then set the active-check button insensitive * if not, then set the active-check button insensitive
*/ */
if (gncQueryObjectGetParameter (sw->search_for, QOF_PARAM_ACTIVE) == NULL) if (qof_class_get_parameter (sw->search_for, QOF_PARAM_ACTIVE) == NULL)
gtk_widget_set_sensitive (sw->active_only_check, FALSE); gtk_widget_set_sensitive (sw->active_only_check, FALSE);
/* Deal with the cancel button */ /* Deal with the cancel button */
@ -1023,7 +1023,7 @@ gnc_search_dialog_raise (GNCSearchWindow *sw)
} }
GNCSearchWindow * GNCSearchWindow *
gnc_search_dialog_create (GNCIdTypeConst obj_type, const gchar *title, gnc_search_dialog_create (QofIdTypeConst obj_type, const gchar *title,
GList *param_list, GList *param_list,
GList *display_list, GList *display_list,
QofQuery *start_query, QofQuery *show_start_query, QofQuery *start_query, QofQuery *show_start_query,
@ -1131,7 +1131,7 @@ void gnc_search_dialog_set_select_cb (GNCSearchWindow *sw,
/* TEST CODE BELOW HERE */ /* TEST CODE BELOW HERE */
static GList * static GList *
get_params_list (GNCIdTypeConst type) get_params_list (QofIdTypeConst type)
{ {
GList *list = NULL; GList *list = NULL;
@ -1161,7 +1161,7 @@ get_params_list (GNCIdTypeConst type)
} }
static GList * static GList *
get_display_list (GNCIdTypeConst type) get_display_list (QofIdTypeConst type)
{ {
GList *list = NULL; GList *list = NULL;

View File

@ -90,7 +90,7 @@ typedef struct
* the dialog will use the obj_type instead. * the dialog will use the obj_type instead.
*/ */
GNCSearchWindow * GNCSearchWindow *
gnc_search_dialog_create (GNCIdTypeConst obj_type, const gchar *title, gnc_search_dialog_create (QofIdTypeConst obj_type, const gchar *title,
GList *param_list, GList *param_list,
GList *display_list, GList *display_list,
QofQuery *start_query, QofQuery *show_start_query, QofQuery *start_query, QofQuery *show_start_query,

View File

@ -68,7 +68,7 @@ typedef struct _GNCGeneralSearchPrivate GNCGeneralSearchPrivate;
struct _GNCGeneralSearchPrivate struct _GNCGeneralSearchPrivate
{ {
GncGUID guid; GncGUID guid;
GNCIdTypeConst type; QofIdTypeConst type;
GNCSearchCB search_cb; GNCSearchCB search_cb;
gpointer user_data; gpointer user_data;
GNCSearchWindow * sw; GNCSearchWindow * sw;
@ -191,7 +191,7 @@ reset_selection_text (GNCGeneralSearch *gsl)
if (gsl->selected_item == NULL) if (gsl->selected_item == NULL)
text = ""; text = "";
else else
text = gncObjectPrintable (priv->type, gsl->selected_item); text = qof_object_printable (priv->type, gsl->selected_item);
gtk_entry_set_text(GTK_ENTRY(gsl->entry), text); gtk_entry_set_text(GTK_ENTRY(gsl->entry), text);
} }
@ -380,7 +380,7 @@ static void
create_children (GNCGeneralSearch *gsl, create_children (GNCGeneralSearch *gsl,
const char *label, const char *label,
gboolean text_editable, gboolean text_editable,
GNCIdTypeConst type, QofIdTypeConst type,
QofBook *book) QofBook *book)
{ {
GtkListStore * list_store; GtkListStore * list_store;
@ -459,7 +459,7 @@ create_children (GNCGeneralSearch *gsl,
* an easy way to choose selections. * an easy way to choose selections.
* *
* @param type The type of object that this widget will be used for. * @param type The type of object that this widget will be used for.
* This parameter is a GNCIdTypeConst. * This parameter is a QofIdTypeConst.
* @param label The label for the GtkButton child widget. * @param label The label for the GtkButton child widget.
* @param text_editable switch to enable or disable direct text entry * @param text_editable switch to enable or disable direct text entry
* @param search_cb The callback function to use when an object has been * @param search_cb The callback function to use when an object has been
@ -474,7 +474,7 @@ create_children (GNCGeneralSearch *gsl,
* @return a GNCGeneralSearch widget. * @return a GNCGeneralSearch widget.
*/ */
GtkWidget * GtkWidget *
gnc_general_search_new (GNCIdTypeConst type, gnc_general_search_new (QofIdTypeConst type,
const char *label, const char *label,
gboolean text_editable, gboolean text_editable,
GNCSearchCB search_cb, GNCSearchCB search_cb,
@ -544,7 +544,7 @@ gnc_general_search_set_selected (GNCGeneralSearch *gsl, gpointer selection)
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY); QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
} }
else else
priv->guid = *xaccGUIDNULL (); priv->guid = *guid_null ();
} }
/** /**

View File

@ -73,7 +73,7 @@ typedef struct
} GNCGeneralSearchClass; } GNCGeneralSearchClass;
GtkWidget *gnc_general_search_new (GNCIdTypeConst type, GtkWidget *gnc_general_search_new (QofIdTypeConst type,
const char *label, const char *label,
gboolean text_editable, gboolean text_editable,
GNCSearchCB search_cb, GNCSearchCB search_cb,

View File

@ -112,7 +112,7 @@ gnc_search_account_class_init (GNCSearchAccountClass *class)
static void static void
gnc_search_account_init (GNCSearchAccount *o) gnc_search_account_init (GNCSearchAccount *o)
{ {
o->how = GUID_MATCH_ANY; o->how = QOF_GUID_MATCH_ANY;
} }
static void static void
@ -154,7 +154,7 @@ gnc_search_account_matchall_new (void)
o = g_object_new(GNC_TYPE_SEARCH_ACCOUNT, NULL); o = g_object_new(GNC_TYPE_SEARCH_ACCOUNT, NULL);
priv = _PRIVATE(o); priv = _PRIVATE(o);
priv->match_all = TRUE; priv->match_all = TRUE;
o->how = GUID_MATCH_ALL; o->how = QOF_GUID_MATCH_ALL;
return o; return o;
} }
@ -193,14 +193,14 @@ make_menu (GNCSearchCoreType *fe)
priv = _PRIVATE(fi); priv = _PRIVATE(fi);
if (priv->match_all) if (priv->match_all)
{ {
gnc_combo_box_search_add(combo, _("matches all accounts"), GUID_MATCH_ALL); gnc_combo_box_search_add(combo, _("matches all accounts"), QOF_GUID_MATCH_ALL);
initial = GUID_MATCH_ALL; initial = QOF_GUID_MATCH_ALL;
} }
else else
{ {
gnc_combo_box_search_add(combo, _("matches any account"), GUID_MATCH_ANY); gnc_combo_box_search_add(combo, _("matches any account"), QOF_GUID_MATCH_ANY);
gnc_combo_box_search_add(combo, _("matches no accounts"), GUID_MATCH_NONE); gnc_combo_box_search_add(combo, _("matches no accounts"), QOF_GUID_MATCH_NONE);
initial = GUID_MATCH_ANY; initial = QOF_GUID_MATCH_ANY;
} }
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
@ -334,7 +334,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
} }
l = g_list_reverse (l); l = g_list_reverse (l);
return gncQueryGUIDPredicate (fi->how, l); return qof_query_guid_predicate (fi->how, l);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchAccount
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
guid_match_t how; QofGuidMatch how;
}; };
struct _GNCSearchAccountClass struct _GNCSearchAccountClass

View File

@ -107,7 +107,7 @@ gnc_search_boolean_class_init (GNCSearchBooleanClass *class)
static void static void
gnc_search_boolean_init (GNCSearchBoolean *o) gnc_search_boolean_init (GNCSearchBoolean *o)
{ {
o->how = COMPARE_EQUAL; o->how = QOF_COMPARE_EQUAL;
o->value = TRUE; o->value = TRUE;
} }
@ -144,7 +144,7 @@ gnc_search_boolean_set_value (GNCSearchBoolean *fi, gboolean value)
} }
void void
gnc_search_boolean_set_how (GNCSearchBoolean *fi, query_compare_t how) gnc_search_boolean_set_how (GNCSearchBoolean *fi, QofQueryCompare how)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_BOOLEAN (fi)); g_return_if_fail (IS_GNCSEARCH_BOOLEAN (fi));
@ -178,10 +178,10 @@ make_menu (GNCSearchCoreType *fe)
GtkComboBox *combo; GtkComboBox *combo;
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is"), COMPARE_EQUAL); gnc_combo_box_search_add(combo, _("is"), QOF_COMPARE_EQUAL);
gnc_combo_box_search_add(combo, _("is not"), COMPARE_NEQ); gnc_combo_box_search_add(combo, _("is not"), QOF_COMPARE_NEQ);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : COMPARE_EQUAL); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_COMPARE_EQUAL);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -218,7 +218,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
g_return_val_if_fail (fi, NULL); g_return_val_if_fail (fi, NULL);
g_return_val_if_fail (IS_GNCSEARCH_BOOLEAN (fi), NULL); g_return_val_if_fail (IS_GNCSEARCH_BOOLEAN (fi), NULL);
return gncQueryBooleanPredicate (fi->how, fi->value); return qof_query_boolean_predicate (fi->how, fi->value);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchBoolean
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
query_compare_t how; QofQueryCompare how;
gboolean value; gboolean value;
}; };
@ -55,7 +55,7 @@ GNCSearchBoolean *gnc_search_boolean_new (void);
/* methods */ /* methods */
void gnc_search_boolean_set_value (GNCSearchBoolean *fi, gboolean val); void gnc_search_boolean_set_value (GNCSearchBoolean *fi, gboolean val);
void gnc_search_boolean_set_how (GNCSearchBoolean *fi, query_compare_t how); void gnc_search_boolean_set_how (GNCSearchBoolean *fi, QofQueryCompare how);
#endif /* ! _GNCSEARCH_BOOLEAN_H */ #endif /* ! _GNCSEARCH_BOOLEAN_H */

View File

@ -260,20 +260,20 @@ gnc_search_core_register_type (const char *type_name, GNCSearchCoreNew fcn)
static void static void
init_table (void) init_table (void)
{ {
gnc_search_core_register_type (QUERYCORE_STRING, gnc_search_core_register_type (QOF_TYPE_STRING,
(GNCSearchCoreNew) gnc_search_string_new); (GNCSearchCoreNew) gnc_search_string_new);
gnc_search_core_register_type (QUERYCORE_DATE, gnc_search_core_register_type (QOF_TYPE_DATE,
(GNCSearchCoreNew) gnc_search_date_new); (GNCSearchCoreNew) gnc_search_date_new);
gnc_search_core_register_type (QUERYCORE_INT64, gnc_search_core_register_type (QOF_TYPE_INT64,
(GNCSearchCoreNew) gnc_search_int64_new); (GNCSearchCoreNew) gnc_search_int64_new);
gnc_search_core_register_type (QUERYCORE_DOUBLE, gnc_search_core_register_type (QOF_TYPE_DOUBLE,
(GNCSearchCoreNew) gnc_search_double_new); (GNCSearchCoreNew) gnc_search_double_new);
gnc_search_core_register_type (QUERYCORE_NUMERIC, gnc_search_core_register_type (QOF_TYPE_NUMERIC,
(GNCSearchCoreNew) gnc_search_numeric_new); (GNCSearchCoreNew) gnc_search_numeric_new);
gnc_search_core_register_type (QUERYCORE_DEBCRED, gnc_search_core_register_type (QOF_TYPE_DEBCRED,
(GNCSearchCoreNew) (GNCSearchCoreNew)
gnc_search_numeric_debcred_new); gnc_search_numeric_debcred_new);
gnc_search_core_register_type (QUERYCORE_BOOLEAN, gnc_search_core_register_type (QOF_TYPE_BOOLEAN,
(GNCSearchCoreNew) gnc_search_boolean_new); (GNCSearchCoreNew) gnc_search_boolean_new);
gnc_search_core_register_type (GNC_ID_ACCOUNT, gnc_search_core_register_type (GNC_ID_ACCOUNT,
(GNCSearchCoreNew) gnc_search_account_new); (GNCSearchCoreNew) gnc_search_account_new);

View File

@ -114,7 +114,7 @@ static void
gnc_search_date_init (GNCSearchDate *o) gnc_search_date_init (GNCSearchDate *o)
{ {
o->ts.tv_sec = time(NULL); o->ts.tv_sec = time(NULL);
o->how = COMPARE_LT; o->how = QOF_COMPARE_LT;
} }
static void static void
@ -157,7 +157,7 @@ gnc_search_date_set_date (GNCSearchDate *fi, Timespec ts)
} }
void void
gnc_search_date_set_how (GNCSearchDate *fi, query_compare_t how) gnc_search_date_set_how (GNCSearchDate *fi, QofQueryCompare how)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_DATE (fi)); g_return_if_fail (IS_GNCSEARCH_DATE (fi));
@ -192,14 +192,14 @@ make_menu (GNCSearchCoreType *fe)
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is before"), COMPARE_LT); gnc_combo_box_search_add(combo, _("is before"), QOF_COMPARE_LT);
gnc_combo_box_search_add(combo, _("is before or on"), COMPARE_LTE); gnc_combo_box_search_add(combo, _("is before or on"), QOF_COMPARE_LTE);
gnc_combo_box_search_add(combo, _("is on"), COMPARE_EQUAL); gnc_combo_box_search_add(combo, _("is on"), QOF_COMPARE_EQUAL);
gnc_combo_box_search_add(combo, _("is not on"), COMPARE_NEQ); gnc_combo_box_search_add(combo, _("is not on"), QOF_COMPARE_NEQ);
gnc_combo_box_search_add(combo, _("is after"), COMPARE_GT); gnc_combo_box_search_add(combo, _("is after"), QOF_COMPARE_GT);
gnc_combo_box_search_add(combo, _("is on or after"), COMPARE_GTE); gnc_combo_box_search_add(combo, _("is on or after"), QOF_COMPARE_GTE);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : COMPARE_LT); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_COMPARE_LT);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -273,7 +273,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
if (priv->entry) if (priv->entry)
fi->ts = gnc_date_edit_get_date_ts (GNC_DATE_EDIT (priv->entry)); fi->ts = gnc_date_edit_get_date_ts (GNC_DATE_EDIT (priv->entry));
return gncQueryDatePredicate (fi->how, DATE_MATCH_NORMAL, fi->ts); return qof_query_date_predicate (fi->how, QOF_DATE_MATCH_NORMAL, fi->ts);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -38,7 +38,7 @@ struct _GNCSearchDate
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
query_compare_t how; QofQueryCompare how;
Timespec ts; Timespec ts;
}; };
@ -56,7 +56,7 @@ GNCSearchDate *gnc_search_date_new (void);
/* methods */ /* methods */
void gnc_search_date_set_date (GNCSearchDate *fi, Timespec ts); void gnc_search_date_set_date (GNCSearchDate *fi, Timespec ts);
void gnc_search_date_set_how (GNCSearchDate *fi, query_compare_t how); void gnc_search_date_set_how (GNCSearchDate *fi, QofQueryCompare how);
#endif /* ! _GNCSEARCH_DATE_H */ #endif /* ! _GNCSEARCH_DATE_H */

View File

@ -113,7 +113,7 @@ gnc_search_double_class_init (GNCSearchDoubleClass *class)
static void static void
gnc_search_double_init (GNCSearchDouble *o) gnc_search_double_init (GNCSearchDouble *o)
{ {
o->how = COMPARE_EQUAL; o->how = QOF_COMPARE_EQUAL;
} }
static void static void
@ -149,7 +149,7 @@ gnc_search_double_set_value (GNCSearchDouble *fi, double value)
} }
void void
gnc_search_double_set_how (GNCSearchDouble *fi, query_compare_t how) gnc_search_double_set_how (GNCSearchDouble *fi, QofQueryCompare how)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_DOUBLE (fi)); g_return_if_fail (IS_GNCSEARCH_DOUBLE (fi));
@ -184,14 +184,14 @@ make_menu (GNCSearchCoreType *fe)
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is less than"), COMPARE_LT); gnc_combo_box_search_add(combo, _("is less than"), QOF_COMPARE_LT);
gnc_combo_box_search_add(combo, _("is less than or equal to"), COMPARE_LTE); gnc_combo_box_search_add(combo, _("is less than or equal to"), QOF_COMPARE_LTE);
gnc_combo_box_search_add(combo, _("equals"), COMPARE_EQUAL); gnc_combo_box_search_add(combo, _("equals"), QOF_COMPARE_EQUAL);
gnc_combo_box_search_add(combo, _("does not equal"), COMPARE_NEQ); gnc_combo_box_search_add(combo, _("does not equal"), QOF_COMPARE_NEQ);
gnc_combo_box_search_add(combo, _("is greater than"), COMPARE_GT); gnc_combo_box_search_add(combo, _("is greater than"), QOF_COMPARE_GT);
gnc_combo_box_search_add(combo, _("is greater than or equal to"), COMPARE_GTE); gnc_combo_box_search_add(combo, _("is greater than or equal to"), QOF_COMPARE_GTE);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : COMPARE_LT); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_COMPARE_LT);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -266,7 +266,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
priv = _PRIVATE(fi); priv = _PRIVATE(fi);
entry_changed (priv->gae, fi); entry_changed (priv->gae, fi);
return gncQueryDoublePredicate (fi->how, fi->value); return qof_query_double_predicate (fi->how, fi->value);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchDouble
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
query_compare_t how; QofQueryCompare how;
double value; double value;
}; };
@ -55,7 +55,7 @@ GNCSearchDouble *gnc_search_double_new (void);
/* methods */ /* methods */
void gnc_search_double_set_value (GNCSearchDouble *fi, double val); void gnc_search_double_set_value (GNCSearchDouble *fi, double val);
void gnc_search_double_set_how (GNCSearchDouble *fi, query_compare_t how); void gnc_search_double_set_how (GNCSearchDouble *fi, QofQueryCompare how);
#endif /* ! _GNCSEARCH_DOUBLE_H */ #endif /* ! _GNCSEARCH_DOUBLE_H */

View File

@ -114,7 +114,7 @@ gnc_search_int64_class_init (GNCSearchInt64Class *class)
static void static void
gnc_search_int64_init (GNCSearchInt64 *o) gnc_search_int64_init (GNCSearchInt64 *o)
{ {
o->how = COMPARE_EQUAL; o->how = QOF_COMPARE_EQUAL;
} }
static void static void
@ -150,7 +150,7 @@ gnc_search_int64_set_value (GNCSearchInt64 *fi, gint64 value)
} }
void void
gnc_search_int64_set_how (GNCSearchInt64 *fi, query_compare_t how) gnc_search_int64_set_how (GNCSearchInt64 *fi, QofQueryCompare how)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_INT64 (fi)); g_return_if_fail (IS_GNCSEARCH_INT64 (fi));
@ -186,14 +186,14 @@ make_menu (GNCSearchCoreType *fe)
GtkComboBox *combo; GtkComboBox *combo;
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is less than"), COMPARE_LT); gnc_combo_box_search_add(combo, _("is less than"), QOF_COMPARE_LT);
gnc_combo_box_search_add(combo, _("is less than or equal to"), COMPARE_LTE); gnc_combo_box_search_add(combo, _("is less than or equal to"), QOF_COMPARE_LTE);
gnc_combo_box_search_add(combo, _("equals"), COMPARE_EQUAL); gnc_combo_box_search_add(combo, _("equals"), QOF_COMPARE_EQUAL);
gnc_combo_box_search_add(combo, _("does not equal"), COMPARE_NEQ); gnc_combo_box_search_add(combo, _("does not equal"), QOF_COMPARE_NEQ);
gnc_combo_box_search_add(combo, _("is greater than"), COMPARE_GT); gnc_combo_box_search_add(combo, _("is greater than"), QOF_COMPARE_GT);
gnc_combo_box_search_add(combo, _("is greater than or equal to"), COMPARE_GTE); gnc_combo_box_search_add(combo, _("is greater than or equal to"), QOF_COMPARE_GTE);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : COMPARE_LT); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_COMPARE_LT);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -273,7 +273,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
priv = _PRIVATE(fi); priv = _PRIVATE(fi);
entry_changed (priv->gae, fi); entry_changed (priv->gae, fi);
return gncQueryInt64Predicate (fi->how, fi->value); return qof_query_int64_predicate (fi->how, fi->value);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchInt64
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
query_compare_t how; QofQueryCompare how;
gint64 value; gint64 value;
}; };
@ -55,7 +55,7 @@ GNCSearchInt64 *gnc_search_int64_new (void);
/* methods */ /* methods */
void gnc_search_int64_set_value (GNCSearchInt64 *fi, gint64 val); void gnc_search_int64_set_value (GNCSearchInt64 *fi, gint64 val);
void gnc_search_int64_set_how (GNCSearchInt64 *fi, query_compare_t how); void gnc_search_int64_set_how (GNCSearchInt64 *fi, QofQueryCompare how);
#endif /* ! _GNCSEARCH_INT64_H */ #endif /* ! _GNCSEARCH_INT64_H */

View File

@ -115,8 +115,8 @@ static void
gnc_search_numeric_init (GNCSearchNumeric *o) gnc_search_numeric_init (GNCSearchNumeric *o)
{ {
o->value = gnc_numeric_zero (); o->value = gnc_numeric_zero ();
o->how = COMPARE_EQUAL; o->how = QOF_COMPARE_EQUAL;
o->option = NUMERIC_MATCH_ANY; o->option = QOF_NUMERIC_MATCH_ANY;
} }
static void static void
@ -171,7 +171,7 @@ gnc_search_numeric_set_value (GNCSearchNumeric *fi, gnc_numeric value)
} }
void void
gnc_search_numeric_set_how (GNCSearchNumeric *fi, query_compare_t how) gnc_search_numeric_set_how (GNCSearchNumeric *fi, QofQueryCompare how)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_NUMERIC (fi)); g_return_if_fail (IS_GNCSEARCH_NUMERIC (fi));
@ -179,7 +179,7 @@ gnc_search_numeric_set_how (GNCSearchNumeric *fi, query_compare_t how)
} }
void void
gnc_search_numeric_set_option (GNCSearchNumeric *fi, numeric_match_t option) gnc_search_numeric_set_option (GNCSearchNumeric *fi, QofNumericMatch option)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_NUMERIC (fi)); g_return_if_fail (IS_GNCSEARCH_NUMERIC (fi));
@ -218,27 +218,27 @@ make_how_menu (GNCSearchCoreType *fe)
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, (priv->is_debcred ? gnc_combo_box_search_add(combo, (priv->is_debcred ?
_("less than") : _("is less than")), _("less than") : _("is less than")),
COMPARE_LT); QOF_COMPARE_LT);
gnc_combo_box_search_add(combo, (priv->is_debcred ? gnc_combo_box_search_add(combo, (priv->is_debcred ?
_("less than or equal to") : _("less than or equal to") :
_("is less than or equal to")), _("is less than or equal to")),
COMPARE_LTE); QOF_COMPARE_LTE);
gnc_combo_box_search_add(combo, (priv->is_debcred ? gnc_combo_box_search_add(combo, (priv->is_debcred ?
_("equal to") : _("equals")), _("equal to") : _("equals")),
COMPARE_EQUAL); QOF_COMPARE_EQUAL);
gnc_combo_box_search_add(combo, (priv->is_debcred ? gnc_combo_box_search_add(combo, (priv->is_debcred ?
_("not equal to") : _("does not equal")), _("not equal to") : _("does not equal")),
COMPARE_NEQ); QOF_COMPARE_NEQ);
gnc_combo_box_search_add(combo, (priv->is_debcred ? gnc_combo_box_search_add(combo, (priv->is_debcred ?
_("greater than") : _("is greater than")), _("greater than") : _("is greater than")),
COMPARE_GT); QOF_COMPARE_GT);
gnc_combo_box_search_add(combo, (priv->is_debcred ? gnc_combo_box_search_add(combo, (priv->is_debcred ?
_("greater than or equal to") : _("greater than or equal to") :
_("is greater than or equal to")), _("is greater than or equal to")),
COMPARE_GTE); QOF_COMPARE_GTE);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : COMPARE_LT); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_COMPARE_LT);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -250,11 +250,11 @@ make_option_menu (GNCSearchCoreType *fe)
GtkComboBox *combo; GtkComboBox *combo;
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("has credits or debits"), NUMERIC_MATCH_ANY); gnc_combo_box_search_add(combo, _("has credits or debits"), QOF_NUMERIC_MATCH_ANY);
gnc_combo_box_search_add(combo, _("has debits"), NUMERIC_MATCH_DEBIT); gnc_combo_box_search_add(combo, _("has debits"), QOF_NUMERIC_MATCH_DEBIT);
gnc_combo_box_search_add(combo, _("has credits"), NUMERIC_MATCH_CREDIT); gnc_combo_box_search_add(combo, _("has credits"), QOF_NUMERIC_MATCH_CREDIT);
gnc_combo_box_search_changed(combo, &fi->option); gnc_combo_box_search_changed(combo, &fi->option);
gnc_combo_box_search_set_active(combo, fi->option ? fi->option : NUMERIC_MATCH_ANY); gnc_combo_box_search_set_active(combo, fi->option ? fi->option : QOF_NUMERIC_MATCH_ANY);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
@ -334,7 +334,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
priv = _PRIVATE(fi); priv = _PRIVATE(fi);
entry_changed (priv->gae, fi); entry_changed (priv->gae, fi);
return gncQueryNumericPredicate (fi->how, fi->option, fi->value); return qof_query_numeric_predicate (fi->how, fi->option, fi->value);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -39,9 +39,9 @@ struct _GNCSearchNumeric
GNCSearchCoreType parent; GNCSearchCoreType parent;
struct _GNCSearchNumericPrivate *priv; struct _GNCSearchNumericPrivate *priv;
query_compare_t how; QofQueryCompare how;
gnc_numeric value; gnc_numeric value;
numeric_match_t option; QofNumericMatch option;
}; };
struct _GNCSearchNumericClass struct _GNCSearchNumericClass
@ -59,8 +59,8 @@ GNCSearchNumeric *gnc_search_numeric_debcred_new (void);
/* methods */ /* methods */
void gnc_search_numeric_set_value (GNCSearchNumeric *fi, gnc_numeric val); void gnc_search_numeric_set_value (GNCSearchNumeric *fi, gnc_numeric val);
void gnc_search_numeric_set_how (GNCSearchNumeric *fi, query_compare_t how); void gnc_search_numeric_set_how (GNCSearchNumeric *fi, QofQueryCompare how);
void gnc_search_numeric_set_option (GNCSearchNumeric *fi, numeric_match_t option); void gnc_search_numeric_set_option (GNCSearchNumeric *fi, QofNumericMatch option);
#endif /* ! _GNCSEARCH_NUMERIC_H */ #endif /* ! _GNCSEARCH_NUMERIC_H */

View File

@ -108,7 +108,7 @@ gnc_search_reconciled_class_init (GNCSearchReconciledClass *class)
static void static void
gnc_search_reconciled_init (GNCSearchReconciled *o) gnc_search_reconciled_init (GNCSearchReconciled *o)
{ {
o->how = COMPARE_EQUAL; o->how = QOF_COMPARE_EQUAL;
o->value = CLEARED_NO; o->value = CLEARED_NO;
} }
@ -145,7 +145,7 @@ gnc_search_reconciled_set_value (GNCSearchReconciled *fi, cleared_match_t value)
} }
void void
gnc_search_reconciled_set_how (GNCSearchReconciled *fi, char_match_t how) gnc_search_reconciled_set_how (GNCSearchReconciled *fi, QofCharMatch how)
{ {
g_return_if_fail (fi); g_return_if_fail (fi);
g_return_if_fail (IS_GNCSEARCH_RECONCILED (fi)); g_return_if_fail (IS_GNCSEARCH_RECONCILED (fi));
@ -186,16 +186,16 @@ make_menu (GNCSearchCoreType *fe)
GtkComboBox *combo; GtkComboBox *combo;
combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is"), CHAR_MATCH_ANY); gnc_combo_box_search_add(combo, _("is"), QOF_CHAR_MATCH_ANY);
gnc_combo_box_search_add(combo, _("is not"), CHAR_MATCH_NONE); gnc_combo_box_search_add(combo, _("is not"), QOF_CHAR_MATCH_NONE);
gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : CHAR_MATCH_ANY); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_CHAR_MATCH_ANY);
return GTK_WIDGET(combo); return GTK_WIDGET(combo);
} }
static GtkWidget * static GtkWidget *
make_toggle (GNCSearchReconciled *fi, char *label, char_match_t option) make_toggle (GNCSearchReconciled *fi, char *label, QofCharMatch option)
{ {
GtkWidget *toggle; GtkWidget *toggle;
@ -269,7 +269,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
chars[i++] = VREC; chars[i++] = VREC;
chars[i] = '\0'; chars[i] = '\0';
return gncQueryCharPredicate (fi->how, chars); return qof_query_char_predicate (fi->how, chars);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchReconciled
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
char_match_t how; QofCharMatch how;
cleared_match_t value; cleared_match_t value;
}; };
@ -55,6 +55,6 @@ GNCSearchReconciled *gnc_search_reconciled_new (void);
/* methods */ /* methods */
void gnc_search_reconciled_set_value(GNCSearchReconciled *fi, cleared_match_t value); void gnc_search_reconciled_set_value(GNCSearchReconciled *fi, cleared_match_t value);
void gnc_search_reconciled_set_how (GNCSearchReconciled *fi, char_match_t how); void gnc_search_reconciled_set_how (GNCSearchReconciled *fi, QofCharMatch how);
#endif /* ! _GNCSEARCH_RECONCILED_H */ #endif /* ! _GNCSEARCH_RECONCILED_H */

View File

@ -338,8 +338,8 @@ gncs_get_widget (GNCSearchCoreType *fe)
static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe) static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
{ {
GNCSearchString *ss = (GNCSearchString *)fe; GNCSearchString *ss = (GNCSearchString *)fe;
query_compare_t how; QofQueryCompare how;
string_match_t options = STRING_MATCH_NORMAL; QofStringMatch options = QOF_STRING_MATCH_NORMAL;
gboolean is_regex = FALSE; gboolean is_regex = FALSE;
g_return_val_if_fail (ss, NULL); g_return_val_if_fail (ss, NULL);
@ -351,13 +351,13 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
is_regex = TRUE; is_regex = TRUE;
/* FALLTHROUGH */ /* FALLTHROUGH */
case SEARCH_STRING_CONTAINS: case SEARCH_STRING_CONTAINS:
how = COMPARE_EQUAL; how = QOF_COMPARE_EQUAL;
break; break;
case SEARCH_STRING_NOT_MATCHES_REGEX: case SEARCH_STRING_NOT_MATCHES_REGEX:
is_regex = TRUE; is_regex = TRUE;
/* FALLTHROUGH */ /* FALLTHROUGH */
case SEARCH_STRING_NOT_CONTAINS: case SEARCH_STRING_NOT_CONTAINS:
how = COMPARE_NEQ; how = QOF_COMPARE_NEQ;
break; break;
default: default:
g_warning ("invalid string choice: %d", ss->how); g_warning ("invalid string choice: %d", ss->how);
@ -365,9 +365,9 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
} }
if (ss->ign_case) if (ss->ign_case)
options = STRING_MATCH_CASEINSENSITIVE; options = QOF_STRING_MATCH_CASEINSENSITIVE;
return gncQueryStringPredicate (how, ss->value, options, is_regex); return qof_query_string_predicate (how, ss->value, options, is_regex);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -289,7 +289,7 @@ gnc_account_create_transfer_balance (QofBook *book,
xaccTransBeginEdit (trans); xaccTransBeginEdit (trans);
xaccTransSetCurrency (trans, xaccAccountGetCommodity (account)); xaccTransSetCurrency (trans, xaccAccountGetCommodity (account));
xaccTransSetDateSecs (trans, date); xaccTransSetDatePostedSecs (trans, date);
xaccTransSetDescription (trans, _("Opening Balance")); xaccTransSetDescription (trans, _("Opening Balance"));
split = xaccMallocSplit (book); split = xaccMallocSplit (book);
@ -573,7 +573,7 @@ gnc_finish_ok (AccountWindow *aw)
aw->created_account = aw_get_account (aw); aw->created_account = aw_get_account (aw);
/* so it doesn't get freed on close */ /* so it doesn't get freed on close */
aw->account = *xaccGUIDNULL (); aw->account = *guid_null ();
gnc_close_gui_component (aw->component_id); gnc_close_gui_component (aw->component_id);
LEAVE("2"); LEAVE("2");
@ -978,7 +978,7 @@ gnc_account_window_destroy_cb (GtkObject *object, gpointer data)
{ {
xaccAccountBeginEdit (account); xaccAccountBeginEdit (account);
xaccAccountDestroy (account); xaccAccountDestroy (account);
aw->account = *xaccGUIDNULL (); aw->account = *guid_null ();
} }
DEBUG ("account add window destroyed\n"); DEBUG ("account add window destroyed\n");

View File

@ -58,7 +58,7 @@ dql_clear_booklist (DialogQueryList *dql)
g_return_if_fail (dql); g_return_if_fail (dql);
for (node = dql->books; node; node = node->next) for (node = dql->books; node; node = node->next)
xaccGUIDFree ((GncGUID*)node->data); guid_free ((GncGUID*)node->data);
g_list_free (dql->books); g_list_free (dql->books);
dql->books = NULL; dql->books = NULL;
} }
@ -73,7 +73,7 @@ dql_build_booklist (DialogQueryList *dql, Query *q)
for (node = qof_query_get_books(q); node; node = node->next) for (node = qof_query_get_books(q); node; node = node->next)
{ {
QofBook *book = node->data; QofBook *book = node->data;
GncGUID *guid = xaccGUIDMalloc(); GncGUID *guid = guid_malloc();
*guid = *(qof_book_get_guid(book)); *guid = *(qof_book_get_guid(book));
dql->books = g_list_prepend(dql->books, guid); dql->books = g_list_prepend(dql->books, guid);
} }

View File

@ -1371,7 +1371,7 @@ gnc_main_window_generate_title (GncMainWindow *window)
} }
if (gnc_current_session_exist()) if (gnc_current_session_exist())
{ {
book_id = gnc_session_get_url (gnc_get_current_session ()); book_id = qof_session_get_url (gnc_get_current_session ());
book = gnc_get_current_book(); book = gnc_get_current_book();
if (qof_instance_is_dirty(QOF_INSTANCE(book))) if (qof_instance_is_dirty(QOF_INSTANCE(book)))
{ {

View File

@ -191,7 +191,7 @@ update_booleans (GNCQueryList *list, gint row)
const char *type = gnc_search_param_get_param_type (param); const char *type = gnc_search_param_get_param_type (param);
/* if this is a boolean, ignore it now -- we'll use a checkmark later */ /* if this is a boolean, ignore it now -- we'll use a checkmark later */
if (safe_strcmp (type, QUERYCORE_BOOLEAN)) if (safe_strcmp (type, QOF_TYPE_BOOLEAN))
continue; continue;
result = (gboolean) GPOINTER_TO_INT(gnc_search_param_compute_value(param, entry)); result = (gboolean) GPOINTER_TO_INT(gnc_search_param_compute_value(param, entry));
@ -704,8 +704,8 @@ gnc_query_list_set_query_sort (GNCQueryList *list, gboolean new_column)
if (list->numeric_inv_sort) if (list->numeric_inv_sort)
{ {
const char *type = gnc_search_param_get_param_type (param); const char *type = gnc_search_param_get_param_type (param);
if (!safe_strcmp(type, QUERYCORE_NUMERIC) || if (!safe_strcmp(type, QOF_TYPE_NUMERIC) ||
!safe_strcmp(type, QUERYCORE_DEBCRED)) !safe_strcmp(type, QOF_TYPE_DEBCRED))
sort_order = !sort_order; sort_order = !sort_order;
} }
@ -811,7 +811,7 @@ gnc_query_list_fill(GNCQueryList *list)
gpointer res = item->data; gpointer res = item->data;
/* if this is a boolean, ignore it now -- we'll use a checkmark later */ /* if this is a boolean, ignore it now -- we'll use a checkmark later */
if (!safe_strcmp (type, QUERYCORE_BOOLEAN)) if (!safe_strcmp (type, QOF_TYPE_BOOLEAN))
{ {
strings[i++] = g_strdup(""); strings[i++] = g_strdup("");
continue; continue;
@ -828,8 +828,8 @@ gnc_query_list_fill(GNCQueryList *list)
} }
/* Now convert this to a text value for the row */ /* Now convert this to a text value for the row */
if (!safe_strcmp(type, QUERYCORE_DEBCRED) || if (!safe_strcmp(type, QOF_TYPE_DEBCRED) ||
!safe_strcmp(type, QUERYCORE_NUMERIC)) !safe_strcmp(type, QOF_TYPE_NUMERIC))
{ {
gnc_numeric (*nfcn)(gpointer, QofParam *) = gnc_numeric (*nfcn)(gpointer, QofParam *) =
(gnc_numeric(*)(gpointer, QofParam *))(qp->param_getfcn); (gnc_numeric(*)(gpointer, QofParam *))(qp->param_getfcn);
@ -839,7 +839,7 @@ gnc_query_list_fill(GNCQueryList *list)
strings[i++] = g_strdup(xaccPrintAmount(value, gnc_default_print_info(FALSE))); strings[i++] = g_strdup(xaccPrintAmount(value, gnc_default_print_info(FALSE)));
} }
else else
strings[i++] = gncQueryCoreToString (type, res, qp); strings[i++] = qof_query_core_to_string (type, res, qp);
} }
row = gtk_clist_append (GTK_CLIST(list), (gchar **) strings); row = gtk_clist_append (GTK_CLIST(list), (gchar **) strings);

View File

@ -45,7 +45,7 @@ struct _GNCSearchParamPrivate
{ {
GSList * converters; GSList * converters;
GSList * param_path; GSList * param_path;
GNCIdTypeConst type; QofIdTypeConst type;
GNCSearchParamFcn lookup_fcn; GNCSearchParamFcn lookup_fcn;
gpointer lookup_arg; gpointer lookup_arg;
@ -163,11 +163,11 @@ gnc_search_param_clone (GNCSearchParam *param)
void void
gnc_search_param_set_param_path (GNCSearchParam *param, gnc_search_param_set_param_path (GNCSearchParam *param,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
GSList *param_path) GSList *param_path)
{ {
GNCSearchParamPrivate *priv; GNCSearchParamPrivate *priv;
GNCIdTypeConst type = NULL; QofIdTypeConst type = NULL;
GSList *converters = NULL; GSList *converters = NULL;
g_return_if_fail (GNC_IS_SEARCH_PARAM (param)); g_return_if_fail (GNC_IS_SEARCH_PARAM (param));
@ -182,9 +182,9 @@ gnc_search_param_set_param_path (GNCSearchParam *param,
/* Compute the parameter type */ /* Compute the parameter type */
for (; param_path; param_path = param_path->next) for (; param_path; param_path = param_path->next)
{ {
GNCIdType param_name = param_path->data; QofIdType param_name = param_path->data;
const QueryObjectDef *objDef = const QueryObjectDef *objDef =
gncQueryObjectGetParameter (search_type, param_name); qof_class_get_parameter (search_type, param_name);
/* If it doesn't exist, then we've reached the end */ /* If it doesn't exist, then we've reached the end */
if (objDef == NULL) if (objDef == NULL)
@ -210,7 +210,7 @@ gnc_search_param_set_param_path (GNCSearchParam *param,
void void
gnc_search_param_override_param_type (GNCSearchParam *param, gnc_search_param_override_param_type (GNCSearchParam *param,
GNCIdTypeConst param_type) QofIdTypeConst param_type)
{ {
GNCSearchParamPrivate *priv; GNCSearchParamPrivate *priv;
@ -244,7 +244,7 @@ gnc_search_param_get_converters (GNCSearchParam *param)
return priv->converters; return priv->converters;
} }
GNCIdTypeConst QofIdTypeConst
gnc_search_param_get_param_type (GNCSearchParam *param) gnc_search_param_get_param_type (GNCSearchParam *param)
{ {
GNCSearchParamPrivate *priv; GNCSearchParamPrivate *priv;
@ -307,8 +307,8 @@ gnc_search_param_type_match (GNCSearchParam *a, GNCSearchParam *b)
static GList * static GList *
gnc_search_param_prepend_internal (GList *list, char const *title, gnc_search_param_prepend_internal (GList *list, char const *title,
GtkJustification justify, GtkJustification justify,
GNCIdTypeConst type_override, QofIdTypeConst type_override,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
const char *param, va_list args) const char *param, va_list args)
{ {
GNCSearchParam *p; GNCSearchParam *p;
@ -341,8 +341,8 @@ gnc_search_param_prepend_internal (GList *list, char const *title,
GList * GList *
gnc_search_param_prepend_with_justify (GList *list, char const *title, gnc_search_param_prepend_with_justify (GList *list, char const *title,
GtkJustification justify, GtkJustification justify,
GNCIdTypeConst type_override, QofIdTypeConst type_override,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
const char *param, ...) const char *param, ...)
{ {
GList *result; GList *result;
@ -363,8 +363,8 @@ gnc_search_param_prepend_with_justify (GList *list, char const *title,
GList * GList *
gnc_search_param_prepend (GList *list, char const *title, gnc_search_param_prepend (GList *list, char const *title,
GNCIdTypeConst type_override, QofIdTypeConst type_override,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
const char *param, ...) const char *param, ...)
{ {
GList *result; GList *result;
@ -385,7 +385,7 @@ gnc_search_param_prepend (GList *list, char const *title,
void void
gnc_search_param_set_param_fcn (GNCSearchParam *param, gnc_search_param_set_param_fcn (GNCSearchParam *param,
GNCIdTypeConst param_type, QofIdTypeConst param_type,
GNCSearchParamFcn fcn, GNCSearchParamFcn fcn,
gpointer arg) gpointer arg)
{ {

View File

@ -63,12 +63,12 @@ GNCSearchParam * gnc_search_param_clone (GNCSearchParam *param);
* compute the parameter type and the converter functions. * compute the parameter type and the converter functions.
*/ */
void gnc_search_param_set_param_path (GNCSearchParam *param, void gnc_search_param_set_param_path (GNCSearchParam *param,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
GSList *param_path); GSList *param_path);
/* List is property of the caller */ /* List is property of the caller */
GSList * gnc_search_param_get_param_path (GNCSearchParam *param); GSList * gnc_search_param_get_param_path (GNCSearchParam *param);
GNCIdTypeConst gnc_search_param_get_param_type (GNCSearchParam *param); QofIdTypeConst gnc_search_param_get_param_type (GNCSearchParam *param);
void gnc_search_param_set_title (GNCSearchParam *param, void gnc_search_param_set_title (GNCSearchParam *param,
const char *title); const char *title);
void gnc_search_param_set_justify (GNCSearchParam *param, void gnc_search_param_set_justify (GNCSearchParam *param,
@ -80,7 +80,7 @@ void gnc_search_param_set_non_resizeable (GNCSearchParam *param,
gboolean gnc_search_param_type_match (GNCSearchParam *a, gboolean gnc_search_param_type_match (GNCSearchParam *a,
GNCSearchParam *b); GNCSearchParam *b);
/* Return the list of QueryAccess functions for this parameter. This list /* Return the list of QofAccessFunc functions for this parameter. This list
* is owned by the param object -- users should not change it */ * is owned by the param object -- users should not change it */
GSList * gnc_search_param_get_converters (GNCSearchParam *param); GSList * gnc_search_param_get_converters (GNCSearchParam *param);
@ -91,7 +91,7 @@ GSList * gnc_search_param_get_converters (GNCSearchParam *param);
* don't match types properly. * don't match types properly.
*/ */
void gnc_search_param_override_param_type (GNCSearchParam *param, void gnc_search_param_override_param_type (GNCSearchParam *param,
GNCIdTypeConst param_type); QofIdTypeConst param_type);
/************************************************************* /*************************************************************
@ -100,15 +100,15 @@ void gnc_search_param_override_param_type (GNCSearchParam *param,
/* Create a paramter and prepend it to a GSList */ /* Create a paramter and prepend it to a GSList */
GList * gnc_search_param_prepend (GList *list, char const *title, GList * gnc_search_param_prepend (GList *list, char const *title,
GNCIdTypeConst type_override, QofIdTypeConst type_override,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
const char *param, ...); const char *param, ...);
GList * gnc_search_param_prepend_with_justify (GList *list, char const *title, GList * gnc_search_param_prepend_with_justify (GList *list, char const *title,
GtkJustification justify, GtkJustification justify,
GNCIdTypeConst type_override, QofIdTypeConst type_override,
GNCIdTypeConst search_type, QofIdTypeConst search_type,
const char *param, ...); const char *param, ...);
/* set a lookup function for this parameter (in lieu of setting the /* set a lookup function for this parameter (in lieu of setting the
@ -119,7 +119,7 @@ GList * gnc_search_param_prepend_with_justify (GList *list, char const *title,
*/ */
typedef gpointer (*GNCSearchParamFcn)(gpointer object, gpointer arg); typedef gpointer (*GNCSearchParamFcn)(gpointer object, gpointer arg);
void gnc_search_param_set_param_fcn (GNCSearchParam *param, void gnc_search_param_set_param_fcn (GNCSearchParam *param,
GNCIdTypeConst param_type, QofIdTypeConst param_type,
GNCSearchParamFcn fcn, GNCSearchParamFcn fcn,
gpointer arg); gpointer arg);

View File

@ -92,7 +92,7 @@ free_ftd_cb (gpointer user_data)
GNCSearchWindow * GNCSearchWindow *
gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg) gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg)
{ {
GNCIdType type = GNC_ID_SPLIT; QofIdType type = GNC_ID_SPLIT;
struct _ftd_data *ftd; struct _ftd_data *ftd;
static GList *params = NULL; static GList *params = NULL;
QofQuery *start_q, *show_q = NULL; QofQuery *start_q, *show_q = NULL;
@ -164,7 +164,7 @@ gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg)
tRoot = gnc_book_get_template_root( gnc_get_current_book() ); tRoot = gnc_book_get_template_root( gnc_get_current_book() );
al = gnc_account_get_descendants( tRoot ); al = gnc_account_get_descendants( tRoot );
xaccQueryAddAccountMatch( start_q, al, GUID_MATCH_NONE, QOF_QUERY_AND ); xaccQueryAddAccountMatch( start_q, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
g_list_free (al); g_list_free (al);
al = NULL; al = NULL;
tRoot = NULL; tRoot = NULL;

View File

@ -1426,7 +1426,7 @@ create_balancing_transaction(QofBook *book, Account *account,
// fill Transaction // fill Transaction
xaccTransSetCurrency(trans, xaccAccountGetCommodity(account)); xaccTransSetCurrency(trans, xaccAccountGetCommodity(account));
xaccTransSetDateSecs(trans, statement_date); xaccTransSetDatePostedSecs(trans, statement_date);
xaccTransSetDescription(trans, _("Balancing entry from reconcilation")); xaccTransSetDescription(trans, _("Balancing entry from reconcilation"));
// 1. Split // 1. Split

View File

@ -151,19 +151,19 @@ gnc_reconcile_list_new(Account *account, GNCReconcileListType type,
/* match the account */ /* match the account */
accounts = g_list_prepend (accounts, account); accounts = g_list_prepend (accounts, account);
xaccQueryAddAccountMatch (query, accounts, GUID_MATCH_ANY, QOF_QUERY_AND); xaccQueryAddAccountMatch (query, accounts, QOF_GUID_MATCH_ANY, QOF_QUERY_AND);
g_list_free (accounts); g_list_free (accounts);
/* limit the matches to CREDITs and DEBITs only, depending on the type */ /* limit the matches to CREDITs and DEBITs only, depending on the type */
if (type == RECLIST_CREDIT) if (type == RECLIST_CREDIT)
xaccQueryAddValueMatch(query, gnc_numeric_zero (), xaccQueryAddValueMatch(query, gnc_numeric_zero (),
NUMERIC_MATCH_CREDIT, QOF_NUMERIC_MATCH_CREDIT,
COMPARE_GTE, QOF_QUERY_AND); QOF_COMPARE_GTE, QOF_QUERY_AND);
else else
xaccQueryAddValueMatch(query, gnc_numeric_zero (), xaccQueryAddValueMatch(query, gnc_numeric_zero (),
NUMERIC_MATCH_DEBIT, QOF_NUMERIC_MATCH_DEBIT,
COMPARE_GTE, QOF_QUERY_AND); QOF_COMPARE_GTE, QOF_QUERY_AND);
/* limit the matches only to Cleared and Non-reconciled splits */ /* limit the matches only to Cleared and Non-reconciled splits */
xaccQueryAddClearedMatch(query, CLEARED_NO | CLEARED_CLEARED, QOF_QUERY_AND); xaccQueryAddClearedMatch(query, CLEARED_NO | CLEARED_CLEARED, QOF_QUERY_AND);
@ -209,7 +209,7 @@ gnc_reconcile_list_init (GNCReconcileList *list)
list->sibling = NULL; list->sibling = NULL;
param = gnc_search_param_new(); param = gnc_search_param_new();
gnc_search_param_set_param_fcn (param, QUERYCORE_BOOLEAN, gnc_search_param_set_param_fcn (param, QOF_TYPE_BOOLEAN,
gnc_reconcile_list_is_reconciled, list); gnc_reconcile_list_is_reconciled, list);
gnc_search_param_set_title (param, _("Reconciled:R") + 11); gnc_search_param_set_title (param, _("Reconciled:R") + 11);
gnc_search_param_set_justify (param, GTK_JUSTIFY_CENTER); gnc_search_param_set_justify (param, GTK_JUSTIFY_CENTER);

View File

@ -469,7 +469,7 @@ gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc)
valuta_date = normal_date; valuta_date = normal_date;
} }
if (valuta_date) if (valuta_date)
xaccTransSetDateSecs(gnc_trans, GWEN_Time_toTime_t(valuta_date)); xaccTransSetDatePostedSecs(gnc_trans, GWEN_Time_toTime_t(valuta_date));
else else
g_warning("transaction_cb: Oops, date 'valuta_date' was NULL"); g_warning("transaction_cb: Oops, date 'valuta_date' was NULL");

View File

@ -282,7 +282,7 @@ AB_TRANSACTION *gnc_hbci_trans_list_cb(AB_TRANSACTION *h_trans, void *user_data)
/* Date / Time */ /* Date / Time */
if (valutaDate) if (valutaDate)
xaccTransSetDateSecs xaccTransSetDatePostedSecs
(gnc_trans, GWEN_Time_toTime_t (valutaDate)); (gnc_trans, GWEN_Time_toTime_t (valutaDate));
else else
g_warning("trans_list_cb: Oops, date 'valutaDate' was NULL.\n"); g_warning("trans_list_cb: Oops, date 'valutaDate' was NULL.\n");

View File

@ -143,11 +143,11 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_u
if (data.date_initiated_valid == true) if (data.date_initiated_valid == true)
{ {
xaccTransSetDateSecs(transaction, data.date_initiated); xaccTransSetDatePostedSecs(transaction, data.date_initiated);
} }
else if (data.date_posted_valid == true) else if (data.date_posted_valid == true)
{ {
xaccTransSetDateSecs(transaction, data.date_posted); xaccTransSetDatePostedSecs(transaction, data.date_posted);
} }
if (data.date_posted_valid == true) if (data.date_posted_valid == true)

View File

@ -429,7 +429,7 @@ gnc_ledger_display_gl (void)
tRoot = gnc_book_get_template_root( gnc_get_current_book() ); tRoot = gnc_book_get_template_root( gnc_get_current_book() );
al = gnc_account_get_descendants( tRoot ); al = gnc_account_get_descendants( tRoot );
xaccQueryAddAccountMatch( query, al, GUID_MATCH_NONE, QOF_QUERY_AND ); xaccQueryAddAccountMatch( query, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND );
g_list_free (al); g_list_free (al);
al = NULL; al = NULL;
tRoot = NULL; tRoot = NULL;
@ -665,7 +665,7 @@ gnc_ledger_display_make_query (GNCLedgerDisplay *ld,
accounts = g_list_prepend (accounts, leader); accounts = g_list_prepend (accounts, leader);
xaccQueryAddAccountMatch (ld->query, accounts, xaccQueryAddAccountMatch (ld->query, accounts,
GUID_MATCH_ANY, QOF_QUERY_AND); QOF_GUID_MATCH_ANY, QOF_QUERY_AND);
g_list_free (accounts); g_list_free (accounts);
} }

View File

@ -344,7 +344,7 @@ gnc_split_register_load (SplitRegister *reg, GList * slist,
xaccTransBeginEdit (new_trans); xaccTransBeginEdit (new_trans);
xaccTransSetCurrency (new_trans, xaccTransSetCurrency (new_trans,
currency ? currency : gnc_default_currency()); currency ? currency : gnc_default_currency());
xaccTransSetDateSecs (new_trans, info->last_date_entered); xaccTransSetDatePostedSecs (new_trans, info->last_date_entered);
blank_split = xaccMallocSplit (gnc_get_current_book ()); blank_split = xaccMallocSplit (gnc_get_current_book ());
xaccSplitSetParent(blank_split, new_trans); xaccSplitSetParent(blank_split, new_trans);
/* We don't want to commit this transaction yet, because the split /* We don't want to commit this transaction yet, because the split

View File

@ -545,7 +545,7 @@ gnc_split_register_duplicate_current (SplitRegister *reg)
xaccTransBeginEdit (new_trans); xaccTransBeginEdit (new_trans);
gnc_copy_trans_onto_trans (trans, new_trans, FALSE, FALSE); gnc_copy_trans_onto_trans (trans, new_trans, FALSE, FALSE);
xaccTransSetDateSecs (new_trans, date); xaccTransSetDatePostedSecs (new_trans, date);
xaccTransSetNum (new_trans, out_num); xaccTransSetNum (new_trans, out_num);
xaccTransCommitEdit (new_trans); xaccTransCommitEdit (new_trans);