[Gnucash-changes] r13547 - gnucash/trunk - Remove more functions to
be deprecated in libqof2. (Pass Two - more
David Hampton
hampton at cvs.gnucash.org
Wed Mar 8 22:48:52 EST 2006
Author: hampton
Date: 2006-03-08 22:48:49 -0500 (Wed, 08 Mar 2006)
New Revision: 13547
Trac: http://svn.gnucash.org/trac/changeset/13547
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/lib/libqof/qof/qoflog.h
gnucash/trunk/src/app-utils/gnc-component-manager.c
gnucash/trunk/src/app-utils/gnc-component-manager.h
gnucash/trunk/src/backend/postgres/events.c
gnucash/trunk/src/business/business-core/gncAddress.c
gnucash/trunk/src/business/business-core/gncBillTerm.c
gnucash/trunk/src/business/business-core/gncCustomer.c
gnucash/trunk/src/business/business-core/gncEmployee.c
gnucash/trunk/src/business/business-core/gncEntry.c
gnucash/trunk/src/business/business-core/gncInvoice.c
gnucash/trunk/src/business/business-core/gncJob.c
gnucash/trunk/src/business/business-core/gncOrder.c
gnucash/trunk/src/business/business-core/gncTaxTable.c
gnucash/trunk/src/business/business-core/gncVendor.c
gnucash/trunk/src/business/business-gnome/business-gnome-utils.c
gnucash/trunk/src/business/business-gnome/dialog-billterms.c
gnucash/trunk/src/business/business-gnome/dialog-customer.c
gnucash/trunk/src/business/business-gnome/dialog-employee.c
gnucash/trunk/src/business/business-gnome/dialog-invoice.c
gnucash/trunk/src/business/business-gnome/dialog-job.c
gnucash/trunk/src/business/business-gnome/dialog-order.c
gnucash/trunk/src/business/business-gnome/dialog-payment.c
gnucash/trunk/src/business/business-gnome/dialog-vendor.c
gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c
gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c
gnucash/trunk/src/engine/Account.c
gnucash/trunk/src/engine/FreqSpec.c
gnucash/trunk/src/engine/Group.c
gnucash/trunk/src/engine/Period.c
gnucash/trunk/src/engine/SchedXaction.c
gnucash/trunk/src/engine/Split.c
gnucash/trunk/src/engine/Transaction.c
gnucash/trunk/src/engine/gnc-budget.c
gnucash/trunk/src/engine/gnc-commodity.c
gnucash/trunk/src/engine/gnc-lot.c
gnucash/trunk/src/engine/gnc-pricedb.c
gnucash/trunk/src/engine/gw-engine-spec.scm
gnucash/trunk/src/engine/test/test-book-merge.c
gnucash/trunk/src/engine/test/test-recursive.c
gnucash/trunk/src/gnome-search/dialog-search.c
gnucash/trunk/src/gnome-search/gnc-general-search.c
gnucash/trunk/src/gnome-utils/account-quickfill.c
gnucash/trunk/src/gnome-utils/dialog-account.c
gnucash/trunk/src/gnome-utils/dialog-query-list.c
gnucash/trunk/src/gnome-utils/gnc-account-sel.c
gnucash/trunk/src/gnome-utils/gnc-main-window.c
gnucash/trunk/src/gnome-utils/gnc-query-list.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
gnucash/trunk/src/gnome-utils/window-main-summarybar.c
gnucash/trunk/src/gnome/dialog-tax-info.c
gnucash/trunk/src/gnome/druid-hierarchy.c
gnucash/trunk/src/gnome/druid-stock-split.c
gnucash/trunk/src/gnome/gnc-plugin-page-budget.c
gnucash/trunk/src/gnome/gnc-plugin-page-register.c
gnucash/trunk/src/gnome/lot-viewer.c
gnucash/trunk/src/gnome/window-reconcile.c
gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
Log:
Remove more functions to be deprecated in libqof2. (Pass Two - more
trivial substitutions, some simple translations.)
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/ChangeLog 2006-03-09 03:48:49 UTC (rev 13547)
@@ -1,7 +1,11 @@
2006-03-08 David Hampton <hampton at employees.org>
+ * numerous: Remove more functions to be deprecated in
+ libqof2. (Pass Two - more trivial substitutions, some simple
+ translations.)
+
* numerous: Remove functions to be deprecated in libqof2. (Pass
- One - trivial substitutions)
+ One - trivial substitutions.)
* src/gnome-utils/gnc-tree-model-account.c:
* src/engine/Account.c:
Modified: gnucash/trunk/lib/libqof/qof/qoflog.h
===================================================================
--- gnucash/trunk/lib/libqof/qof/qoflog.h 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/lib/libqof/qof/qoflog.h 2006-03-09 03:48:49 UTC (rev 13547)
@@ -179,7 +179,7 @@
/** Log a serious error */
#define PERR(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_ERROR)) { \
+ if (qof_log_check (log_module, QOF_LOG_ERROR)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
"Error: %s(): " format, FUNK , ## args); \
} \
@@ -187,7 +187,7 @@
/** Log a warning */
#define PWARN(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_WARNING)) { \
+ if (qof_log_check (log_module, QOF_LOG_WARNING)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \
"Warning: %s(): " format, FUNK , ## args); \
} \
@@ -195,7 +195,7 @@
/** Print an informational note */
#define PINFO(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_INFO)) { \
+ if (qof_log_check (log_module, QOF_LOG_INFO)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \
"Info: %s(): " format, \
FUNK , ## args); \
@@ -204,7 +204,7 @@
/** Print a debugging message */
#define DEBUG(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_DEBUG)) { \
+ if (qof_log_check (log_module, QOF_LOG_DEBUG)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Debug: %s(): " format, \
FUNK , ## args); \
@@ -213,7 +213,7 @@
/** Print a function entry debugging message */
#define ENTER(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_DEBUG)) { \
+ if (qof_log_check (log_module, QOF_LOG_DEBUG)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Enter in %s: %s()" format, __FILE__, \
FUNK , ## args); \
@@ -223,7 +223,7 @@
/** Print a function exit debugging message */
#define LEAVE(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_DEBUG)) { \
+ if (qof_log_check (log_module, QOF_LOG_DEBUG)) { \
qof_log_drop_indent(); \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Leave: %s()" format, \
@@ -233,14 +233,14 @@
/** Print a function trace debugging message */
#define TRACE(format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_TRACE)) { \
+ if (qof_log_check (log_module, QOF_LOG_TRACE)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Trace: %s(): " format, FUNK , ## args); \
} \
} while (0)
#define DEBUGCMD(x) do { \
- if (qof_log_check (log_module, GNC_LOG_DEBUG)) { \
+ if (qof_log_check (log_module, QOF_LOG_DEBUG)) { \
(x); \
} \
} while (0)
@@ -267,22 +267,22 @@
/** start a particular timer */
#define START_CLOCK(clockno,format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_INFO)) \
- qof_start_clock (clockno, log_module, GNC_LOG_INFO, \
+ if (qof_log_check (log_module, QOF_LOG_INFO)) \
+ qof_start_clock (clockno, log_module, QOF_LOG_INFO, \
__FUNCTION__, format , ## args); \
} while (0)
/** report elapsed time since last report on a particular timer */
#define REPORT_CLOCK(clockno,format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_INFO)) \
- qof_report_clock (clockno, log_module, GNC_LOG_INFO, \
+ if (qof_log_check (log_module, QOF_LOG_INFO)) \
+ qof_report_clock (clockno, log_module, QOF_LOG_INFO, \
__FUNCTION__, format , ## args); \
} while (0)
/** report total elapsed time since timer started */
#define REPORT_CLOCK_TOTAL(clockno,format, args...) do { \
- if (qof_log_check (log_module, GNC_LOG_INFO)) \
- qof_report_clock_total (clockno, log_module, GNC_LOG_INFO, \
+ if (qof_log_check (log_module, QOF_LOG_INFO)) \
+ qof_report_clock_total (clockno, log_module, QOF_LOG_INFO, \
__FUNCTION__, format , ## args); \
} while (0)
Modified: gnucash/trunk/src/app-utils/gnc-component-manager.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -34,7 +34,7 @@
typedef struct
{
GNCIdType entity_type;
- GNCEngineEventType event_mask;
+ QofEventId event_mask;
} EntityTypeEventInfo;
typedef struct
@@ -108,12 +108,12 @@
static void
clear_mask_hash_helper (gpointer key, gpointer value, gpointer user_data)
{
- GNCEngineEventType * et = value;
+ QofEventId * et = value;
*et = 0;
}
-/* clear a hash table of the form string --> GNCEngineEventType,
+/* clear a hash table of the form string --> QofEventId,
* where the values are g_malloced and the keys are in the engine
* string cache. */
static void
@@ -183,7 +183,7 @@
static void
add_event (ComponentEventInfo *cei, const GUID *entity,
- GNCEngineEventType event_mask, gboolean or_in)
+ QofEventId event_mask, gboolean or_in)
{
GHashTable *hash;
@@ -234,9 +234,9 @@
static void
add_event_type (ComponentEventInfo *cei, GNCIdTypeConst entity_type,
- GNCEngineEventType event_mask, gboolean or_in)
+ QofEventId event_mask, gboolean or_in)
{
- GNCEngineEventType *mask;
+ QofEventId *mask;
g_return_if_fail (cei);
g_return_if_fail (cei->event_masks);
@@ -246,7 +246,7 @@
if (!mask)
{
char * key = gnc_string_cache_insert ((gpointer) entity_type);
- mask = g_new0 (GNCEngineEventType, 1);
+ mask = g_new0 (QofEventId, 1);
g_hash_table_insert (cei->event_masks, key, mask);
}
@@ -258,7 +258,7 @@
static void
gnc_cm_event_handler (GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data)
{
#if CM_DEBUG
@@ -274,7 +274,7 @@
/* split events are never generated by the engine, but might
* be generated by a backend (viz. the postgres backend.)
* Handle them like a transaction modify event. */
- add_event_type (&changes, GNC_ID_TRANS, GNC_EVENT_MODIFY, TRUE);
+ add_event_type (&changes, GNC_ID_TRANS, QOF_EVENT_MODIFY, TRUE);
}
else
add_event_type (&changes, type, event_type, TRUE);
@@ -482,7 +482,7 @@
void
gnc_gui_component_watch_entity (gint component_id,
const GUID *entity,
- GNCEngineEventType event_mask)
+ QofEventId event_mask)
{
ComponentInfo *ci;
@@ -502,7 +502,7 @@
void
gnc_gui_component_watch_entity_direct (gint component_id,
GUID entity,
- GNCEngineEventType event_mask)
+ QofEventId event_mask)
{
gnc_gui_component_watch_entity (component_id, &entity, event_mask);
}
@@ -510,7 +510,7 @@
void
gnc_gui_component_watch_entity_type (gint component_id,
GNCIdTypeConst entity_type,
- GNCEngineEventType event_mask)
+ QofEventId event_mask)
{
ComponentInfo *ci;
@@ -528,7 +528,7 @@
gnc_gui_get_entity_events (GHashTable *changes, const GUID *entity)
{
if (!changes || !entity)
- return GNC_EVENT_NONE;
+ return QOF_EVENT_NONE;
return g_hash_table_lookup (changes, entity);
}
@@ -648,8 +648,8 @@
{
ComponentEventInfo *cei = user_data;
GNCIdType id_type = key;
- GNCEngineEventType * et = value;
- GNCEngineEventType * et_2;
+ QofEventId * et = value;
+ QofEventId * et_2;
et_2 = g_hash_table_lookup (cei->event_masks, id_type);
if (!et_2)
Modified: gnucash/trunk/src/app-utils/gnc-component-manager.h
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.h 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.h 2006-03-09 03:48:49 UTC (rev 13547)
@@ -32,7 +32,7 @@
typedef struct
{
- GNCEngineEventType event_mask;
+ QofEventId event_mask;
} EventInfo;
@@ -64,7 +64,7 @@
* Notes on dealing with destroyed entities: As stated above, entities
* in the changes GHashTable may no longer exist. So how can you
* determine if this has happened? Well, it's a good idea to check
- * for the GNC_EVENT_DESTROY bit in the EventInfo structure. Of
+ * for the QOF_EVENT_DESTROY bit in the EventInfo structure. Of
* course, that means you need the hash key (GUID) for the destroyed
* entity. How are you going to get the GUID from the entity if the
* entity has already been destroyed? You're not. So, you have to
@@ -191,7 +191,7 @@
*/
void gnc_gui_component_watch_entity (gint component_id,
const GUID *entity,
- GNCEngineEventType event_mask);
+ QofEventId event_mask);
/* gnc_gui_component_watch_entity_direct
* Add an entity to the list of those being watched by the component.
@@ -204,7 +204,7 @@
*/
void gnc_gui_component_watch_entity_direct (gint component_id,
GUID entity,
- GNCEngineEventType event_mask);
+ QofEventId event_mask);
/* gnc_gui_component_watch_entity_type
* Watch all entities of a particular type.
@@ -217,7 +217,7 @@
*/
void gnc_gui_component_watch_entity_type (gint component_id,
GNCIdTypeConst entity_type,
- GNCEngineEventType event_mask);
+ QofEventId event_mask);
/* gnc_gui_get_entity_events
* Return the event info of the events which have been generated by
Modified: gnucash/trunk/src/backend/postgres/events.c
===================================================================
--- gnucash/trunk/src/backend/postgres/events.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/backend/postgres/events.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -131,7 +131,7 @@
typedef struct _event {
Timespec stamp;
- GNCEngineEventType type;
+ QofEventId type;
GUID guid;
QofIdType obj_type;
} Event;
@@ -145,7 +145,7 @@
Event *ev = NULL;
GUID guid;
Timespec ts;
- GNCEngineEventType type;
+ QofEventId type;
char change = (DB_GET_VAL("change",j))[0];
char objtype = (DB_GET_VAL("objtype",j))[0];
QofIdType obj_type = GNC_ID_NONE;
@@ -156,9 +156,9 @@
/* convert from SQL type to engine type */
switch (change)
{
- case 'a': type = GNC_EVENT_CREATE; break;
- case 'm': type = GNC_EVENT_MODIFY; break;
- case 'd': type = GNC_EVENT_DESTROY; break;
+ case 'a': type = QOF_EVENT_CREATE; break;
+ case 'm': type = QOF_EVENT_MODIFY; break;
+ case 'd': type = QOF_EVENT_DESTROY; break;
default:
PERR ("unknown change type %c for guid=%s", change, guid_str);
return data;
@@ -287,8 +287,8 @@
default:
PERR ("account: cant' happen !!!!!!!");
break;
- case GNC_EVENT_CREATE:
- case GNC_EVENT_MODIFY: {
+ case QOF_EVENT_CREATE:
+ case QOF_EVENT_MODIFY: {
Account *acc;
/* if the remote user created an account, mirror it here */
@@ -297,7 +297,7 @@
ent = (QofEntity*)acc;
break;
}
- case GNC_EVENT_DESTROY: {
+ case QOF_EVENT_DESTROY: {
Account * acc = pgendAccountLookup (be, &(ev->guid));
AccountGroup *topgrp = xaccAccountGetRoot(acc);
xaccAccountBeginEdit (acc);
@@ -320,7 +320,7 @@
default:
PERR ("transaction: cant' happen !!!!!!!");
break;
- case GNC_EVENT_CREATE: {
+ case QOF_EVENT_CREATE: {
Transaction *trans;
/* don't mirror transaction creations. If a register needs
* it, it will do a query. */
@@ -329,14 +329,14 @@
PINFO ("create transaction");
break;
}
- case GNC_EVENT_MODIFY: {
+ case QOF_EVENT_MODIFY: {
Transaction *trans;
trans = pgendTransLookup (be, &(ev->guid));
pgendCopyTransactionToEngine (be, &(ev->guid));
ent = (QofEntity*)trans;
break;
}
- case GNC_EVENT_DESTROY: {
+ case QOF_EVENT_DESTROY: {
Transaction *trans = pgendTransLookup (be, &(ev->guid));
xaccTransBeginEdit (trans);
/* mark trans for freeing */
@@ -375,7 +375,7 @@
local_obj_type = pgendGUIDType (be, &(ev->guid));
if (GNC_ID_NONE != local_obj_type)
{
- gnc_engine_gen_event(ent, GNC_EVENT_CREATE);
+ qof_event_gen(ent, QOF_EVENT_CREATE, NULL);
}
}
else
@@ -383,11 +383,11 @@
local_obj_type = pgendGUIDType (be, &(ev->guid));
if (GNC_ID_NONE != local_obj_type)
{
- gnc_engine_gen_event(ent, GNC_EVENT_MODIFY);
+ qof_event_gen(ent, QOF_EVENT_MODIFY, NULL);
}
else
{
- gnc_engine_gen_event(ent, GNC_EVENT_DESTROY);
+ qof_event_gen(ent, QOF_EVENT_DESTROY, NULL);
}
}
Modified: gnucash/trunk/src/business/business-core/gncAddress.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncAddress.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncAddress.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -57,7 +57,7 @@
{
address->dirty = TRUE;
- gnc_engine_gen_event (address->parent, GNC_EVENT_MODIFY);
+ qof_event_gen (address->parent, QOF_EVENT_MODIFY, NULL);
}
/* Create/Destroy functions */
Modified: gnucash/trunk/src/business/business-core/gncBillTerm.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncBillTerm.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncBillTerm.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -86,7 +86,7 @@
{
term->inst.dirty = TRUE;
qof_collection_mark_dirty (term->inst.entity.collection);
- gnc_engine_gen_event (&term->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&term->inst.entity, QOF_EVENT_MODIFY, NULL);
}
static inline void maybe_resort_list (GncBillTerm *term)
@@ -141,7 +141,7 @@
term->desc = CACHE_INSERT ("");
term->discount = gnc_numeric_zero ();
addObj (term);
- gnc_engine_gen_event (&term->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&term->inst.entity, QOF_EVENT_CREATE, NULL);
return term;
}
@@ -162,7 +162,7 @@
if (!term) return;
- gnc_engine_gen_event (&term->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&term->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (term->name);
CACHE_REMOVE (term->desc);
remObj (term);
@@ -229,7 +229,7 @@
}
addObj (term);
- gnc_engine_gen_event (&term->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&term->inst.entity, QOF_EVENT_CREATE, NULL);
return term;
}
Modified: gnucash/trunk/src/business/business-core/gncCustomer.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncCustomer.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncCustomer.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -80,7 +80,7 @@
{
customer->inst.dirty = TRUE;
qof_collection_mark_dirty (customer->inst.entity.collection);
- gnc_engine_gen_event (&customer->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&customer->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ============================================================== */
@@ -107,7 +107,7 @@
cust->credit = gnc_numeric_zero();
cust->shipaddr = gncAddressCreate (book, &cust->inst.entity);
- gnc_engine_gen_event (&cust->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&cust->inst.entity, QOF_EVENT_CREATE, NULL);
return cust;
}
@@ -151,7 +151,7 @@
cust->jobs = g_list_prepend(cust->jobs, job);
}
- gnc_engine_gen_event (&cust->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&cust->inst.entity, QOF_EVENT_CREATE, NULL);
return cust;
}
@@ -168,7 +168,7 @@
{
if (!cust) return;
- gnc_engine_gen_event (&cust->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&cust->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (cust->id);
CACHE_REMOVE (cust->name);
@@ -341,7 +341,7 @@
cust->jobs = g_list_insert_sorted (cust->jobs, job,
(GCompareFunc)gncJobCompare);
- gnc_engine_gen_event (&cust->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&cust->inst.entity, QOF_EVENT_MODIFY, NULL);
}
void gncCustomerRemoveJob (GncCustomer *cust, GncJob *job)
@@ -358,7 +358,7 @@
cust->jobs = g_list_remove_link (cust->jobs, node);
g_list_free_1 (node);
}
- gnc_engine_gen_event (&cust->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&cust->inst.entity, QOF_EVENT_MODIFY, NULL);
}
void gncCustomerBeginEdit (GncCustomer *cust)
Modified: gnucash/trunk/src/business/business-core/gncEmployee.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncEmployee.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncEmployee.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -63,7 +63,7 @@
{
employee->inst.dirty = TRUE;
qof_collection_mark_dirty (employee->inst.entity.collection);
- gnc_engine_gen_event (&employee->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&employee->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ============================================================== */
@@ -87,7 +87,7 @@
employee->rate = gnc_numeric_zero();
employee->active = TRUE;
- gnc_engine_gen_event (&employee->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&employee->inst.entity, QOF_EVENT_CREATE, NULL);
return employee;
}
@@ -103,7 +103,7 @@
{
if (!employee) return;
- gnc_engine_gen_event (&employee->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&employee->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (employee->id);
CACHE_REMOVE (employee->username);
@@ -137,7 +137,7 @@
employee->ccard_acc =
GNC_ACCOUNT(qof_instance_lookup_twin(QOF_INSTANCE(from->ccard_acc), book));
- gnc_engine_gen_event (&employee->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&employee->inst.entity, QOF_EVENT_CREATE, NULL);
return employee;
}
Modified: gnucash/trunk/src/business/business-core/gncEntry.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncEntry.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncEntry.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -170,7 +170,7 @@
{
entry->inst.dirty = TRUE;
qof_collection_mark_dirty (entry->inst.entity.collection);
- gnc_engine_gen_event (&entry->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&entry->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ================================================================ */
@@ -204,7 +204,7 @@
entry->values_dirty = TRUE;
- gnc_engine_gen_event (&entry->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&entry->inst.entity, QOF_EVENT_CREATE, NULL);
return entry;
}
@@ -220,7 +220,7 @@
{
if (!entry) return;
- gnc_engine_gen_event (&entry->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&entry->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (entry->desc);
CACHE_REMOVE (entry->action);
@@ -560,8 +560,8 @@
/* Generate an event modifying the Order's end-owner */
#if 0
- gnc_engine_gen_event (gncOwnerGetEndGUID (gncOrderGetOwner (order)),
- GNC_EVENT_MODIFY);
+ qof_event_gen (gncOwnerGetEndGUID (gncOrderGetOwner (order)),
+ QOF_EVENT_MODIFY, NULL);
#endif
}
Modified: gnucash/trunk/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncInvoice.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -92,7 +92,7 @@
{
invoice->inst.dirty = TRUE;
qof_collection_mark_dirty (invoice->inst.entity.collection);
- gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&invoice->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ================================================================== */
@@ -116,7 +116,7 @@
invoice->to_charge_amount = gnc_numeric_zero();
- gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&invoice->inst.entity, QOF_EVENT_CREATE, NULL);
return invoice;
}
@@ -132,7 +132,7 @@
{
if (!invoice) return;
- gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&invoice->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (invoice->id);
CACHE_REMOVE (invoice->notes);
@@ -195,7 +195,7 @@
GNCLot * posted_lot;
#endif
- gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&invoice->inst.entity, QOF_EVENT_CREATE, NULL);
return invoice;
}
@@ -1381,7 +1381,7 @@
/* Now send an event for the invoice so it gets updated as paid */
this_invoice = gncInvoiceGetInvoiceFromLot(lot);
if (this_invoice)
- gnc_engine_gen_event (&this_invoice->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&this_invoice->inst.entity, QOF_EVENT_MODIFY, NULL);
if (gnc_numeric_zero_p (amount))
break;
Modified: gnucash/trunk/src/business/business-core/gncJob.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncJob.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncJob.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -58,7 +58,7 @@
{
job->inst.dirty = TRUE;
qof_collection_mark_dirty (job->inst.entity.collection);
- gnc_engine_gen_event (&job->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&job->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ================================================================== */
@@ -79,7 +79,7 @@
job->active = TRUE;
/* GncOwner not initialized */
- gnc_engine_gen_event (&job->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&job->inst.entity, QOF_EVENT_CREATE, NULL);
return job;
}
@@ -102,7 +102,7 @@
job->owner = gncCloneOwner(&from->owner, book);
- gnc_engine_gen_event (&job->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&job->inst.entity, QOF_EVENT_CREATE, NULL);
return job;
}
@@ -118,7 +118,7 @@
{
if (!job) return;
- gnc_engine_gen_event (&job->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&job->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (job->id);
CACHE_REMOVE (job->name);
Modified: gnucash/trunk/src/business/business-core/gncOrder.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncOrder.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncOrder.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -72,7 +72,7 @@
{
order->inst.dirty = TRUE;
qof_collection_mark_dirty (order->inst.entity.collection);
- gnc_engine_gen_event (&order->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&order->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* =============================================================== */
@@ -93,7 +93,7 @@
order->active = TRUE;
- gnc_engine_gen_event (&order->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&order->inst.entity, QOF_EVENT_CREATE, NULL);
return order;
}
@@ -109,7 +109,7 @@
{
if (!order) return;
- gnc_engine_gen_event (&order->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&order->inst.entity, QOF_EVENT_DESTROY, NULL);
g_list_free (order->entries);
CACHE_REMOVE (order->id);
@@ -153,7 +153,7 @@
order->entries = g_list_prepend (order->entries, entry);
}
- gnc_engine_gen_event (&order->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&order->inst.entity, QOF_EVENT_CREATE, NULL);
return order;
}
Modified: gnucash/trunk/src/business/business-core/gncTaxTable.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncTaxTable.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncTaxTable.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -145,7 +145,7 @@
{
table->inst.dirty = TRUE;
qof_collection_mark_dirty (table->inst.entity.collection);
- gnc_engine_gen_event (&table->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&table->inst.entity, QOF_EVENT_MODIFY, NULL);
}
static inline void
@@ -213,7 +213,7 @@
qof_instance_init (&table->inst, _GNC_MOD_NAME, book);
table->name = CACHE_INSERT ("");
addObj (table);
- gnc_engine_gen_event (&table->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&table->inst.entity, QOF_EVENT_CREATE, NULL);
return table;
}
@@ -265,7 +265,7 @@
}
addObj (table);
- gnc_engine_gen_event (&table->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&table->inst.entity, QOF_EVENT_CREATE, NULL);
return table;
}
@@ -301,7 +301,7 @@
if (!table) return;
- gnc_engine_gen_event (&table->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&table->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (table->name);
remObj (table);
Modified: gnucash/trunk/src/business/business-core/gncVendor.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncVendor.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-core/gncVendor.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -69,7 +69,7 @@
{
vendor->inst.dirty = TRUE;
qof_collection_mark_dirty (vendor->inst.entity.collection);
- gnc_engine_gen_event (&vendor->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&vendor->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ============================================================== */
@@ -92,7 +92,7 @@
vendor->active = TRUE;
vendor->jobs = NULL;
- gnc_engine_gen_event (&vendor->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&vendor->inst.entity, QOF_EVENT_CREATE, NULL);
return vendor;
}
@@ -108,7 +108,7 @@
{
if (!vendor) return;
- gnc_engine_gen_event (&vendor->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&vendor->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (vendor->id);
CACHE_REMOVE (vendor->name);
@@ -162,7 +162,7 @@
vendor->jobs = g_list_prepend(vendor->jobs, job);
}
- gnc_engine_gen_event (&vendor->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&vendor->inst.entity, QOF_EVENT_CREATE, NULL);
return vendor;
}
@@ -397,7 +397,7 @@
vendor->jobs = g_list_insert_sorted (vendor->jobs, job,
(GCompareFunc)gncJobCompare);
- gnc_engine_gen_event (&vendor->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&vendor->inst.entity, QOF_EVENT_MODIFY, NULL);
}
void gncVendorRemoveJob (GncVendor *vendor, GncJob *job)
@@ -415,7 +415,7 @@
g_list_free_1 (node);
}
- gnc_engine_gen_event (&vendor->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&vendor->inst.entity, QOF_EVENT_MODIFY, NULL);
}
void gncVendorBeginEdit (GncVendor *vendor)
Modified: gnucash/trunk/src/business/business-gnome/business-gnome-utils.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-gnome-utils.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/business-gnome-utils.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -513,7 +513,7 @@
if (type_name)
gnc_gui_component_watch_entity_type (omd->component_id,
type_name,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
g_signal_connect (G_OBJECT (omenu), "destroy",
G_CALLBACK (generic_omenu_destroy_cb), omd);
Modified: gnucash/trunk/src/business/business-gnome/dialog-billterms.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-billterms.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-billterms.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -544,7 +544,7 @@
gnc_gui_component_watch_entity (btw->component_id,
gncBillTermGetGUID (term),
- GNC_EVENT_MODIFY);
+ QOF_EVENT_MODIFY);
row_text[0] = (char *)gncBillTermGetName (term);
row_text[1] = NULL;
@@ -558,7 +558,7 @@
gnc_gui_component_watch_entity_type (btw->component_id,
GNC_BILLTERM_MODULE_NAME,
- GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
+ QOF_EVENT_CREATE | QOF_EVENT_DESTROY);
if (vadjustment) {
save_value = CLAMP (save_value, vadjustment->lower,
Modified: gnucash/trunk/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-customer.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-customer.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -405,7 +405,7 @@
/* Next, close if this is a destroy event */
if (changes) {
info = gnc_gui_get_entity_events (changes, &cw->customer_guid);
- if (info && (info->event_mask & GNC_EVENT_DESTROY)) {
+ if (info && (info->event_mask & QOF_EVENT_DESTROY)) {
gnc_close_gui_component (cw->component_id);
return;
}
@@ -620,7 +620,7 @@
gnc_gui_component_watch_entity_type (cw->component_id,
GNC_CUSTOMER_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_widget_show_all (cw->dialog);
Modified: gnucash/trunk/src/business/business-gnome/dialog-employee.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-employee.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-employee.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -356,7 +356,7 @@
/* Next, close if this is a destroy event */
if (changes) {
info = gnc_gui_get_entity_events (changes, &ew->employee_guid);
- if (info && (info->event_mask & GNC_EVENT_DESTROY)) {
+ if (info && (info->event_mask & QOF_EVENT_DESTROY)) {
gnc_close_gui_component (ew->component_id);
return;
}
@@ -556,7 +556,7 @@
gnc_gui_component_watch_entity_type (ew->component_id,
GNC_EMPLOYEE_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_widget_show_all (ew->dialog);
Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -1304,7 +1304,7 @@
/* Next, close if this is a destroy event */
if (changes) {
info = gnc_gui_get_entity_events (changes, &iw->invoice_guid);
- if (info && (info->event_mask & GNC_EVENT_DESTROY)) {
+ if (info && (info->event_mask & QOF_EVENT_DESTROY)) {
gnc_close_gui_component (iw->component_id);
return;
}
@@ -1927,7 +1927,7 @@
gnc_gui_component_watch_entity_type (iw->component_id,
GNC_INVOICE_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
/* Create the register */
{
@@ -2067,7 +2067,7 @@
gnc_gui_component_watch_entity_type (iw->component_id,
GNC_INVOICE_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
/* Now fill in a lot of the pieces and display properly */
gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
Modified: gnucash/trunk/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-job.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-job.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -269,7 +269,7 @@
/* Next, close if this is a destroy event */
if (changes) {
info = gnc_gui_get_entity_events (changes, &jw->job_guid);
- if (info && (info->event_mask & GNC_EVENT_DESTROY)) {
+ if (info && (info->event_mask & QOF_EVENT_DESTROY)) {
gnc_close_gui_component (jw->component_id);
return;
}
@@ -378,7 +378,7 @@
gnc_job_name_changed_cb (NULL, jw);
gnc_gui_component_watch_entity_type (jw->component_id,
GNC_JOB_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_widget_show_all (jw->dialog);
Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -396,7 +396,7 @@
/* Next, close if this is a destroy event */
if (changes) {
info = gnc_gui_get_entity_events (changes, &ow->order_guid);
- if (info && (info->event_mask & GNC_EVENT_DESTROY)) {
+ if (info && (info->event_mask & QOF_EVENT_DESTROY)) {
gnc_close_gui_component (ow->component_id);
return;
}
@@ -480,7 +480,7 @@
gnc_gui_component_watch_entity_type (ow->component_id,
GNC_ORDER_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gnc_table_refresh_gui (gnc_entry_ledger_get_table (ow->ledger), TRUE);
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -437,8 +437,8 @@
/* Watch for any new or changed accounts */
gnc_gui_component_watch_entity_type (pw->component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_CREATE | GNC_EVENT_MODIFY |
- GNC_EVENT_DESTROY);
+ QOF_EVENT_CREATE | QOF_EVENT_MODIFY |
+ QOF_EVENT_DESTROY);
/* Fill in the post_combo and account_tree widgets */
gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types);
Modified: gnucash/trunk/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-vendor.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-gnome/dialog-vendor.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -327,7 +327,7 @@
/* Next, close if this is a destroy event */
if (changes) {
info = gnc_gui_get_entity_events (changes, &vw->vendor_guid);
- if (info && (info->event_mask & GNC_EVENT_DESTROY)) {
+ if (info && (info->event_mask & QOF_EVENT_DESTROY)) {
gnc_close_gui_component (vw->component_id);
return;
}
@@ -487,7 +487,7 @@
gnc_gui_component_watch_entity_type (vw->component_id,
GNC_VENDOR_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_widget_show_all (vw->dialog);
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -90,7 +90,7 @@
gnc_gui_component_watch_entity (ledger->component_id,
gncOwnerGetGUID
(gncInvoiceGetOwner (ledger->invoice)),
- GNC_EVENT_MODIFY);
+ QOF_EVENT_MODIFY);
case GNCENTRY_INVOICE_VIEWER:
case GNCENTRY_BILL_ENTRY:
case GNCENTRY_BILL_VIEWER:
@@ -106,17 +106,17 @@
gnc_gui_component_watch_entity_type (ledger->component_id,
type,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
/* To make sure the xfer cell is up to date */
gnc_gui_component_watch_entity_type (ledger->component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
/* To make sure the taxtable cell is up to date */
gnc_gui_component_watch_entity_type (ledger->component_id,
GNC_TAXTABLE_MODULE_NAME,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
/* For expense vouchers, watch the employee and refresh if it's changed */
if (ledger->type == GNCENTRY_EXPVOUCHER_ENTRY) {
@@ -126,7 +126,7 @@
if (employee)
gnc_gui_component_watch_entity (ledger->component_id,
gncEmployeeGetGUID (employee),
- GNC_EVENT_MODIFY);
+ QOF_EVENT_MODIFY);
}
for (node = entries; node; node = node->next)
@@ -134,7 +134,7 @@
GncEntry *entry = node->data;
gnc_gui_component_watch_entity (ledger->component_id,
gncEntryGetGUID (entry),
- GNC_EVENT_MODIFY);
+ QOF_EVENT_MODIFY);
}
}
Modified: gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -453,7 +453,7 @@
gnc_gui_component_watch_entity (ttw->component_id,
gncTaxTableGetGUID (table),
- GNC_EVENT_MODIFY);
+ QOF_EVENT_MODIFY);
row_text[0] = (char *)gncTaxTableGetName (table);
row_text[1] = NULL;
@@ -467,7 +467,7 @@
gnc_gui_component_watch_entity_type (ttw->component_id,
GNC_TAXTABLE_MODULE_NAME,
- GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
+ QOF_EVENT_CREATE | QOF_EVENT_DESTROY);
if (vadjustment) {
save_value = CLAMP (save_value, vadjustment->lower,
Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/Account.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -159,7 +159,7 @@
acc = g_new (Account, 1);
xaccInitAccount (acc, book);
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_CREATE, NULL);
return acc;
}
@@ -228,7 +228,7 @@
if (!acc) return;
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_DESTROY, NULL);
if (acc->children)
{
@@ -317,7 +317,7 @@
static inline void on_done(QofInstance *inst)
{
/* old event style */
- gnc_engine_gen_event (&inst->entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&inst->entity, QOF_EVENT_MODIFY, NULL);
}
static inline void on_err (QofInstance *inst, QofBackendError errcode)
@@ -939,7 +939,6 @@
acc->balance_dirty = FALSE;
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
}
/********************************************************************\
Modified: gnucash/trunk/src/engine/FreqSpec.c
===================================================================
--- gnucash/trunk/src/engine/FreqSpec.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/FreqSpec.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -189,7 +189,7 @@
fs = g_new0(FreqSpec, 1);
xaccFreqSpecInit( fs, book );
- gnc_engine_gen_event( &fs->entity, GNC_EVENT_CREATE );
+ qof_event_gen( &fs->entity, QOF_EVENT_CREATE , NULL);
return fs;
}
@@ -220,7 +220,7 @@
xaccFreqSpecFree( FreqSpec *fs )
{
if ( fs == NULL ) return;
- gnc_engine_gen_event( &fs->entity, GNC_EVENT_DESTROY );
+ qof_event_gen( &fs->entity, QOF_EVENT_DESTROY , NULL);
xaccFreqSpecCleanUp( fs );
qof_entity_release (&fs->entity);
Modified: gnucash/trunk/src/engine/Group.c
===================================================================
--- gnucash/trunk/src/engine/Group.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/Group.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -618,7 +618,7 @@
grp->saved = 0;
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/********************************************************************\
@@ -662,7 +662,7 @@
xaccFreeAccountGroup (grp);
}
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/********************************************************************\
@@ -685,7 +685,7 @@
xaccGroupInsertAccount (adult->children, child);
- gnc_engine_gen_event (&adult->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&adult->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/********************************************************************\
@@ -742,10 +742,10 @@
*/
PWARN ("reparenting accounts across books is not correctly supported\n");
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_DESTROY, NULL);
col = qof_book_get_collection (grp->book, GNC_ID_ACCOUNT);
qof_collection_insert_entity (col, &acc->inst.entity);
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_CREATE, NULL);
}
}
@@ -764,7 +764,7 @@
grp->saved = 0;
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_MODIFY, NULL);
LEAVE(" ");
}
@@ -833,7 +833,7 @@
xaccGroupCopyGroup (to_acc->children, from_acc->children);
}
xaccAccountCommitEdit (to_acc);
- gnc_engine_gen_event (&to_acc->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&to_acc->inst.entity, QOF_EVENT_CREATE, NULL);
/* make sure that we have a symmetric, uniform number of
* begin-edits, so that subsequent GroupCommitEdit's
@@ -893,14 +893,14 @@
gb->parent = acc_a;
acc_b->children = NULL;
- gnc_engine_gen_event (&acc_a->inst.entity, GNC_EVENT_MODIFY);
- gnc_engine_gen_event (&acc_b->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&acc_a->inst.entity, QOF_EVENT_MODIFY, NULL);
+ qof_event_gen (&acc_b->inst.entity, QOF_EVENT_MODIFY, NULL);
}
else
{
xaccGroupConcatGroup (ga, gb);
acc_b->children = NULL;
- gnc_engine_gen_event (&acc_b->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&acc_b->inst.entity, QOF_EVENT_MODIFY, NULL);
}
}
@@ -914,8 +914,8 @@
{
Split *split = lp->data;
- gnc_engine_gen_event (&xaccSplitGetAccount(split)->inst.entity,
- GNC_EVENT_MODIFY);
+ qof_event_gen (&xaccSplitGetAccount(split)->inst.entity,
+ QOF_EVENT_MODIFY, NULL);
split->acc = NULL;
xaccAccountInsertSplit (acc_a, split);
}
@@ -927,7 +927,7 @@
node_b = node_b->prev;
/* remove from list -- node_a is ok, it's before node_b */
- gnc_engine_gen_event (&acc_b->inst.entity, GNC_EVENT_REMOVE);
+ qof_event_gen (&acc_b->inst.entity, QOF_EVENT_REMOVE, NULL);
grp->accounts = g_list_remove (grp->accounts, acc_b);
xaccAccountBeginEdit (acc_b);
Modified: gnucash/trunk/src/engine/Period.c
===================================================================
--- gnucash/trunk/src/engine/Period.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/Period.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -118,7 +118,7 @@
}
xaccTransCommitEdit (newtrans);
- gnc_engine_gen_event (&newtrans->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&newtrans->inst.entity, QOF_EVENT_CREATE, NULL);
LEAVE ("trans=%p %s", trans, trans->description);
}
@@ -186,7 +186,7 @@
}
xaccTransCommitEdit (trans);
- gnc_engine_gen_event (&trans->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&trans->inst.entity, QOF_EVENT_MODIFY, NULL);
LEAVE ("trans=%p %s", trans, trans->description);
}
Modified: gnucash/trunk/src/engine/SchedXaction.c
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/SchedXaction.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -92,7 +92,7 @@
sx = g_new0( SchedXaction, 1 );
xaccSchedXactionInit( sx, book );
- gnc_engine_gen_event( &sx->inst.entity, GNC_EVENT_CREATE );
+ qof_event_gen( &sx->inst.entity, QOF_EVENT_CREATE , NULL);
return sx;
}
@@ -146,7 +146,7 @@
if ( sx == NULL ) return;
xaccFreqSpecFree( sx->freq );
- gnc_engine_gen_event( &sx->inst.entity, GNC_EVENT_DESTROY );
+ qof_event_gen( &sx->inst.entity, QOF_EVENT_DESTROY , NULL);
if ( sx->name )
g_free( sx->name );
Modified: gnucash/trunk/src/engine/Split.c
===================================================================
--- gnucash/trunk/src/engine/Split.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/Split.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -516,7 +516,7 @@
//FIXME: probably not needed.
xaccGroupMarkNotSaved (orig_acc->parent);
//FIXME: find better event type
- gnc_engine_gen_event (&orig_acc->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&orig_acc->inst.entity, QOF_EVENT_MODIFY, NULL);
} else PERR("Account lost track of moved or deleted split.");
orig_acc->balance_dirty = TRUE;
xaccAccountRecomputeBalance(orig_acc);
@@ -540,7 +540,7 @@
xaccGroupMarkNotSaved (acc->parent); //FIXME: probably not needed.
//FIXME: find better event
- gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&acc->inst.entity, QOF_EVENT_MODIFY, NULL);
} else PERR("Account grabbed split prematurely.");
acc->balance_dirty = TRUE;
xaccSplitSetAmount(s, xaccSplitGetAmount(s));
@@ -548,11 +548,11 @@
if (s->orig_parent && s->parent != s->orig_parent) {
//FIXME: find better event
- gnc_engine_gen_event (&s->orig_parent->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&s->orig_parent->inst.entity, QOF_EVENT_MODIFY, NULL);
}
if (s->lot) {
/* A change of value/amnt affects gains display, etc. */
- gnc_engine_gen_event (&s->lot->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&s->lot->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* Important: we save off the original parent transaction and account
Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/Transaction.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -220,16 +220,16 @@
if (account)
{
xaccGroupMarkNotSaved (account->parent);
- gnc_engine_gen_event (&account->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&account->inst.entity, QOF_EVENT_MODIFY, NULL);
}
if (lot)
{
/* A change of transaction date might affect opening date of lot */
- gnc_engine_gen_event (&lot->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&lot->inst.entity, QOF_EVENT_MODIFY, NULL);
}
}
#endif
- gnc_engine_gen_event (&trans->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&trans->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/********************************************************************\
@@ -276,7 +276,7 @@
trans = g_new(Transaction, 1);
xaccInitTransaction (trans, book);
- gnc_engine_gen_event (&trans->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&trans->inst.entity, QOF_EVENT_CREATE, NULL);
return trans;
}
@@ -889,7 +889,7 @@
if (!shutting_down)
xaccTransWriteLog (trans, 'D');
- gnc_engine_gen_event (&trans->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&trans->inst.entity, QOF_EVENT_DESTROY, NULL);
/* We only own the splits that still think they belong to us. */
trans->splits = g_list_copy(trans->splits);
Modified: gnucash/trunk/src/engine/gnc-budget.c
===================================================================
--- gnucash/trunk/src/engine/gnc-budget.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/gnc-budget.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -65,7 +65,7 @@
gnc_budget_set_description(budget, "");
gnc_budget_set_num_periods(budget, 12);
- gnc_engine_gen_event( &budget->inst.entity, GNC_EVENT_CREATE );
+ qof_event_gen( &budget->inst.entity, QOF_EVENT_CREATE , NULL);
LEAVE(" ");
return budget;
@@ -83,7 +83,7 @@
/* We first send the message that this object is about to be
* destroyed so that any GUI elements can remove it before it is
* actually gone. */
- gnc_engine_gen_event( &budget->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen( &budget->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE(budget->name);
CACHE_REMOVE(budget->description);
@@ -100,7 +100,7 @@
CACHE_REPLACE(budget->name, name);
qof_collection_mark_dirty(budget->inst.entity.collection);
- gnc_engine_gen_event( &budget->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen( &budget->inst.entity, QOF_EVENT_MODIFY, NULL);
}
const gchar*
@@ -119,7 +119,7 @@
CACHE_REPLACE(budget->description, description);
qof_collection_mark_dirty(budget->inst.entity.collection);
- gnc_engine_gen_event( &budget->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen( &budget->inst.entity, QOF_EVENT_MODIFY, NULL);
}
const gchar*
@@ -136,7 +136,7 @@
budget->recurrence = *r;
qof_collection_mark_dirty(budget->inst.entity.collection);
- gnc_engine_gen_event(&budget->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen(&budget->inst.entity, QOF_EVENT_MODIFY, NULL);
}
const Recurrence *
@@ -161,7 +161,7 @@
budget->num_periods = num_periods;
qof_collection_mark_dirty(budget->inst.entity.collection);
- gnc_engine_gen_event( &budget->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen( &budget->inst.entity, QOF_EVENT_MODIFY, NULL);
}
guint
@@ -193,7 +193,7 @@
kvp_frame_set_numeric(frame, path, val);
qof_collection_mark_dirty(budget->inst.entity.collection);
- gnc_engine_gen_event( &budget->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen( &budget->inst.entity, QOF_EVENT_MODIFY, NULL);
}
Modified: gnucash/trunk/src/engine/gnc-commodity.c
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/gnc-commodity.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -475,7 +475,7 @@
{
cm->inst.dirty = TRUE; /* No-one uses or clears this flag. */
qof_collection_mark_dirty (cm->inst.entity.collection);
- gnc_engine_gen_event (&cm->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&cm->inst.entity, QOF_EVENT_MODIFY, NULL);
}
static void
@@ -528,7 +528,7 @@
reset_printname(retval);
reset_unique_name(retval);
- gnc_engine_gen_event (&retval->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&retval->inst.entity, QOF_EVENT_CREATE, NULL);
return retval;
}
@@ -543,7 +543,7 @@
{
if(!cm) return;
- gnc_engine_gen_event (&cm->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&cm->inst.entity, QOF_EVENT_DESTROY, NULL);
/* Set at creation */
CACHE_REMOVE (cm->fullname);
@@ -1214,7 +1214,7 @@
(gpointer)comm);
nsp->cm_list = g_list_append(nsp->cm_list, comm);
- gnc_engine_gen_event (&comm->inst.entity, GNC_EVENT_ADD);
+ qof_event_gen (&comm->inst.entity, QOF_EVENT_ADD, NULL);
LEAVE ("(table=%p, comm=%p)", table, comm);
return comm;
}
@@ -1239,7 +1239,7 @@
c = gnc_commodity_table_lookup (table, ns_name, comm->mnemonic);
if (c != comm) return;
- gnc_engine_gen_event (&comm->inst.entity, GNC_EVENT_REMOVE);
+ qof_event_gen (&comm->inst.entity, QOF_EVENT_REMOVE, NULL);
nsp = gnc_commodity_table_find_namespace(table, ns_name);
if (!nsp) return;
@@ -1457,13 +1457,13 @@
ns->cm_table = g_hash_table_new(g_str_hash, g_str_equal);
ns->name = gnc_string_cache_insert((gpointer)namespace);
qof_instance_init (&ns->inst, GNC_ID_COMMODITY_NAMESPACE, book);
- gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&ns->inst.entity, QOF_EVENT_CREATE, NULL);
g_hash_table_insert(table->ns_table,
(gpointer) ns->name,
(gpointer) ns);
table->ns_list = g_list_append(table->ns_list, ns);
- gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_ADD);
+ qof_event_gen (&ns->inst.entity, QOF_EVENT_ADD, NULL);
}
return ns;
}
@@ -1526,7 +1526,7 @@
if (!ns)
return;
- gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_REMOVE);
+ qof_event_gen (&ns->inst.entity, QOF_EVENT_REMOVE, NULL);
g_hash_table_remove(table->ns_table, namespace);
table->ns_list = g_list_remove(table->ns_list, ns);
@@ -1537,7 +1537,7 @@
g_hash_table_destroy(ns->cm_table);
gnc_string_cache_remove(ns->name);
- gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&ns->inst.entity, QOF_EVENT_DESTROY, NULL);
qof_instance_release(&ns->inst);
g_free(ns);
}
Modified: gnucash/trunk/src/engine/gnc-lot.c
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/gnc-lot.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -71,7 +71,7 @@
lot = g_new (GNCLot, 1);
gnc_lot_init (lot, book);
- gnc_engine_gen_event (&lot->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&lot->inst.entity, QOF_EVENT_CREATE, NULL);
return lot;
}
@@ -82,7 +82,7 @@
if (!lot) return;
ENTER ("(lot=%p)", lot);
- gnc_engine_gen_event (&lot->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&lot->inst.entity, QOF_EVENT_DESTROY, NULL);
for (node=lot->splits; node; node=node->next)
@@ -262,7 +262,7 @@
/* for recomputation of is-closed */
lot->is_closed = -1;
- gnc_engine_gen_event (&lot->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&lot->inst.entity, QOF_EVENT_MODIFY, NULL);
}
void
@@ -281,7 +281,7 @@
xaccAccountRemoveLot (lot->account, lot);
lot->account = NULL;
}
- gnc_engine_gen_event (&lot->inst.entity, GNC_EVENT_MODIFY);
+ qof_event_gen (&lot->inst.entity, QOF_EVENT_MODIFY, NULL);
}
/* ============================================================== */
Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/gnc-pricedb.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -56,7 +56,7 @@
p->source = NULL;
qof_instance_init (&p->inst, GNC_ID_PRICE, book);
- gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&p->inst.entity, QOF_EVENT_CREATE, NULL);
return p;
}
@@ -65,7 +65,7 @@
gnc_price_destroy (GNCPrice *p)
{
ENTER(" ");
- gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_DESTROY);
+ qof_event_gen (&p->inst.entity, QOF_EVENT_DESTROY, NULL);
if(p->type) gnc_string_cache_remove(p->type);
if(p->source) gnc_string_cache_remove(p->source);
@@ -827,7 +827,7 @@
}
g_hash_table_insert(currency_hash, currency, price_list);
p->db = db;
- gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_ADD);
+ qof_event_gen (&p->inst.entity, QOF_EVENT_ADD, NULL);
LEAVE ("db=%p, pr=%p dirty=%d do-free=%d commodity=%s/%s currency_hash=%p",
db, p, p->inst.dirty, p->inst.do_free,
@@ -892,7 +892,7 @@
currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
if(!currency_hash) { LEAVE (" no currency hash"); return FALSE; }
- gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_REMOVE);
+ qof_event_gen (&p->inst.entity, QOF_EVENT_REMOVE, NULL);
price_list = g_hash_table_lookup(currency_hash, currency);
gnc_price_ref(p);
if(!gnc_price_list_remove(&price_list, p)) {
Modified: gnucash/trunk/src/engine/gw-engine-spec.scm
===================================================================
--- gnucash/trunk/src/engine/gw-engine-spec.scm 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/gw-engine-spec.scm 2006-03-09 03:48:49 UTC (rev 13547)
@@ -109,13 +109,13 @@
(gw:wrap-as-wct ws '<gnc:Query*> "Query *" "const Query *")
-(let ((wt (gw:wrap-enumeration ws '<gnc:event-type> "GNCEngineEventType")))
+(let ((wt (gw:wrap-enumeration ws '<gnc:event-type> "QofEventId")))
- (gw:enum-add-value! wt "GNC_EVENT_NONE" 'gnc-event-none)
- (gw:enum-add-value! wt "GNC_EVENT_CREATE" 'gnc-event-create)
- (gw:enum-add-value! wt "GNC_EVENT_MODIFY" 'gnc-event-modify)
- (gw:enum-add-value! wt "GNC_EVENT_DESTROY" 'gnc-event-destroy)
- (gw:enum-add-value! wt "GNC_EVENT_ALL" 'gnc-event-all))
+ (gw:enum-add-value! wt "QOF_EVENT_NONE" 'gnc-event-none)
+ (gw:enum-add-value! wt "QOF_EVENT_CREATE" 'gnc-event-create)
+ (gw:enum-add-value! wt "QOF_EVENT_MODIFY" 'gnc-event-modify)
+ (gw:enum-add-value! wt "QOF_EVENT_DESTROY" 'gnc-event-destroy)
+ (gw:enum-add-value! wt "QOF_EVENT_ALL" 'gnc-event-all))
(let ((wt (gw:wrap-enumeration ws '<gnc:query-op> "QofQueryOp")))
@@ -1491,7 +1491,7 @@
ws
'gnc:set-log-level-global
'<gw:void>
- "gnc_set_log_level_global"
+ "qof_log_set_level_registered"
'((<gw:int> level))
"Set the logging level for all modules to level.")
@@ -2465,7 +2465,7 @@
ws
'gnc:engine-suspend-events
'<gw:void>
- "gnc_engine_suspend_events"
+ "qof_event_suspend"
'()
"Suspend all engine events.")
@@ -2473,7 +2473,7 @@
ws
'gnc:engine-resume-events
'<gw:void>
- "gnc_engine_resume_events"
+ "qof_event_resume"
'()
"Resume engine event generation.")
Modified: gnucash/trunk/src/engine/test/test-book-merge.c
===================================================================
--- gnucash/trunk/src/engine/test/test-book-merge.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/test/test-book-merge.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -95,7 +95,7 @@
g->active = TRUE;
g->version = 1;
g->minor = 1;
- gnc_engine_gen_event(&g->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen(&g->inst.entity, QOF_EVENT_CREATE, NULL);
return g;
}
@@ -286,7 +286,7 @@
do_test ((NULL != &import_obj->inst), "#4 instance init");
obj_setGUID(import_obj,qof_instance_get_guid(&import_obj->inst));
do_test ((NULL != &import_obj->obj_guid), "#5 guid set");
- gnc_engine_gen_event(&import_obj->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen(&import_obj->inst.entity, QOF_EVENT_CREATE, NULL);
do_test ((NULL != &import_obj->inst.entity), "#6 gnc event create");
obj_setName(import_obj, import_init);
do_test ((NULL != &import_obj->Name), "#7 string set");
@@ -314,7 +314,7 @@
new_obj = g_new(myobj, 1);
qof_instance_init (&new_obj->inst, TEST_MODULE_NAME, import);
obj_setGUID(new_obj,qof_instance_get_guid(&new_obj->inst));
- gnc_engine_gen_event (&new_obj->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&new_obj->inst.entity, QOF_EVENT_CREATE, NULL);
obj_setName(new_obj, import_init);
obj_setAmount(new_obj, obj_amount);
obj_setActive(new_obj, active);
@@ -334,7 +334,7 @@
target_obj = g_new(myobj, 1);
qof_instance_init (&target_obj->inst, TEST_MODULE_NAME, target);
obj_setGUID(target_obj,qof_instance_get_guid(&target_obj->inst));
- gnc_engine_gen_event (&target_obj->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen (&target_obj->inst.entity, QOF_EVENT_CREATE, NULL);
obj_setName(target_obj, target_init);
obj_setAmount(target_obj, obj_amount);
obj_setActive(target_obj, active);
Modified: gnucash/trunk/src/engine/test/test-recursive.c
===================================================================
--- gnucash/trunk/src/engine/test/test-recursive.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/engine/test/test-recursive.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -182,7 +182,7 @@
g->Amount = get_random_gnc_numeric();
g->child = NULL;
g->descend = NULL;
- gnc_engine_gen_event(&g->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen(&g->inst.entity, QOF_EVENT_CREATE, NULL);
return g;
}
@@ -203,7 +203,7 @@
g->Name = get_random_string();
g->Amount = get_random_gnc_numeric();
g->child = NULL;
- gnc_engine_gen_event(&g->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen(&g->inst.entity, QOF_EVENT_CREATE, NULL);
return g;
}
@@ -223,7 +223,7 @@
g->flag = get_random_character();
g->Name = get_random_string();
g->Amount = get_random_gnc_numeric();
- gnc_engine_gen_event(&g->inst.entity, GNC_EVENT_CREATE);
+ qof_event_gen(&g->inst.entity, QOF_EVENT_CREATE, NULL);
return g;
}
Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -843,7 +843,7 @@
gnc_gui_component_watch_entity_type (component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_widget_grab_focus (ti_dialog->account_treeview);
Modified: gnucash/trunk/src/gnome/druid-hierarchy.c
===================================================================
--- gnucash/trunk/src/gnome/druid-hierarchy.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/druid-hierarchy.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -643,7 +643,7 @@
g_object_set (G_OBJECT(cell), "text", "", NULL);
}
set_final_balance (data->balance_hash, account, amount);
- gnc_engine_gen_event ((QofEntity*)account, GNC_EVENT_MODIFY);
+ qof_event_gen ((QofEntity*)account, QOF_EVENT_MODIFY, NULL);
}
static void
Modified: gnucash/trunk/src/gnome/druid-stock-split.c
===================================================================
--- gnucash/trunk/src/gnome/druid-stock-split.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/druid-stock-split.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -746,7 +746,7 @@
gnc_gui_component_watch_entity_type (component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
if (fill_account_list (info, initial) == 0)
{
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-budget.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-budget.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-budget.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -341,11 +341,11 @@
if (changes) {
ei = gnc_gui_get_entity_events(changes, &priv->key);
if (ei) {
- if (ei->event_mask & GNC_EVENT_DESTROY) {
+ if (ei->event_mask & QOF_EVENT_DESTROY) {
gnc_plugin_page_budget_close_cb(user_data);
return;
}
- if (ei->event_mask & GNC_EVENT_MODIFY) {
+ if (ei->event_mask & QOF_EVENT_MODIFY) {
DEBUG("refreshing budget view because budget was modified");
gnc_plugin_page_budget_view_refresh(page);
}
@@ -425,7 +425,7 @@
gnc_gui_component_watch_entity (priv->component_id,
gnc_budget_get_guid(priv->budget),
- GNC_EVENT_DESTROY | GNC_EVENT_MODIFY);
+ QOF_EVENT_DESTROY | QOF_EVENT_MODIFY);
gnc_plugin_page_budget_view_refresh(page);
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -746,7 +746,7 @@
if (acct)
gnc_gui_component_watch_entity (
priv->component_manager_id, xaccAccountGetGUID(acct),
- GNC_EVENT_DESTROY | GNC_EVENT_MODIFY);
+ QOF_EVENT_DESTROY | QOF_EVENT_MODIFY);
/* DRH - Probably lots of other stuff from regWindowLedger should end up here. */
@@ -2716,11 +2716,11 @@
const EventInfo* ei;
ei = gnc_gui_get_entity_events(changes, &priv->key);
if (ei) {
- if (ei->event_mask & GNC_EVENT_DESTROY) {
+ if (ei->event_mask & QOF_EVENT_DESTROY) {
gnc_main_window_close_page(GNC_PLUGIN_PAGE(page));
return;
}
- if (ei->event_mask & GNC_EVENT_MODIFY) {
+ if (ei->event_mask & QOF_EVENT_MODIFY) {
/* CAS: We need to also handle account renames, but at
least we don't crash for those. */
}
Modified: gnucash/trunk/src/gnome/lot-viewer.c
===================================================================
--- gnucash/trunk/src/gnome/lot-viewer.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/lot-viewer.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -649,7 +649,7 @@
gnc_gui_component_watch_entity_type (component_id,
GNC_ID_LOT,
- GNC_EVENT_CREATE | GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_CREATE | QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_widget_show_all (lv->window);
gnc_window_adjust_for_screen (GTK_WINDOW(lv->window));
Modified: gnucash/trunk/src/gnome/window-reconcile.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome/window-reconcile.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -1276,7 +1276,7 @@
gnc_gui_component_watch_entity (recnData->component_id,
xaccTransGetGUID (trans),
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
break;
default:
@@ -1296,7 +1296,7 @@
gnc_gui_component_watch_entity (recnData->component_id,
&recnData->account,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
account = recn_get_account (recnData);
@@ -1329,7 +1329,7 @@
if (changes)
{
info = gnc_gui_get_entity_events (changes, &recnData->account);
- if (info && (info->event_mask & GNC_EVENT_DESTROY))
+ if (info && (info->event_mask & QOF_EVENT_DESTROY))
{
gnc_close_gui_component_by_data (WINDOW_RECONCILE_CM_CLASS, recnData);
return;
Modified: gnucash/trunk/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-search/dialog-search.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -497,7 +497,7 @@
guid, op);
/* Watch this entity so we'll refresh once it's actually changed */
- gnc_gui_component_watch_entity (sw->component_id, guid, GNC_EVENT_MODIFY);
+ gnc_gui_component_watch_entity (sw->component_id, guid, QOF_EVENT_MODIFY);
}
}
Modified: gnucash/trunk/src/gnome-search/gnc-general-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/gnc-general-search.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-search/gnc-general-search.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -196,7 +196,7 @@
if (changes) {
info = gnc_gui_get_entity_events (changes, &priv->guid);
if (info) {
- if (info->event_mask & GNC_EVENT_DESTROY)
+ if (info->event_mask & QOF_EVENT_DESTROY)
gsl->selected_item = NULL;
reset_selection_text (gsl);
}
@@ -341,7 +341,7 @@
(gsl->selected_item, get_guid)));
gnc_gui_component_watch_entity
(priv->component_id, &(priv->guid),
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
} else
priv->guid = *xaccGUIDNULL ();
}
Modified: gnucash/trunk/src/gnome-utils/account-quickfill.c
===================================================================
--- gnucash/trunk/src/gnome-utils/account-quickfill.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/account-quickfill.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -71,7 +71,7 @@
*/
static void
listen_for_account_events (GUID *guid, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data)
{
QFB *qfb = user_data;
@@ -83,7 +83,7 @@
Account *account;
GtkTreeIter iter;
- if (! (event_type & GNC_EVENT_MODIFY)) return;
+ if (! (event_type & QOF_EVENT_MODIFY)) return;
if (QSTRCMP (type, GNC_ID_ACCOUNT)) return;
col = qof_book_get_collection (qfb->book, GNC_ID_ACCOUNT);
Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -1438,7 +1438,7 @@
if (changes)
{
info = gnc_gui_get_entity_events (changes, &aw->account);
- if (info && (info->event_mask & GNC_EVENT_DESTROY))
+ if (info && (info->event_mask & QOF_EVENT_DESTROY))
{
gnc_close_gui_component (aw->component_id);
return;
@@ -1521,7 +1521,7 @@
gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
gnc_gui_component_watch_entity_type (aw->component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
return aw;
}
@@ -1712,7 +1712,7 @@
gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
gnc_gui_component_watch_entity_type (aw->component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
gtk_window_present(GTK_WINDOW(aw->dialog));
}
Modified: gnucash/trunk/src/gnome-utils/dialog-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-query-list.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/dialog-query-list.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -159,7 +159,7 @@
for (node = dql->books; node; node = node->next)
{
info = gnc_gui_get_entity_events (changes, (const GUID*)(node->data));
- if (info && (info->event_mask & GNC_EVENT_DESTROY))
+ if (info && (info->event_mask & QOF_EVENT_DESTROY))
{
gnc_close_gui_component (dql->component_id);
return;
@@ -229,7 +229,7 @@
/* and register the books */
for (node = dql->books; node; node = node->next)
gnc_gui_component_watch_entity (dql->component_id, (GUID*)node->data,
- GNC_EVENT_DESTROY);
+ QOF_EVENT_DESTROY);
return dql;
}
Modified: gnucash/trunk/src/gnome-utils/gnc-account-sel.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-account-sel.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/gnc-account-sel.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -55,7 +55,7 @@
static void gas_populate_list (GNCAccountSel *gas);
static void gas_strcmp_adapter (gpointer a, gpointer b);
static void gnc_account_sel_event_cb (GUID *entity, QofIdType id_type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data);
static void gas_new_account_click (GtkButton *b, gpointer ud);
@@ -98,12 +98,12 @@
static
void
gnc_account_sel_event_cb( GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data )
{
- if ( ! ( event_type == GNC_EVENT_CREATE
- || event_type == GNC_EVENT_MODIFY
- || event_type == GNC_EVENT_DESTROY )
+ if ( ! ( event_type == QOF_EVENT_CREATE
+ || event_type == QOF_EVENT_MODIFY
+ || event_type == QOF_EVENT_DESTROY )
|| strcmp( type, GNC_ID_ACCOUNT ) != 0 ) {
return;
}
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -991,13 +991,13 @@
* function only cares about a type of GNC_ID_BOOK.
*
* @param event_type The type of the event. This function only cares
- * about an event type of GNC_EVENT_DESTROY.
+ * about an event type of QOF_EVENT_DESTROY.
*
* @param user_data A pointer to the window data structure.
*/
static void
gnc_main_window_event_handler (GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data)
{
GncMainWindow *window;
@@ -1011,7 +1011,7 @@
/* soft failures */
if (safe_strcmp(type, GNC_ID_BOOK) != 0)
return;
- if (event_type != GNC_EVENT_DESTROY)
+ if (event_type != QOF_EVENT_DESTROY)
return;
ENTER("entity %p of type %s, event %d, window %p",
Modified: gnucash/trunk/src/gnome-utils/gnc-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-query-list.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/gnc-query-list.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -846,7 +846,7 @@
gup = priv->get_guid;
guid = (const GUID*)((gup->param_getfcn)(item->data, gup));
gnc_gui_component_watch_entity (priv->component_id, guid,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
list->num_entries++;
}
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -83,7 +83,7 @@
GtkTreeIter *iter,
GtkTreeIter *child);
static void gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data);
/** The instance private data for a commodity database tree model. */
@@ -1197,7 +1197,7 @@
*/
static void
gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data)
{
GncTreeModelCommodity *model;
@@ -1219,7 +1219,7 @@
commodity = gnc_commodity_find_commodity_by_guid(entity, gnc_get_current_book ());
name = gnc_commodity_get_mnemonic(commodity);
- if (event_type != GNC_EVENT_DESTROY) {
+ if (event_type != QOF_EVENT_DESTROY) {
if (!gnc_tree_model_commodity_get_iter_from_commodity (model, commodity, &iter)) {
LEAVE("no iter");
return;
@@ -1230,7 +1230,7 @@
namespace = gnc_commodity_find_namespace_by_guid(entity, gnc_get_current_book ());
name = gnc_commodity_namespace_get_name(namespace);
- if (event_type != GNC_EVENT_DESTROY) {
+ if (event_type != QOF_EVENT_DESTROY) {
if (!gnc_tree_model_commodity_get_iter_from_namespace (model, namespace, &iter)) {
LEAVE("no iter");
return;
@@ -1241,13 +1241,13 @@
}
switch (event_type) {
- case GNC_EVENT_ADD:
+ case QOF_EVENT_ADD:
/* Tell the filters/views where the new account was added. */
DEBUG("add %s", name);
gnc_tree_model_commodity_path_added (model, &iter);
break;
- case GNC_EVENT_REMOVE:
+ case QOF_EVENT_REMOVE:
/* Record the path of this account for later use in destruction */
DEBUG("remove %s", name);
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
@@ -1266,7 +1266,7 @@
LEAVE(" ");
return;
- case GNC_EVENT_MODIFY:
+ case QOF_EVENT_MODIFY:
DEBUG("change %s", name);
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
if (path == NULL) {
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -102,7 +102,7 @@
GtkTreeIter *iter,
GtkTreeIter *child);
static void gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data);
/** The instance private data for a price database tree model. */
@@ -1445,7 +1445,7 @@
*/
static void
gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
- GNCEngineEventType event_type,
+ QofEventId event_type,
gpointer user_data)
{
GncTreeModelPrice *model;
@@ -1467,7 +1467,7 @@
commodity = gnc_commodity_find_commodity_by_guid(entity, gnc_get_current_book ());
name = gnc_commodity_get_mnemonic(commodity);
- if (event_type != GNC_EVENT_DESTROY) {
+ if (event_type != QOF_EVENT_DESTROY) {
if (!gnc_tree_model_price_get_iter_from_commodity (model, commodity, &iter)) {
LEAVE("no iter");
return;
@@ -1478,7 +1478,7 @@
namespace = gnc_commodity_find_namespace_by_guid(entity, gnc_get_current_book ());
name = gnc_commodity_namespace_get_name(namespace);
- if (event_type != GNC_EVENT_DESTROY) {
+ if (event_type != QOF_EVENT_DESTROY) {
if (!gnc_tree_model_price_get_iter_from_namespace (model, namespace, &iter)) {
LEAVE("no iter");
return;
@@ -1489,7 +1489,7 @@
price = gnc_price_lookup(entity, gnc_get_current_book ());
name = "price";
- if (event_type != GNC_EVENT_DESTROY) {
+ if (event_type != QOF_EVENT_DESTROY) {
if (!gnc_tree_model_price_get_iter_from_price (model, price, &iter)) {
LEAVE("no iter");
return;
@@ -1500,13 +1500,13 @@
}
switch (event_type) {
- case GNC_EVENT_ADD:
+ case QOF_EVENT_ADD:
/* Tell the filters/views where the new account was added. */
DEBUG("add %s", name);
gnc_tree_model_price_path_added (model, &iter);
break;
- case GNC_EVENT_REMOVE:
+ case QOF_EVENT_REMOVE:
/* Record the path of this account for later use in destruction */
DEBUG("remove %s", name);
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
@@ -1525,7 +1525,7 @@
LEAVE(" ");
return;
- case GNC_EVENT_MODIFY:
+ case QOF_EVENT_MODIFY:
DEBUG("change %s", name);
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
if (path == NULL) {
Modified: gnucash/trunk/src/gnome-utils/window-main-summarybar.c
===================================================================
--- gnucash/trunk/src/gnome-utils/window-main-summarybar.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/gnome-utils/window-main-summarybar.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -489,7 +489,7 @@
NULL, retval);
gnc_gui_component_watch_entity_type (retval->component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
for ( i = 0; i < N_COLUMNS; i++ )
{
Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2006-03-09 03:33:00 UTC (rev 13546)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2006-03-09 03:48:49 UTC (rev 13547)
@@ -508,7 +508,7 @@
gnc_gui_component_watch_entity_type (ld->component_id,
GNC_ID_ACCOUNT,
- GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
+ QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
for (node = splits; node; node = node->next)
{
@@ -517,7 +517,7 @@
gnc_gui_component_watch_entity (ld->component_id,
xaccTransGetGUID (trans),
- GNC_EVENT_MODIFY);
+ QOF_EVENT_MODIFY);
}
}
@@ -547,7 +547,7 @@
if (changes && has_leader)
{
info = gnc_gui_get_entity_events (changes, &ld->leader);
- if (info && (info->event_mask & GNC_EVENT_DESTROY))
+ if (info && (info->event_mask & QOF_EVENT_DESTROY))
{
gnc_close_gui_component (ld->component_id);
return;
More information about the gnucash-changes
mailing list