mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
75d71c93a3
commit
febe74e6c0
@ -32,7 +32,7 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GNCIdType entity_type;
|
||||
QofIdType entity_type;
|
||||
QofEventId event_mask;
|
||||
} EntityTypeEventInfo;
|
||||
|
||||
@ -143,7 +143,7 @@ destroy_event_hash_helper (gpointer key, gpointer value, gpointer user_data)
|
||||
GncGUID *guid = key;
|
||||
EventInfo *ei = value;
|
||||
|
||||
xaccGUIDFree (guid);
|
||||
guid_free (guid);
|
||||
g_free (ei);
|
||||
|
||||
return TRUE;
|
||||
@ -199,7 +199,7 @@ add_event (ComponentEventInfo *cei, const GncGUID *entity,
|
||||
if (g_hash_table_lookup_extended (hash, entity, &key, &value))
|
||||
{
|
||||
g_hash_table_remove (hash, entity);
|
||||
xaccGUIDFree (key);
|
||||
guid_free (key);
|
||||
g_free (value);
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ add_event (ComponentEventInfo *cei, const GncGUID *entity,
|
||||
{
|
||||
GncGUID *key;
|
||||
|
||||
key = xaccGUIDMalloc ();
|
||||
key = guid_malloc ();
|
||||
*key = *entity;
|
||||
|
||||
ei = g_new (EventInfo, 1);
|
||||
@ -229,7 +229,7 @@ add_event (ComponentEventInfo *cei, const GncGUID *entity,
|
||||
}
|
||||
|
||||
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 *mask;
|
||||
@ -476,7 +476,7 @@ gnc_gui_component_watch_entity_direct (gint component_id,
|
||||
|
||||
void
|
||||
gnc_gui_component_watch_entity_type (gint component_id,
|
||||
GNCIdTypeConst entity_type,
|
||||
QofIdTypeConst entity_type,
|
||||
QofEventId event_mask)
|
||||
{
|
||||
ComponentInfo *ci;
|
||||
@ -606,7 +606,7 @@ static void
|
||||
match_type_helper (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
ComponentEventInfo *cei = user_data;
|
||||
GNCIdType id_type = key;
|
||||
QofIdType id_type = key;
|
||||
QofEventId * et = value;
|
||||
QofEventId * et_2;
|
||||
|
||||
|
@ -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
|
||||
*/
|
||||
void gnc_gui_component_watch_entity_type (gint component_id,
|
||||
GNCIdTypeConst entity_type,
|
||||
QofIdTypeConst entity_type,
|
||||
QofEventId event_mask);
|
||||
|
||||
/* gnc_gui_get_entity_events
|
||||
|
@ -851,7 +851,7 @@ gnc_account_create_opening_balance (Account *account,
|
||||
xaccTransBeginEdit (trans);
|
||||
|
||||
xaccTransSetCurrency (trans, xaccAccountGetCommodity (account));
|
||||
xaccTransSetDateSecs (trans, date);
|
||||
xaccTransSetDatePostedSecs (trans, date);
|
||||
xaccTransSetDescription (trans, _("Opening Balance"));
|
||||
|
||||
split = xaccMallocSplit (book);
|
||||
|
@ -1432,8 +1432,8 @@ account_restore_after_child_handler(gpointer data_for_children,
|
||||
{
|
||||
gnc_commodity *com = (gnc_commodity *) child_result->data;
|
||||
g_return_val_if_fail(com, FALSE);
|
||||
if (DxaccAccountGetSecurity(a)) return FALSE;
|
||||
DxaccAccountSetSecurity(a, com);
|
||||
if (xaccAccountGetCommodity(a)) return FALSE;
|
||||
xaccAccountSetCommodity(a, com);
|
||||
/* let the normal child_result handler clean up com */
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ static GtkWidget * gnc_owner_new (GtkWidget *label, GtkWidget *hbox,
|
||||
owner->owner.undefined);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), edit, FALSE, FALSE, 0);
|
||||
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;
|
||||
}
|
||||
@ -510,7 +510,7 @@ generic_omenu_refresh_handler (GHashTable *changes, gpointer user_data)
|
||||
|
||||
static OpMenuData *
|
||||
make_generic_optionmenu (GtkWidget *omenu, QofBook *book,
|
||||
gboolean none_ok, GNCIdType type_name,
|
||||
gboolean none_ok, QofIdType type_name,
|
||||
GList * (*get_list)(QofBook*),
|
||||
GenericLookup_t get_name,
|
||||
gpointer *result)
|
||||
|
@ -319,7 +319,7 @@ gnc_customer_window_ok_cb (GtkWidget *widget, gpointer data)
|
||||
gnc_ui_to_customer (cw, customer);
|
||||
}
|
||||
cw->created_customer = customer;
|
||||
cw->customer_guid = *xaccGUIDNULL ();
|
||||
cw->customer_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_close_gui_component (cw->component_id);
|
||||
@ -351,7 +351,7 @@ gnc_customer_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gncCustomerBeginEdit (customer);
|
||||
gncCustomerDestroy (customer);
|
||||
cw->customer_guid = *xaccGUIDNULL ();
|
||||
cw->customer_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_unregister_gui_component (cw->component_id);
|
||||
@ -791,7 +791,7 @@ GNCSearchWindow *
|
||||
gnc_customer_search (GncCustomer *start, QofBook *book)
|
||||
{
|
||||
QofQuery *q, *q2 = NULL;
|
||||
GNCIdType type = GNC_CUSTOMER_MODULE_NAME;
|
||||
QofIdType type = GNC_CUSTOMER_MODULE_NAME;
|
||||
struct _customer_select_window *sw;
|
||||
static GList *params = NULL;
|
||||
static GList *columns = NULL;
|
||||
|
@ -255,7 +255,7 @@ gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data)
|
||||
gnc_ui_to_employee (ew, employee);
|
||||
}
|
||||
ew->created_employee = employee;
|
||||
ew->employee_guid = *xaccGUIDNULL ();
|
||||
ew->employee_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_close_gui_component (ew->component_id);
|
||||
@ -287,7 +287,7 @@ gnc_employee_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gncEmployeeBeginEdit (employee);
|
||||
gncEmployeeDestroy (employee);
|
||||
ew->employee_guid = *xaccGUIDNULL ();
|
||||
ew->employee_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_unregister_gui_component (ew->component_id);
|
||||
@ -697,7 +697,7 @@ free_employee_cb (gpointer user_data)
|
||||
GNCSearchWindow *
|
||||
gnc_employee_search (GncEmployee *start, QofBook *book)
|
||||
{
|
||||
GNCIdType type = GNC_EMPLOYEE_MODULE_NAME;
|
||||
QofIdType type = GNC_EMPLOYEE_MODULE_NAME;
|
||||
struct _employee_select_window *sw;
|
||||
QofQuery *q, *q2 = NULL;
|
||||
static GList *params = NULL;
|
||||
|
@ -403,7 +403,7 @@ gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data)
|
||||
return;
|
||||
|
||||
/* 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
|
||||
* 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);
|
||||
gncInvoiceDestroy (invoice);
|
||||
iw->invoice_guid = *xaccGUIDNULL ();
|
||||
iw->invoice_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_entry_ledger_destroy (iw->ledger);
|
||||
@ -2373,7 +2373,7 @@ free_invoice_cb (gpointer user_data)
|
||||
GNCSearchWindow *
|
||||
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;
|
||||
QofQuery *q, *q2 = NULL;
|
||||
GncOwnerType owner_type = GNC_OWNER_CUSTOMER;
|
||||
@ -2668,7 +2668,7 @@ gnc_invoice_search_edit (gpointer start, gpointer book)
|
||||
DialogQueryList *
|
||||
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;
|
||||
QueryPredData_t pred_data;
|
||||
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
|
||||
it must match the QofObject.type_label string exactly, which
|
||||
implies it is used in untranslated form! */
|
||||
pred_data = gncQueryStringPredicate (COMPARE_NEQ, "Invoice",
|
||||
STRING_MATCH_NORMAL, FALSE);
|
||||
pred_data = qof_query_string_predicate (QOF_COMPARE_NEQ, "Invoice",
|
||||
QOF_STRING_MATCH_NORMAL, FALSE);
|
||||
qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_TYPE), pred_data, QOF_QUERY_AND);
|
||||
|
||||
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_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);
|
||||
|
||||
res = qof_query_run(q);
|
||||
|
@ -181,7 +181,7 @@ gnc_job_window_ok_cb (GtkWidget *widget, gpointer data)
|
||||
|
||||
/* Now save off the job so we can return it */
|
||||
jw->created_job = jw_get_job (jw);
|
||||
jw->job_guid = *xaccGUIDNULL ();
|
||||
jw->job_guid = *guid_null ();
|
||||
|
||||
gnc_close_gui_component (jw->component_id);
|
||||
}
|
||||
@ -213,7 +213,7 @@ gnc_job_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gncJobBeginEdit (job);
|
||||
gncJobDestroy (job);
|
||||
jw->job_guid = *xaccGUIDNULL ();
|
||||
jw->job_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_unregister_gui_component (jw->component_id);
|
||||
@ -527,7 +527,7 @@ GNCSearchWindow *
|
||||
gnc_job_search (GncJob *start, GncOwner *owner, QofBook *book)
|
||||
{
|
||||
QofQuery *q, *q2 = NULL;
|
||||
GNCIdType type = GNC_JOB_MODULE_NAME;
|
||||
QofIdType type = GNC_JOB_MODULE_NAME;
|
||||
struct _job_select_window *sw;
|
||||
static GList *params = NULL;
|
||||
static GList *columns = NULL;
|
||||
|
@ -213,7 +213,7 @@ gnc_order_window_ok_cb (GtkWidget *widget, gpointer data)
|
||||
return;
|
||||
|
||||
/* Ok, we don't need this anymore */
|
||||
ow->order_guid = *xaccGUIDNULL ();
|
||||
ow->order_guid = *guid_null ();
|
||||
|
||||
gnc_close_gui_component (ow->component_id);
|
||||
}
|
||||
@ -334,7 +334,7 @@ gnc_order_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gncOrderBeginEdit (order);
|
||||
gncOrderDestroy (order);
|
||||
ow->order_guid = *xaccGUIDNULL ();
|
||||
ow->order_guid = *guid_null ();
|
||||
}
|
||||
|
||||
if (ow->ledger)
|
||||
@ -821,7 +821,7 @@ free_order_cb (gpointer user_data)
|
||||
GNCSearchWindow *
|
||||
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;
|
||||
QofQuery *q, *q2 = NULL;
|
||||
static GList *params = NULL;
|
||||
|
@ -239,7 +239,7 @@ gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data)
|
||||
gnc_ui_to_vendor (vw, vendor);
|
||||
}
|
||||
vw->created_vendor = vendor;
|
||||
vw->vendor_guid = *xaccGUIDNULL ();
|
||||
vw->vendor_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_close_gui_component (vw->component_id);
|
||||
@ -271,7 +271,7 @@ gnc_vendor_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gncVendorBeginEdit (vendor);
|
||||
gncVendorDestroy (vendor);
|
||||
vw->vendor_guid = *xaccGUIDNULL ();
|
||||
vw->vendor_guid = *guid_null ();
|
||||
}
|
||||
|
||||
gnc_unregister_gui_component (vw->component_id);
|
||||
@ -652,7 +652,7 @@ free_vendor_cb (gpointer user_data)
|
||||
GNCSearchWindow *
|
||||
gnc_vendor_search (GncVendor *start, QofBook *book)
|
||||
{
|
||||
GNCIdType type = GNC_VENDOR_MODULE_NAME;
|
||||
QofIdType type = GNC_VENDOR_MODULE_NAME;
|
||||
struct _vendor_select_window *sw;
|
||||
QofQuery *q, *q2 = NULL;
|
||||
static GList *params = NULL;
|
||||
|
@ -261,10 +261,10 @@ make_how_menu (GNCSearchCoreType *fe)
|
||||
GtkComboBox *combo;
|
||||
|
||||
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 not"), GUID_MATCH_NONE);
|
||||
gnc_combo_box_search_add(combo, _("is"), QOF_GUID_MATCH_ANY);
|
||||
gnc_combo_box_search_add(combo, _("is not"), QOF_GUID_MATCH_NONE);
|
||||
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);
|
||||
}
|
||||
@ -317,7 +317,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
guid = gncOwnerGetGUID (&(priv->owner));
|
||||
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)
|
||||
|
@ -37,7 +37,7 @@ struct _GNCSearchOwner
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
guid_match_t how;
|
||||
QofGuidMatch how;
|
||||
};
|
||||
|
||||
struct _GNCSearchOwnerClass
|
||||
|
@ -62,7 +62,7 @@ gnc_entry_ledger_clear_blank_entry (GncEntryLedger *ledger)
|
||||
gncEntryDestroy (entry);
|
||||
}
|
||||
|
||||
ledger->blank_entry_guid = *xaccGUIDNULL ();
|
||||
ledger->blank_entry_guid = *guid_null ();
|
||||
ledger->blank_entry_edited = FALSE;
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ GncEntryLedger * gnc_entry_ledger_new (QofBook *book, GncEntryLedgerType type)
|
||||
break;
|
||||
}
|
||||
|
||||
ledger->blank_entry_guid = *xaccGUIDNULL();
|
||||
ledger->blank_entry_guid = *guid_null();
|
||||
ledger->blank_entry_edited = FALSE;
|
||||
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ gnc_entry_ledger_save (GncEntryLedger *ledger, gboolean do_commit)
|
||||
if (ledger->blank_entry_edited)
|
||||
{
|
||||
ledger->last_date_entered = gncEntryGetDate (entry);
|
||||
ledger->blank_entry_guid = *xaccGUIDNULL ();
|
||||
ledger->blank_entry_guid = *guid_null ();
|
||||
ledger->blank_entry_edited = FALSE;
|
||||
blank_entry = NULL;
|
||||
}
|
||||
@ -117,7 +117,7 @@ gnc_entry_ledger_save (GncEntryLedger *ledger, gboolean do_commit)
|
||||
{
|
||||
if (do_commit)
|
||||
{
|
||||
ledger->blank_entry_guid = *xaccGUIDNULL ();
|
||||
ledger->blank_entry_guid = *guid_null ();
|
||||
blank_entry = NULL;
|
||||
ledger->last_date_entered = gncEntryGetDate (entry);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ static void
|
||||
gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries)
|
||||
{
|
||||
GList *node;
|
||||
GNCIdType type = NULL;
|
||||
QofIdType type = NULL;
|
||||
|
||||
gnc_gui_component_clear_watches (ledger->component_id);
|
||||
|
||||
|
@ -419,7 +419,7 @@ void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
|
||||
|
||||
break;
|
||||
default:
|
||||
ledger->blank_entry_guid = *xaccGUIDNULL ();
|
||||
ledger->blank_entry_guid = *guid_null ();
|
||||
break;
|
||||
}
|
||||
ledger->blank_entry_edited = FALSE;
|
||||
|
@ -509,15 +509,9 @@ void xaccAccountSetAutoInterestXfer (Account *account, gboolean value);
|
||||
/** Set the account's commodity */
|
||||
void xaccAccountSetCommodity (Account *account, gnc_commodity *comm);
|
||||
|
||||
/** @deprecated do not use */
|
||||
#define DxaccAccountSetSecurity xaccAccountSetCommodity
|
||||
|
||||
/** Get the account's commodity */
|
||||
/*@ 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
|
||||
* set for the account, that is returned; else the default SCU for
|
||||
* the account commodity is returned.
|
||||
@ -534,9 +528,6 @@ int xaccAccountGetCommoditySCUi (const Account *account);
|
||||
*/
|
||||
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. */
|
||||
void xaccAccountSetNonStdSCU (Account *account, gboolean flag);
|
||||
|
||||
|
@ -7,23 +7,3 @@
|
||||
#define xaccGUIDNew(guid,book) \
|
||||
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
|
||||
|
||||
|
@ -2,67 +2,3 @@
|
||||
#include "qof.h"
|
||||
|
||||
#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
|
||||
|
@ -3,10 +3,5 @@
|
||||
|
||||
#define query_object_def _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
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ xaccAccountScrubCommodity (Account *account)
|
||||
|
||||
/* Use the 'obsolete' routines to try to figure out what the
|
||||
* account commodity should have been. */
|
||||
commodity = DxaccAccountGetSecurity (account);
|
||||
commodity = xaccAccountGetCommodity (account);
|
||||
if (commodity)
|
||||
{
|
||||
xaccAccountSetCommodity (account, commodity);
|
||||
|
@ -455,7 +455,6 @@ void xaccTransSetDatePostedGDate (Transaction *trans, GDate date);
|
||||
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
|
||||
bank. */
|
||||
#define xaccTransSetDateSecs xaccTransSetDatePostedSecs
|
||||
void xaccTransSetDatePostedSecs (Transaction *trans, time_t time);
|
||||
|
||||
/** The xaccTransSetDatePostedTS() method does the same thing as
|
||||
|
@ -1,8 +1,6 @@
|
||||
|
||||
#include "qof.h"
|
||||
|
||||
#define gnc_session_get_url qof_session_get_url
|
||||
|
||||
QofSession * gnc_get_current_session (void);
|
||||
void gnc_clear_current_session(void);
|
||||
void gnc_set_current_session (QofSession *session);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#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.
|
||||
* 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)
|
||||
{
|
||||
GncCustomer *customer = NULL;
|
||||
GNCIdType type = GNC_CUSTOMER_MODULE_NAME;
|
||||
QofIdType type = GNC_CUSTOMER_MODULE_NAME;
|
||||
customer = (GncCustomer*)search(book, id, customer, type);
|
||||
return customer;
|
||||
}
|
||||
@ -44,7 +44,7 @@ GncInvoice *
|
||||
gnc_search_invoice_on_id (QofBook * book, const gchar *id)
|
||||
{
|
||||
GncInvoice *invoice = NULL;
|
||||
GNCIdType type = GNC_INVOICE_MODULE_NAME;
|
||||
QofIdType type = GNC_INVOICE_MODULE_NAME;
|
||||
invoice = (GncInvoice*)search(book, id, invoice, type);
|
||||
return invoice;
|
||||
}
|
||||
@ -54,7 +54,7 @@ GncInvoice *
|
||||
gnc_search_bill_on_id (QofBook * book, const gchar *id)
|
||||
{
|
||||
GncInvoice *bill = NULL;
|
||||
GNCIdType type = GNC_INVOICE_MODULE_NAME;
|
||||
QofIdType type = GNC_INVOICE_MODULE_NAME;
|
||||
bill = (GncInvoice*)search(book, id, bill, type);
|
||||
return bill;
|
||||
}
|
||||
@ -63,7 +63,7 @@ GncVendor *
|
||||
gnc_search_vendor_on_id (QofBook * book, const gchar *id)
|
||||
{
|
||||
GncVendor *vendor = NULL;
|
||||
GNCIdType type = GNC_VENDOR_MODULE_NAME;
|
||||
QofIdType type = GNC_VENDOR_MODULE_NAME;
|
||||
vendor = (GncVendor*)search(book, id, vendor, type);
|
||||
return vendor;
|
||||
}
|
||||
@ -73,7 +73,7 @@ gnc_search_vendor_on_id (QofBook * book, const gchar *id)
|
||||
* Generic search called after setting up stuff
|
||||
* 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;
|
||||
GList *result;
|
||||
@ -88,7 +88,7 @@ static void * search(QofBook * book, const gchar *id, void * object, GNCIdType t
|
||||
q = qof_query_create_for (type);
|
||||
qof_query_set_book (q, book);
|
||||
// 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))
|
||||
{
|
||||
|
@ -1,21 +1 @@
|
||||
#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
|
||||
|
@ -2134,7 +2134,7 @@ make_trans_query (Transaction *trans, TestQueryTypes query_types)
|
||||
GList * list;
|
||||
GList * node;
|
||||
|
||||
/* GUID_MATCH_ALL */
|
||||
/* QOF_GUID_MATCH_ALL */
|
||||
list = NULL;
|
||||
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);
|
||||
g_list_free (list);
|
||||
|
||||
/* GUID_MATCH_NONE */
|
||||
/* QOF_GUID_MATCH_NONE */
|
||||
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 ());
|
||||
xaccQueryAddAccountGUIDMatch (q, list, QOF_GUID_MATCH_NONE, QOF_QUERY_AND);
|
||||
|
||||
/* GUID_MATCH_ANY */
|
||||
/* QOF_GUID_MATCH_ANY */
|
||||
{
|
||||
GncGUID * guid = get_random_guid ();
|
||||
*guid = *xaccAccountGetGUID (a);
|
||||
|
@ -105,7 +105,7 @@ struct _GNCSearchWindow
|
||||
|
||||
/* What we're searching for, and how */
|
||||
const gchar * type_label;
|
||||
GNCIdTypeConst search_for;
|
||||
QofIdTypeConst search_for;
|
||||
GNCSearchType grouping; /* Match Any, Match All */
|
||||
const QofParam * get_guid; /* Function to GetGUID from the object */
|
||||
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)
|
||||
type_label = sw->type_label;
|
||||
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);
|
||||
|
||||
/* 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
|
||||
* 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);
|
||||
|
||||
/* Deal with the cancel button */
|
||||
@ -1023,7 +1023,7 @@ gnc_search_dialog_raise (GNCSearchWindow *sw)
|
||||
}
|
||||
|
||||
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 *display_list,
|
||||
QofQuery *start_query, QofQuery *show_start_query,
|
||||
@ -1131,7 +1131,7 @@ void gnc_search_dialog_set_select_cb (GNCSearchWindow *sw,
|
||||
/* TEST CODE BELOW HERE */
|
||||
|
||||
static GList *
|
||||
get_params_list (GNCIdTypeConst type)
|
||||
get_params_list (QofIdTypeConst type)
|
||||
{
|
||||
GList *list = NULL;
|
||||
|
||||
@ -1161,7 +1161,7 @@ get_params_list (GNCIdTypeConst type)
|
||||
}
|
||||
|
||||
static GList *
|
||||
get_display_list (GNCIdTypeConst type)
|
||||
get_display_list (QofIdTypeConst type)
|
||||
{
|
||||
GList *list = NULL;
|
||||
|
||||
|
@ -90,7 +90,7 @@ typedef struct
|
||||
* the dialog will use the obj_type instead.
|
||||
*/
|
||||
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 *display_list,
|
||||
QofQuery *start_query, QofQuery *show_start_query,
|
||||
|
@ -68,7 +68,7 @@ typedef struct _GNCGeneralSearchPrivate GNCGeneralSearchPrivate;
|
||||
struct _GNCGeneralSearchPrivate
|
||||
{
|
||||
GncGUID guid;
|
||||
GNCIdTypeConst type;
|
||||
QofIdTypeConst type;
|
||||
GNCSearchCB search_cb;
|
||||
gpointer user_data;
|
||||
GNCSearchWindow * sw;
|
||||
@ -191,7 +191,7 @@ reset_selection_text (GNCGeneralSearch *gsl)
|
||||
if (gsl->selected_item == NULL)
|
||||
text = "";
|
||||
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);
|
||||
}
|
||||
@ -380,7 +380,7 @@ static void
|
||||
create_children (GNCGeneralSearch *gsl,
|
||||
const char *label,
|
||||
gboolean text_editable,
|
||||
GNCIdTypeConst type,
|
||||
QofIdTypeConst type,
|
||||
QofBook *book)
|
||||
{
|
||||
GtkListStore * list_store;
|
||||
@ -459,7 +459,7 @@ create_children (GNCGeneralSearch *gsl,
|
||||
* an easy way to choose selections.
|
||||
*
|
||||
* @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 text_editable switch to enable or disable direct text entry
|
||||
* @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.
|
||||
*/
|
||||
GtkWidget *
|
||||
gnc_general_search_new (GNCIdTypeConst type,
|
||||
gnc_general_search_new (QofIdTypeConst type,
|
||||
const char *label,
|
||||
gboolean text_editable,
|
||||
GNCSearchCB search_cb,
|
||||
@ -544,7 +544,7 @@ gnc_general_search_set_selected (GNCGeneralSearch *gsl, gpointer selection)
|
||||
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||
}
|
||||
else
|
||||
priv->guid = *xaccGUIDNULL ();
|
||||
priv->guid = *guid_null ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ typedef struct
|
||||
} GNCGeneralSearchClass;
|
||||
|
||||
|
||||
GtkWidget *gnc_general_search_new (GNCIdTypeConst type,
|
||||
GtkWidget *gnc_general_search_new (QofIdTypeConst type,
|
||||
const char *label,
|
||||
gboolean text_editable,
|
||||
GNCSearchCB search_cb,
|
||||
|
@ -112,7 +112,7 @@ gnc_search_account_class_init (GNCSearchAccountClass *class)
|
||||
static void
|
||||
gnc_search_account_init (GNCSearchAccount *o)
|
||||
{
|
||||
o->how = GUID_MATCH_ANY;
|
||||
o->how = QOF_GUID_MATCH_ANY;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -154,7 +154,7 @@ gnc_search_account_matchall_new (void)
|
||||
o = g_object_new(GNC_TYPE_SEARCH_ACCOUNT, NULL);
|
||||
priv = _PRIVATE(o);
|
||||
priv->match_all = TRUE;
|
||||
o->how = GUID_MATCH_ALL;
|
||||
o->how = QOF_GUID_MATCH_ALL;
|
||||
return o;
|
||||
}
|
||||
|
||||
@ -193,14 +193,14 @@ make_menu (GNCSearchCoreType *fe)
|
||||
priv = _PRIVATE(fi);
|
||||
if (priv->match_all)
|
||||
{
|
||||
gnc_combo_box_search_add(combo, _("matches all accounts"), GUID_MATCH_ALL);
|
||||
initial = GUID_MATCH_ALL;
|
||||
gnc_combo_box_search_add(combo, _("matches all accounts"), QOF_GUID_MATCH_ALL);
|
||||
initial = QOF_GUID_MATCH_ALL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gnc_combo_box_search_add(combo, _("matches any account"), GUID_MATCH_ANY);
|
||||
gnc_combo_box_search_add(combo, _("matches no accounts"), GUID_MATCH_NONE);
|
||||
initial = 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"), QOF_GUID_MATCH_NONE);
|
||||
initial = QOF_GUID_MATCH_ANY;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
return gncQueryGUIDPredicate (fi->how, l);
|
||||
return qof_query_guid_predicate (fi->how, l);
|
||||
}
|
||||
|
||||
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)
|
||||
|
@ -37,7 +37,7 @@ struct _GNCSearchAccount
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
guid_match_t how;
|
||||
QofGuidMatch how;
|
||||
};
|
||||
|
||||
struct _GNCSearchAccountClass
|
||||
|
@ -107,7 +107,7 @@ gnc_search_boolean_class_init (GNCSearchBooleanClass *class)
|
||||
static void
|
||||
gnc_search_boolean_init (GNCSearchBoolean *o)
|
||||
{
|
||||
o->how = COMPARE_EQUAL;
|
||||
o->how = QOF_COMPARE_EQUAL;
|
||||
o->value = TRUE;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ gnc_search_boolean_set_value (GNCSearchBoolean *fi, gboolean value)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_BOOLEAN (fi));
|
||||
@ -178,10 +178,10 @@ make_menu (GNCSearchCoreType *fe)
|
||||
GtkComboBox *combo;
|
||||
|
||||
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 not"), COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is"), QOF_COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("is not"), QOF_COMPARE_NEQ);
|
||||
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);
|
||||
}
|
||||
@ -218,7 +218,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
g_return_val_if_fail (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)
|
||||
|
@ -37,7 +37,7 @@ struct _GNCSearchBoolean
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
query_compare_t how;
|
||||
QofQueryCompare how;
|
||||
gboolean value;
|
||||
};
|
||||
|
||||
@ -55,7 +55,7 @@ GNCSearchBoolean *gnc_search_boolean_new (void);
|
||||
|
||||
/* methods */
|
||||
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 */
|
||||
|
||||
|
@ -260,20 +260,20 @@ gnc_search_core_register_type (const char *type_name, GNCSearchCoreNew fcn)
|
||||
static void
|
||||
init_table (void)
|
||||
{
|
||||
gnc_search_core_register_type (QUERYCORE_STRING,
|
||||
gnc_search_core_register_type (QOF_TYPE_STRING,
|
||||
(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);
|
||||
gnc_search_core_register_type (QUERYCORE_INT64,
|
||||
gnc_search_core_register_type (QOF_TYPE_INT64,
|
||||
(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);
|
||||
gnc_search_core_register_type (QUERYCORE_NUMERIC,
|
||||
gnc_search_core_register_type (QOF_TYPE_NUMERIC,
|
||||
(GNCSearchCoreNew) gnc_search_numeric_new);
|
||||
gnc_search_core_register_type (QUERYCORE_DEBCRED,
|
||||
gnc_search_core_register_type (QOF_TYPE_DEBCRED,
|
||||
(GNCSearchCoreNew)
|
||||
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);
|
||||
gnc_search_core_register_type (GNC_ID_ACCOUNT,
|
||||
(GNCSearchCoreNew) gnc_search_account_new);
|
||||
|
@ -114,7 +114,7 @@ static void
|
||||
gnc_search_date_init (GNCSearchDate *o)
|
||||
{
|
||||
o->ts.tv_sec = time(NULL);
|
||||
o->how = COMPARE_LT;
|
||||
o->how = QOF_COMPARE_LT;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -157,7 +157,7 @@ gnc_search_date_set_date (GNCSearchDate *fi, Timespec ts)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_DATE (fi));
|
||||
@ -192,14 +192,14 @@ make_menu (GNCSearchCoreType *fe)
|
||||
|
||||
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 or on"), COMPARE_LTE);
|
||||
gnc_combo_box_search_add(combo, _("is on"), COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("is not on"), COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is after"), COMPARE_GT);
|
||||
gnc_combo_box_search_add(combo, _("is on or after"), COMPARE_GTE);
|
||||
gnc_combo_box_search_add(combo, _("is before"), QOF_COMPARE_LT);
|
||||
gnc_combo_box_search_add(combo, _("is before or on"), QOF_COMPARE_LTE);
|
||||
gnc_combo_box_search_add(combo, _("is on"), QOF_COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("is not on"), QOF_COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is after"), QOF_COMPARE_GT);
|
||||
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_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);
|
||||
}
|
||||
@ -273,7 +273,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
if (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)
|
||||
|
@ -38,7 +38,7 @@ struct _GNCSearchDate
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
query_compare_t how;
|
||||
QofQueryCompare how;
|
||||
Timespec ts;
|
||||
};
|
||||
|
||||
@ -56,7 +56,7 @@ GNCSearchDate *gnc_search_date_new (void);
|
||||
|
||||
/* methods */
|
||||
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 */
|
||||
|
||||
|
@ -113,7 +113,7 @@ gnc_search_double_class_init (GNCSearchDoubleClass *class)
|
||||
static void
|
||||
gnc_search_double_init (GNCSearchDouble *o)
|
||||
{
|
||||
o->how = COMPARE_EQUAL;
|
||||
o->how = QOF_COMPARE_EQUAL;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -149,7 +149,7 @@ gnc_search_double_set_value (GNCSearchDouble *fi, double value)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_DOUBLE (fi));
|
||||
@ -184,14 +184,14 @@ make_menu (GNCSearchCoreType *fe)
|
||||
|
||||
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 or equal to"), COMPARE_LTE);
|
||||
gnc_combo_box_search_add(combo, _("equals"), COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("does not equal"), COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is greater than"), COMPARE_GT);
|
||||
gnc_combo_box_search_add(combo, _("is greater than or equal to"), COMPARE_GTE);
|
||||
gnc_combo_box_search_add(combo, _("is less than"), QOF_COMPARE_LT);
|
||||
gnc_combo_box_search_add(combo, _("is less than or equal to"), QOF_COMPARE_LTE);
|
||||
gnc_combo_box_search_add(combo, _("equals"), QOF_COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("does not equal"), QOF_COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is greater than"), QOF_COMPARE_GT);
|
||||
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_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);
|
||||
}
|
||||
@ -266,7 +266,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
priv = _PRIVATE(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)
|
||||
|
@ -37,7 +37,7 @@ struct _GNCSearchDouble
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
query_compare_t how;
|
||||
QofQueryCompare how;
|
||||
double value;
|
||||
};
|
||||
|
||||
@ -55,7 +55,7 @@ GNCSearchDouble *gnc_search_double_new (void);
|
||||
|
||||
/* methods */
|
||||
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 */
|
||||
|
||||
|
@ -114,7 +114,7 @@ gnc_search_int64_class_init (GNCSearchInt64Class *class)
|
||||
static void
|
||||
gnc_search_int64_init (GNCSearchInt64 *o)
|
||||
{
|
||||
o->how = COMPARE_EQUAL;
|
||||
o->how = QOF_COMPARE_EQUAL;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -150,7 +150,7 @@ gnc_search_int64_set_value (GNCSearchInt64 *fi, gint64 value)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_INT64 (fi));
|
||||
@ -186,14 +186,14 @@ make_menu (GNCSearchCoreType *fe)
|
||||
GtkComboBox *combo;
|
||||
|
||||
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 or equal to"), COMPARE_LTE);
|
||||
gnc_combo_box_search_add(combo, _("equals"), COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("does not equal"), COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is greater than"), COMPARE_GT);
|
||||
gnc_combo_box_search_add(combo, _("is greater than or equal to"), COMPARE_GTE);
|
||||
gnc_combo_box_search_add(combo, _("is less than"), QOF_COMPARE_LT);
|
||||
gnc_combo_box_search_add(combo, _("is less than or equal to"), QOF_COMPARE_LTE);
|
||||
gnc_combo_box_search_add(combo, _("equals"), QOF_COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("does not equal"), QOF_COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, _("is greater than"), QOF_COMPARE_GT);
|
||||
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_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);
|
||||
}
|
||||
@ -273,7 +273,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
priv = _PRIVATE(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)
|
||||
|
@ -37,7 +37,7 @@ struct _GNCSearchInt64
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
query_compare_t how;
|
||||
QofQueryCompare how;
|
||||
gint64 value;
|
||||
};
|
||||
|
||||
@ -55,7 +55,7 @@ GNCSearchInt64 *gnc_search_int64_new (void);
|
||||
|
||||
/* methods */
|
||||
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 */
|
||||
|
||||
|
@ -115,8 +115,8 @@ static void
|
||||
gnc_search_numeric_init (GNCSearchNumeric *o)
|
||||
{
|
||||
o->value = gnc_numeric_zero ();
|
||||
o->how = COMPARE_EQUAL;
|
||||
o->option = NUMERIC_MATCH_ANY;
|
||||
o->how = QOF_COMPARE_EQUAL;
|
||||
o->option = QOF_NUMERIC_MATCH_ANY;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -171,7 +171,7 @@ gnc_search_numeric_set_value (GNCSearchNumeric *fi, gnc_numeric value)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_NUMERIC (fi));
|
||||
@ -179,7 +179,7 @@ gnc_search_numeric_set_how (GNCSearchNumeric *fi, query_compare_t how)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_NUMERIC (fi));
|
||||
@ -218,27 +218,27 @@ make_how_menu (GNCSearchCoreType *fe)
|
||||
combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
|
||||
gnc_combo_box_search_add(combo, (priv->is_debcred ?
|
||||
_("less than") : _("is less than")),
|
||||
COMPARE_LT);
|
||||
QOF_COMPARE_LT);
|
||||
gnc_combo_box_search_add(combo, (priv->is_debcred ?
|
||||
_("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 ?
|
||||
_("equal to") : _("equals")),
|
||||
COMPARE_EQUAL);
|
||||
QOF_COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, (priv->is_debcred ?
|
||||
_("not equal to") : _("does not equal")),
|
||||
COMPARE_NEQ);
|
||||
QOF_COMPARE_NEQ);
|
||||
gnc_combo_box_search_add(combo, (priv->is_debcred ?
|
||||
_("greater than") : _("is greater than")),
|
||||
COMPARE_GT);
|
||||
QOF_COMPARE_GT);
|
||||
gnc_combo_box_search_add(combo, (priv->is_debcred ?
|
||||
_("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_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);
|
||||
}
|
||||
@ -250,11 +250,11 @@ make_option_menu (GNCSearchCoreType *fe)
|
||||
GtkComboBox *combo;
|
||||
|
||||
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 debits"), NUMERIC_MATCH_DEBIT);
|
||||
gnc_combo_box_search_add(combo, _("has credits"), NUMERIC_MATCH_CREDIT);
|
||||
gnc_combo_box_search_add(combo, _("has credits or debits"), QOF_NUMERIC_MATCH_ANY);
|
||||
gnc_combo_box_search_add(combo, _("has debits"), QOF_NUMERIC_MATCH_DEBIT);
|
||||
gnc_combo_box_search_add(combo, _("has credits"), QOF_NUMERIC_MATCH_CREDIT);
|
||||
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);
|
||||
}
|
||||
@ -334,7 +334,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
priv = _PRIVATE(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)
|
||||
|
@ -39,9 +39,9 @@ struct _GNCSearchNumeric
|
||||
GNCSearchCoreType parent;
|
||||
struct _GNCSearchNumericPrivate *priv;
|
||||
|
||||
query_compare_t how;
|
||||
QofQueryCompare how;
|
||||
gnc_numeric value;
|
||||
numeric_match_t option;
|
||||
QofNumericMatch option;
|
||||
};
|
||||
|
||||
struct _GNCSearchNumericClass
|
||||
@ -59,8 +59,8 @@ GNCSearchNumeric *gnc_search_numeric_debcred_new (void);
|
||||
|
||||
/* methods */
|
||||
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_option (GNCSearchNumeric *fi, numeric_match_t option);
|
||||
void gnc_search_numeric_set_how (GNCSearchNumeric *fi, QofQueryCompare how);
|
||||
void gnc_search_numeric_set_option (GNCSearchNumeric *fi, QofNumericMatch option);
|
||||
|
||||
#endif /* ! _GNCSEARCH_NUMERIC_H */
|
||||
|
||||
|
@ -108,7 +108,7 @@ gnc_search_reconciled_class_init (GNCSearchReconciledClass *class)
|
||||
static void
|
||||
gnc_search_reconciled_init (GNCSearchReconciled *o)
|
||||
{
|
||||
o->how = COMPARE_EQUAL;
|
||||
o->how = QOF_COMPARE_EQUAL;
|
||||
o->value = CLEARED_NO;
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ gnc_search_reconciled_set_value (GNCSearchReconciled *fi, cleared_match_t value)
|
||||
}
|
||||
|
||||
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 (IS_GNCSEARCH_RECONCILED (fi));
|
||||
@ -186,16 +186,16 @@ make_menu (GNCSearchCoreType *fe)
|
||||
GtkComboBox *combo;
|
||||
|
||||
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 not"), CHAR_MATCH_NONE);
|
||||
gnc_combo_box_search_add(combo, _("is"), QOF_CHAR_MATCH_ANY);
|
||||
gnc_combo_box_search_add(combo, _("is not"), QOF_CHAR_MATCH_NONE);
|
||||
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);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
make_toggle (GNCSearchReconciled *fi, char *label, char_match_t option)
|
||||
make_toggle (GNCSearchReconciled *fi, char *label, QofCharMatch option)
|
||||
{
|
||||
GtkWidget *toggle;
|
||||
|
||||
@ -269,7 +269,7 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
chars[i++] = VREC;
|
||||
chars[i] = '\0';
|
||||
|
||||
return gncQueryCharPredicate (fi->how, chars);
|
||||
return qof_query_char_predicate (fi->how, chars);
|
||||
}
|
||||
|
||||
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)
|
||||
|
@ -37,7 +37,7 @@ struct _GNCSearchReconciled
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
char_match_t how;
|
||||
QofCharMatch how;
|
||||
cleared_match_t value;
|
||||
};
|
||||
|
||||
@ -55,6 +55,6 @@ GNCSearchReconciled *gnc_search_reconciled_new (void);
|
||||
|
||||
/* methods */
|
||||
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 */
|
||||
|
@ -338,8 +338,8 @@ gncs_get_widget (GNCSearchCoreType *fe)
|
||||
static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
{
|
||||
GNCSearchString *ss = (GNCSearchString *)fe;
|
||||
query_compare_t how;
|
||||
string_match_t options = STRING_MATCH_NORMAL;
|
||||
QofQueryCompare how;
|
||||
QofStringMatch options = QOF_STRING_MATCH_NORMAL;
|
||||
gboolean is_regex = FALSE;
|
||||
|
||||
g_return_val_if_fail (ss, NULL);
|
||||
@ -351,13 +351,13 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
is_regex = TRUE;
|
||||
/* FALLTHROUGH */
|
||||
case SEARCH_STRING_CONTAINS:
|
||||
how = COMPARE_EQUAL;
|
||||
how = QOF_COMPARE_EQUAL;
|
||||
break;
|
||||
case SEARCH_STRING_NOT_MATCHES_REGEX:
|
||||
is_regex = TRUE;
|
||||
/* FALLTHROUGH */
|
||||
case SEARCH_STRING_NOT_CONTAINS:
|
||||
how = COMPARE_NEQ;
|
||||
how = QOF_COMPARE_NEQ;
|
||||
break;
|
||||
default:
|
||||
g_warning ("invalid string choice: %d", ss->how);
|
||||
@ -365,9 +365,9 @@ static QueryPredData_t gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -289,7 +289,7 @@ gnc_account_create_transfer_balance (QofBook *book,
|
||||
xaccTransBeginEdit (trans);
|
||||
|
||||
xaccTransSetCurrency (trans, xaccAccountGetCommodity (account));
|
||||
xaccTransSetDateSecs (trans, date);
|
||||
xaccTransSetDatePostedSecs (trans, date);
|
||||
xaccTransSetDescription (trans, _("Opening Balance"));
|
||||
|
||||
split = xaccMallocSplit (book);
|
||||
@ -573,7 +573,7 @@ gnc_finish_ok (AccountWindow *aw)
|
||||
aw->created_account = aw_get_account (aw);
|
||||
|
||||
/* so it doesn't get freed on close */
|
||||
aw->account = *xaccGUIDNULL ();
|
||||
aw->account = *guid_null ();
|
||||
|
||||
gnc_close_gui_component (aw->component_id);
|
||||
LEAVE("2");
|
||||
@ -978,7 +978,7 @@ gnc_account_window_destroy_cb (GtkObject *object, gpointer data)
|
||||
{
|
||||
xaccAccountBeginEdit (account);
|
||||
xaccAccountDestroy (account);
|
||||
aw->account = *xaccGUIDNULL ();
|
||||
aw->account = *guid_null ();
|
||||
}
|
||||
|
||||
DEBUG ("account add window destroyed\n");
|
||||
|
@ -58,7 +58,7 @@ dql_clear_booklist (DialogQueryList *dql)
|
||||
g_return_if_fail (dql);
|
||||
|
||||
for (node = dql->books; node; node = node->next)
|
||||
xaccGUIDFree ((GncGUID*)node->data);
|
||||
guid_free ((GncGUID*)node->data);
|
||||
g_list_free (dql->books);
|
||||
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)
|
||||
{
|
||||
QofBook *book = node->data;
|
||||
GncGUID *guid = xaccGUIDMalloc();
|
||||
GncGUID *guid = guid_malloc();
|
||||
*guid = *(qof_book_get_guid(book));
|
||||
dql->books = g_list_prepend(dql->books, guid);
|
||||
}
|
||||
|
@ -1371,7 +1371,7 @@ gnc_main_window_generate_title (GncMainWindow *window)
|
||||
}
|
||||
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();
|
||||
if (qof_instance_is_dirty(QOF_INSTANCE(book)))
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ update_booleans (GNCQueryList *list, gint row)
|
||||
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 (safe_strcmp (type, QUERYCORE_BOOLEAN))
|
||||
if (safe_strcmp (type, QOF_TYPE_BOOLEAN))
|
||||
continue;
|
||||
|
||||
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)
|
||||
{
|
||||
const char *type = gnc_search_param_get_param_type (param);
|
||||
if (!safe_strcmp(type, QUERYCORE_NUMERIC) ||
|
||||
!safe_strcmp(type, QUERYCORE_DEBCRED))
|
||||
if (!safe_strcmp(type, QOF_TYPE_NUMERIC) ||
|
||||
!safe_strcmp(type, QOF_TYPE_DEBCRED))
|
||||
sort_order = !sort_order;
|
||||
}
|
||||
|
||||
@ -811,7 +811,7 @@ gnc_query_list_fill(GNCQueryList *list)
|
||||
gpointer res = item->data;
|
||||
|
||||
/* 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("");
|
||||
continue;
|
||||
@ -828,8 +828,8 @@ gnc_query_list_fill(GNCQueryList *list)
|
||||
}
|
||||
|
||||
/* Now convert this to a text value for the row */
|
||||
if (!safe_strcmp(type, QUERYCORE_DEBCRED) ||
|
||||
!safe_strcmp(type, QUERYCORE_NUMERIC))
|
||||
if (!safe_strcmp(type, QOF_TYPE_DEBCRED) ||
|
||||
!safe_strcmp(type, QOF_TYPE_NUMERIC))
|
||||
{
|
||||
gnc_numeric (*nfcn)(gpointer, QofParam *) =
|
||||
(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)));
|
||||
}
|
||||
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);
|
||||
|
@ -45,7 +45,7 @@ struct _GNCSearchParamPrivate
|
||||
{
|
||||
GSList * converters;
|
||||
GSList * param_path;
|
||||
GNCIdTypeConst type;
|
||||
QofIdTypeConst type;
|
||||
|
||||
GNCSearchParamFcn lookup_fcn;
|
||||
gpointer lookup_arg;
|
||||
@ -163,11 +163,11 @@ gnc_search_param_clone (GNCSearchParam *param)
|
||||
|
||||
void
|
||||
gnc_search_param_set_param_path (GNCSearchParam *param,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst search_type,
|
||||
GSList *param_path)
|
||||
{
|
||||
GNCSearchParamPrivate *priv;
|
||||
GNCIdTypeConst type = NULL;
|
||||
QofIdTypeConst type = NULL;
|
||||
GSList *converters = NULL;
|
||||
|
||||
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 */
|
||||
for (; param_path; param_path = param_path->next)
|
||||
{
|
||||
GNCIdType param_name = param_path->data;
|
||||
QofIdType param_name = param_path->data;
|
||||
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 (objDef == NULL)
|
||||
@ -210,7 +210,7 @@ gnc_search_param_set_param_path (GNCSearchParam *param,
|
||||
|
||||
void
|
||||
gnc_search_param_override_param_type (GNCSearchParam *param,
|
||||
GNCIdTypeConst param_type)
|
||||
QofIdTypeConst param_type)
|
||||
{
|
||||
GNCSearchParamPrivate *priv;
|
||||
|
||||
@ -244,7 +244,7 @@ gnc_search_param_get_converters (GNCSearchParam *param)
|
||||
return priv->converters;
|
||||
}
|
||||
|
||||
GNCIdTypeConst
|
||||
QofIdTypeConst
|
||||
gnc_search_param_get_param_type (GNCSearchParam *param)
|
||||
{
|
||||
GNCSearchParamPrivate *priv;
|
||||
@ -307,8 +307,8 @@ gnc_search_param_type_match (GNCSearchParam *a, GNCSearchParam *b)
|
||||
static GList *
|
||||
gnc_search_param_prepend_internal (GList *list, char const *title,
|
||||
GtkJustification justify,
|
||||
GNCIdTypeConst type_override,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst type_override,
|
||||
QofIdTypeConst search_type,
|
||||
const char *param, va_list args)
|
||||
{
|
||||
GNCSearchParam *p;
|
||||
@ -341,8 +341,8 @@ gnc_search_param_prepend_internal (GList *list, char const *title,
|
||||
GList *
|
||||
gnc_search_param_prepend_with_justify (GList *list, char const *title,
|
||||
GtkJustification justify,
|
||||
GNCIdTypeConst type_override,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst type_override,
|
||||
QofIdTypeConst search_type,
|
||||
const char *param, ...)
|
||||
{
|
||||
GList *result;
|
||||
@ -363,8 +363,8 @@ gnc_search_param_prepend_with_justify (GList *list, char const *title,
|
||||
|
||||
GList *
|
||||
gnc_search_param_prepend (GList *list, char const *title,
|
||||
GNCIdTypeConst type_override,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst type_override,
|
||||
QofIdTypeConst search_type,
|
||||
const char *param, ...)
|
||||
{
|
||||
GList *result;
|
||||
@ -385,7 +385,7 @@ gnc_search_param_prepend (GList *list, char const *title,
|
||||
|
||||
void
|
||||
gnc_search_param_set_param_fcn (GNCSearchParam *param,
|
||||
GNCIdTypeConst param_type,
|
||||
QofIdTypeConst param_type,
|
||||
GNCSearchParamFcn fcn,
|
||||
gpointer arg)
|
||||
{
|
||||
|
@ -63,12 +63,12 @@ GNCSearchParam * gnc_search_param_clone (GNCSearchParam *param);
|
||||
* compute the parameter type and the converter functions.
|
||||
*/
|
||||
void gnc_search_param_set_param_path (GNCSearchParam *param,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst search_type,
|
||||
GSList *param_path);
|
||||
|
||||
/* List is property of the caller */
|
||||
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,
|
||||
const char *title);
|
||||
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,
|
||||
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 */
|
||||
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.
|
||||
*/
|
||||
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 */
|
||||
GList * gnc_search_param_prepend (GList *list, char const *title,
|
||||
GNCIdTypeConst type_override,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst type_override,
|
||||
QofIdTypeConst search_type,
|
||||
const char *param, ...);
|
||||
|
||||
|
||||
GList * gnc_search_param_prepend_with_justify (GList *list, char const *title,
|
||||
GtkJustification justify,
|
||||
GNCIdTypeConst type_override,
|
||||
GNCIdTypeConst search_type,
|
||||
QofIdTypeConst type_override,
|
||||
QofIdTypeConst search_type,
|
||||
const char *param, ...);
|
||||
|
||||
/* 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);
|
||||
void gnc_search_param_set_param_fcn (GNCSearchParam *param,
|
||||
GNCIdTypeConst param_type,
|
||||
QofIdTypeConst param_type,
|
||||
GNCSearchParamFcn fcn,
|
||||
gpointer arg);
|
||||
|
||||
|
@ -92,7 +92,7 @@ free_ftd_cb (gpointer user_data)
|
||||
GNCSearchWindow *
|
||||
gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg)
|
||||
{
|
||||
GNCIdType type = GNC_ID_SPLIT;
|
||||
QofIdType type = GNC_ID_SPLIT;
|
||||
struct _ftd_data *ftd;
|
||||
static GList *params = 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() );
|
||||
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);
|
||||
al = NULL;
|
||||
tRoot = NULL;
|
||||
|
@ -1426,7 +1426,7 @@ create_balancing_transaction(QofBook *book, Account *account,
|
||||
|
||||
// fill Transaction
|
||||
xaccTransSetCurrency(trans, xaccAccountGetCommodity(account));
|
||||
xaccTransSetDateSecs(trans, statement_date);
|
||||
xaccTransSetDatePostedSecs(trans, statement_date);
|
||||
xaccTransSetDescription(trans, _("Balancing entry from reconcilation"));
|
||||
|
||||
// 1. Split
|
||||
|
@ -151,19 +151,19 @@ gnc_reconcile_list_new(Account *account, GNCReconcileListType type,
|
||||
/* match the 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);
|
||||
|
||||
/* limit the matches to CREDITs and DEBITs only, depending on the type */
|
||||
if (type == RECLIST_CREDIT)
|
||||
xaccQueryAddValueMatch(query, gnc_numeric_zero (),
|
||||
NUMERIC_MATCH_CREDIT,
|
||||
COMPARE_GTE, QOF_QUERY_AND);
|
||||
QOF_NUMERIC_MATCH_CREDIT,
|
||||
QOF_COMPARE_GTE, QOF_QUERY_AND);
|
||||
else
|
||||
xaccQueryAddValueMatch(query, gnc_numeric_zero (),
|
||||
NUMERIC_MATCH_DEBIT,
|
||||
COMPARE_GTE, QOF_QUERY_AND);
|
||||
QOF_NUMERIC_MATCH_DEBIT,
|
||||
QOF_COMPARE_GTE, QOF_QUERY_AND);
|
||||
|
||||
/* limit the matches only to Cleared and Non-reconciled splits */
|
||||
xaccQueryAddClearedMatch(query, CLEARED_NO | CLEARED_CLEARED, QOF_QUERY_AND);
|
||||
@ -209,7 +209,7 @@ gnc_reconcile_list_init (GNCReconcileList *list)
|
||||
list->sibling = NULL;
|
||||
|
||||
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_search_param_set_title (param, _("Reconciled:R") + 11);
|
||||
gnc_search_param_set_justify (param, GTK_JUSTIFY_CENTER);
|
||||
|
@ -469,7 +469,7 @@ gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc)
|
||||
valuta_date = normal_date;
|
||||
}
|
||||
if (valuta_date)
|
||||
xaccTransSetDateSecs(gnc_trans, GWEN_Time_toTime_t(valuta_date));
|
||||
xaccTransSetDatePostedSecs(gnc_trans, GWEN_Time_toTime_t(valuta_date));
|
||||
else
|
||||
g_warning("transaction_cb: Oops, date 'valuta_date' was NULL");
|
||||
|
||||
|
@ -282,7 +282,7 @@ AB_TRANSACTION *gnc_hbci_trans_list_cb(AB_TRANSACTION *h_trans, void *user_data)
|
||||
|
||||
/* Date / Time */
|
||||
if (valutaDate)
|
||||
xaccTransSetDateSecs
|
||||
xaccTransSetDatePostedSecs
|
||||
(gnc_trans, GWEN_Time_toTime_t (valutaDate));
|
||||
else
|
||||
g_warning("trans_list_cb: Oops, date 'valutaDate' was NULL.\n");
|
||||
|
@ -143,11 +143,11 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_u
|
||||
|
||||
if (data.date_initiated_valid == true)
|
||||
{
|
||||
xaccTransSetDateSecs(transaction, data.date_initiated);
|
||||
xaccTransSetDatePostedSecs(transaction, data.date_initiated);
|
||||
}
|
||||
else if (data.date_posted_valid == true)
|
||||
{
|
||||
xaccTransSetDateSecs(transaction, data.date_posted);
|
||||
xaccTransSetDatePostedSecs(transaction, data.date_posted);
|
||||
}
|
||||
|
||||
if (data.date_posted_valid == true)
|
||||
|
@ -429,7 +429,7 @@ gnc_ledger_display_gl (void)
|
||||
|
||||
tRoot = gnc_book_get_template_root( gnc_get_current_book() );
|
||||
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);
|
||||
al = NULL;
|
||||
tRoot = NULL;
|
||||
@ -665,7 +665,7 @@ gnc_ledger_display_make_query (GNCLedgerDisplay *ld,
|
||||
accounts = g_list_prepend (accounts, leader);
|
||||
|
||||
xaccQueryAddAccountMatch (ld->query, accounts,
|
||||
GUID_MATCH_ANY, QOF_QUERY_AND);
|
||||
QOF_GUID_MATCH_ANY, QOF_QUERY_AND);
|
||||
|
||||
g_list_free (accounts);
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ gnc_split_register_load (SplitRegister *reg, GList * slist,
|
||||
xaccTransBeginEdit (new_trans);
|
||||
xaccTransSetCurrency (new_trans,
|
||||
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 ());
|
||||
xaccSplitSetParent(blank_split, new_trans);
|
||||
/* We don't want to commit this transaction yet, because the split
|
||||
|
@ -545,7 +545,7 @@ gnc_split_register_duplicate_current (SplitRegister *reg)
|
||||
|
||||
xaccTransBeginEdit (new_trans);
|
||||
gnc_copy_trans_onto_trans (trans, new_trans, FALSE, FALSE);
|
||||
xaccTransSetDateSecs (new_trans, date);
|
||||
xaccTransSetDatePostedSecs (new_trans, date);
|
||||
xaccTransSetNum (new_trans, out_num);
|
||||
xaccTransCommitEdit (new_trans);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user