mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove more functions to be deprecated in libqof2. (Pass Two - more
trivial substitutions, some simple translations.) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13547 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
db890792bb
commit
61a12b2715
@ -1,7 +1,11 @@
|
|||||||
2006-03-08 David Hampton <hampton@employees.org>
|
2006-03-08 David Hampton <hampton@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
|
* numerous: Remove functions to be deprecated in libqof2. (Pass
|
||||||
One - trivial substitutions)
|
One - trivial substitutions.)
|
||||||
|
|
||||||
* src/gnome-utils/gnc-tree-model-account.c:
|
* src/gnome-utils/gnc-tree-model-account.c:
|
||||||
* src/engine/Account.c:
|
* src/engine/Account.c:
|
||||||
|
@ -179,7 +179,7 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Log a serious error */
|
/** Log a serious error */
|
||||||
#define PERR(format, args...) do { \
|
#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, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
|
||||||
"Error: %s(): " format, FUNK , ## args); \
|
"Error: %s(): " format, FUNK , ## args); \
|
||||||
} \
|
} \
|
||||||
@ -187,7 +187,7 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Log a warning */
|
/** Log a warning */
|
||||||
#define PWARN(format, args...) do { \
|
#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, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \
|
||||||
"Warning: %s(): " format, FUNK , ## args); \
|
"Warning: %s(): " format, FUNK , ## args); \
|
||||||
} \
|
} \
|
||||||
@ -195,7 +195,7 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Print an informational note */
|
/** Print an informational note */
|
||||||
#define PINFO(format, args...) do { \
|
#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, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \
|
||||||
"Info: %s(): " format, \
|
"Info: %s(): " format, \
|
||||||
FUNK , ## args); \
|
FUNK , ## args); \
|
||||||
@ -204,7 +204,7 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Print a debugging message */
|
/** Print a debugging message */
|
||||||
#define DEBUG(format, args...) do { \
|
#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, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||||
"Debug: %s(): " format, \
|
"Debug: %s(): " format, \
|
||||||
FUNK , ## args); \
|
FUNK , ## args); \
|
||||||
@ -213,7 +213,7 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Print a function entry debugging message */
|
/** Print a function entry debugging message */
|
||||||
#define ENTER(format, args...) do { \
|
#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, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||||
"Enter in %s: %s()" format, __FILE__, \
|
"Enter in %s: %s()" format, __FILE__, \
|
||||||
FUNK , ## args); \
|
FUNK , ## args); \
|
||||||
@ -223,7 +223,7 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Print a function exit debugging message */
|
/** Print a function exit debugging message */
|
||||||
#define LEAVE(format, args...) do { \
|
#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(); \
|
qof_log_drop_indent(); \
|
||||||
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||||
"Leave: %s()" format, \
|
"Leave: %s()" format, \
|
||||||
@ -233,14 +233,14 @@ gint qof_log_module_count(void);
|
|||||||
|
|
||||||
/** Print a function trace debugging message */
|
/** Print a function trace debugging message */
|
||||||
#define TRACE(format, args...) do { \
|
#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, \
|
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||||
"Trace: %s(): " format, FUNK , ## args); \
|
"Trace: %s(): " format, FUNK , ## args); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DEBUGCMD(x) do { \
|
#define DEBUGCMD(x) do { \
|
||||||
if (qof_log_check (log_module, GNC_LOG_DEBUG)) { \
|
if (qof_log_check (log_module, QOF_LOG_DEBUG)) { \
|
||||||
(x); \
|
(x); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
@ -267,22 +267,22 @@ void qof_report_clock_total (int clockno,
|
|||||||
|
|
||||||
/** start a particular timer */
|
/** start a particular timer */
|
||||||
#define START_CLOCK(clockno,format, args...) do { \
|
#define START_CLOCK(clockno,format, args...) do { \
|
||||||
if (qof_log_check (log_module, GNC_LOG_INFO)) \
|
if (qof_log_check (log_module, QOF_LOG_INFO)) \
|
||||||
qof_start_clock (clockno, log_module, GNC_LOG_INFO, \
|
qof_start_clock (clockno, log_module, QOF_LOG_INFO, \
|
||||||
__FUNCTION__, format , ## args); \
|
__FUNCTION__, format , ## args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/** report elapsed time since last report on a particular timer */
|
/** report elapsed time since last report on a particular timer */
|
||||||
#define REPORT_CLOCK(clockno,format, args...) do { \
|
#define REPORT_CLOCK(clockno,format, args...) do { \
|
||||||
if (qof_log_check (log_module, GNC_LOG_INFO)) \
|
if (qof_log_check (log_module, QOF_LOG_INFO)) \
|
||||||
qof_report_clock (clockno, log_module, GNC_LOG_INFO, \
|
qof_report_clock (clockno, log_module, QOF_LOG_INFO, \
|
||||||
__FUNCTION__, format , ## args); \
|
__FUNCTION__, format , ## args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/** report total elapsed time since timer started */
|
/** report total elapsed time since timer started */
|
||||||
#define REPORT_CLOCK_TOTAL(clockno,format, args...) do { \
|
#define REPORT_CLOCK_TOTAL(clockno,format, args...) do { \
|
||||||
if (qof_log_check (log_module, GNC_LOG_INFO)) \
|
if (qof_log_check (log_module, QOF_LOG_INFO)) \
|
||||||
qof_report_clock_total (clockno, log_module, GNC_LOG_INFO, \
|
qof_report_clock_total (clockno, log_module, QOF_LOG_INFO, \
|
||||||
__FUNCTION__, format , ## args); \
|
__FUNCTION__, format , ## args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GNCIdType entity_type;
|
GNCIdType entity_type;
|
||||||
GNCEngineEventType event_mask;
|
QofEventId event_mask;
|
||||||
} EntityTypeEventInfo;
|
} EntityTypeEventInfo;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -108,12 +108,12 @@ dump_components (void)
|
|||||||
static void
|
static void
|
||||||
clear_mask_hash_helper (gpointer key, gpointer value, gpointer user_data)
|
clear_mask_hash_helper (gpointer key, gpointer value, gpointer user_data)
|
||||||
{
|
{
|
||||||
GNCEngineEventType * et = value;
|
QofEventId * et = value;
|
||||||
|
|
||||||
*et = 0;
|
*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
|
* where the values are g_malloced and the keys are in the engine
|
||||||
* string cache. */
|
* string cache. */
|
||||||
static void
|
static void
|
||||||
@ -183,7 +183,7 @@ clear_event_info (ComponentEventInfo *cei)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
add_event (ComponentEventInfo *cei, const GUID *entity,
|
add_event (ComponentEventInfo *cei, const GUID *entity,
|
||||||
GNCEngineEventType event_mask, gboolean or_in)
|
QofEventId event_mask, gboolean or_in)
|
||||||
{
|
{
|
||||||
GHashTable *hash;
|
GHashTable *hash;
|
||||||
|
|
||||||
@ -234,9 +234,9 @@ add_event (ComponentEventInfo *cei, const GUID *entity,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
add_event_type (ComponentEventInfo *cei, GNCIdTypeConst entity_type,
|
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);
|
||||||
g_return_if_fail (cei->event_masks);
|
g_return_if_fail (cei->event_masks);
|
||||||
@ -246,7 +246,7 @@ add_event_type (ComponentEventInfo *cei, GNCIdTypeConst entity_type,
|
|||||||
if (!mask)
|
if (!mask)
|
||||||
{
|
{
|
||||||
char * key = gnc_string_cache_insert ((gpointer) entity_type);
|
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);
|
g_hash_table_insert (cei->event_masks, key, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ add_event_type (ComponentEventInfo *cei, GNCIdTypeConst entity_type,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_cm_event_handler (GUID *entity, QofIdType type,
|
gnc_cm_event_handler (GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
#if CM_DEBUG
|
#if CM_DEBUG
|
||||||
@ -274,7 +274,7 @@ gnc_cm_event_handler (GUID *entity, QofIdType type,
|
|||||||
/* split events are never generated by the engine, but might
|
/* split events are never generated by the engine, but might
|
||||||
* be generated by a backend (viz. the postgres backend.)
|
* be generated by a backend (viz. the postgres backend.)
|
||||||
* Handle them like a transaction modify event. */
|
* 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
|
else
|
||||||
add_event_type (&changes, type, event_type, TRUE);
|
add_event_type (&changes, type, event_type, TRUE);
|
||||||
@ -482,7 +482,7 @@ gnc_register_gui_component_scm (const char * component_class,
|
|||||||
void
|
void
|
||||||
gnc_gui_component_watch_entity (gint component_id,
|
gnc_gui_component_watch_entity (gint component_id,
|
||||||
const GUID *entity,
|
const GUID *entity,
|
||||||
GNCEngineEventType event_mask)
|
QofEventId event_mask)
|
||||||
{
|
{
|
||||||
ComponentInfo *ci;
|
ComponentInfo *ci;
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ gnc_gui_component_watch_entity (gint component_id,
|
|||||||
void
|
void
|
||||||
gnc_gui_component_watch_entity_direct (gint component_id,
|
gnc_gui_component_watch_entity_direct (gint component_id,
|
||||||
GUID entity,
|
GUID entity,
|
||||||
GNCEngineEventType event_mask)
|
QofEventId event_mask)
|
||||||
{
|
{
|
||||||
gnc_gui_component_watch_entity (component_id, &entity, event_mask);
|
gnc_gui_component_watch_entity (component_id, &entity, event_mask);
|
||||||
}
|
}
|
||||||
@ -510,7 +510,7 @@ gnc_gui_component_watch_entity_direct (gint component_id,
|
|||||||
void
|
void
|
||||||
gnc_gui_component_watch_entity_type (gint component_id,
|
gnc_gui_component_watch_entity_type (gint component_id,
|
||||||
GNCIdTypeConst entity_type,
|
GNCIdTypeConst entity_type,
|
||||||
GNCEngineEventType event_mask)
|
QofEventId event_mask)
|
||||||
{
|
{
|
||||||
ComponentInfo *ci;
|
ComponentInfo *ci;
|
||||||
|
|
||||||
@ -528,7 +528,7 @@ const EventInfo *
|
|||||||
gnc_gui_get_entity_events (GHashTable *changes, const GUID *entity)
|
gnc_gui_get_entity_events (GHashTable *changes, const GUID *entity)
|
||||||
{
|
{
|
||||||
if (!changes || !entity)
|
if (!changes || !entity)
|
||||||
return GNC_EVENT_NONE;
|
return QOF_EVENT_NONE;
|
||||||
|
|
||||||
return g_hash_table_lookup (changes, entity);
|
return g_hash_table_lookup (changes, entity);
|
||||||
}
|
}
|
||||||
@ -648,8 +648,8 @@ match_type_helper (gpointer key, gpointer value, gpointer user_data)
|
|||||||
{
|
{
|
||||||
ComponentEventInfo *cei = user_data;
|
ComponentEventInfo *cei = user_data;
|
||||||
GNCIdType id_type = key;
|
GNCIdType id_type = key;
|
||||||
GNCEngineEventType * et = value;
|
QofEventId * et = value;
|
||||||
GNCEngineEventType * et_2;
|
QofEventId * et_2;
|
||||||
|
|
||||||
et_2 = g_hash_table_lookup (cei->event_masks, id_type);
|
et_2 = g_hash_table_lookup (cei->event_masks, id_type);
|
||||||
if (!et_2)
|
if (!et_2)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GNCEngineEventType event_mask;
|
QofEventId event_mask;
|
||||||
} EventInfo;
|
} EventInfo;
|
||||||
|
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ typedef struct
|
|||||||
* Notes on dealing with destroyed entities: As stated above, entities
|
* Notes on dealing with destroyed entities: As stated above, entities
|
||||||
* in the changes GHashTable may no longer exist. So how can you
|
* 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
|
* 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
|
* 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. 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
|
* entity has already been destroyed? You're not. So, you have to
|
||||||
@ -191,7 +191,7 @@ void gnc_gui_component_set_session (gint component_id, gpointer session);
|
|||||||
*/
|
*/
|
||||||
void gnc_gui_component_watch_entity (gint component_id,
|
void gnc_gui_component_watch_entity (gint component_id,
|
||||||
const GUID *entity,
|
const GUID *entity,
|
||||||
GNCEngineEventType event_mask);
|
QofEventId event_mask);
|
||||||
|
|
||||||
/* gnc_gui_component_watch_entity_direct
|
/* gnc_gui_component_watch_entity_direct
|
||||||
* Add an entity to the list of those being watched by the component.
|
* Add an entity to the list of those being watched by the component.
|
||||||
@ -204,7 +204,7 @@ void gnc_gui_component_watch_entity (gint component_id,
|
|||||||
*/
|
*/
|
||||||
void gnc_gui_component_watch_entity_direct (gint component_id,
|
void gnc_gui_component_watch_entity_direct (gint component_id,
|
||||||
GUID entity,
|
GUID entity,
|
||||||
GNCEngineEventType event_mask);
|
QofEventId event_mask);
|
||||||
|
|
||||||
/* gnc_gui_component_watch_entity_type
|
/* gnc_gui_component_watch_entity_type
|
||||||
* Watch all entities of a particular type.
|
* Watch all entities of a particular type.
|
||||||
@ -217,7 +217,7 @@ void gnc_gui_component_watch_entity_direct (gint component_id,
|
|||||||
*/
|
*/
|
||||||
void gnc_gui_component_watch_entity_type (gint component_id,
|
void gnc_gui_component_watch_entity_type (gint component_id,
|
||||||
GNCIdTypeConst entity_type,
|
GNCIdTypeConst entity_type,
|
||||||
GNCEngineEventType event_mask);
|
QofEventId event_mask);
|
||||||
|
|
||||||
/* gnc_gui_get_entity_events
|
/* gnc_gui_get_entity_events
|
||||||
* Return the event info of the events which have been generated by
|
* Return the event info of the events which have been generated by
|
||||||
|
@ -131,7 +131,7 @@ pgendEventsPending (QofBackend *bend)
|
|||||||
|
|
||||||
typedef struct _event {
|
typedef struct _event {
|
||||||
Timespec stamp;
|
Timespec stamp;
|
||||||
GNCEngineEventType type;
|
QofEventId type;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
QofIdType obj_type;
|
QofIdType obj_type;
|
||||||
} Event;
|
} Event;
|
||||||
@ -145,7 +145,7 @@ get_event_cb (PGBackend *be, PGresult *result, int j, gpointer data)
|
|||||||
Event *ev = NULL;
|
Event *ev = NULL;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
Timespec ts;
|
Timespec ts;
|
||||||
GNCEngineEventType type;
|
QofEventId type;
|
||||||
char change = (DB_GET_VAL("change",j))[0];
|
char change = (DB_GET_VAL("change",j))[0];
|
||||||
char objtype = (DB_GET_VAL("objtype",j))[0];
|
char objtype = (DB_GET_VAL("objtype",j))[0];
|
||||||
QofIdType obj_type = GNC_ID_NONE;
|
QofIdType obj_type = GNC_ID_NONE;
|
||||||
@ -156,9 +156,9 @@ get_event_cb (PGBackend *be, PGresult *result, int j, gpointer data)
|
|||||||
/* convert from SQL type to engine type */
|
/* convert from SQL type to engine type */
|
||||||
switch (change)
|
switch (change)
|
||||||
{
|
{
|
||||||
case 'a': type = GNC_EVENT_CREATE; break;
|
case 'a': type = QOF_EVENT_CREATE; break;
|
||||||
case 'm': type = GNC_EVENT_MODIFY; break;
|
case 'm': type = QOF_EVENT_MODIFY; break;
|
||||||
case 'd': type = GNC_EVENT_DESTROY; break;
|
case 'd': type = QOF_EVENT_DESTROY; break;
|
||||||
default:
|
default:
|
||||||
PERR ("unknown change type %c for guid=%s", change, guid_str);
|
PERR ("unknown change type %c for guid=%s", change, guid_str);
|
||||||
return data;
|
return data;
|
||||||
@ -287,8 +287,8 @@ pgendProcessEvents (QofBackend *bend)
|
|||||||
default:
|
default:
|
||||||
PERR ("account: cant' happen !!!!!!!");
|
PERR ("account: cant' happen !!!!!!!");
|
||||||
break;
|
break;
|
||||||
case GNC_EVENT_CREATE:
|
case QOF_EVENT_CREATE:
|
||||||
case GNC_EVENT_MODIFY: {
|
case QOF_EVENT_MODIFY: {
|
||||||
Account *acc;
|
Account *acc;
|
||||||
|
|
||||||
/* if the remote user created an account, mirror it here */
|
/* if the remote user created an account, mirror it here */
|
||||||
@ -297,7 +297,7 @@ pgendProcessEvents (QofBackend *bend)
|
|||||||
ent = (QofEntity*)acc;
|
ent = (QofEntity*)acc;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GNC_EVENT_DESTROY: {
|
case QOF_EVENT_DESTROY: {
|
||||||
Account * acc = pgendAccountLookup (be, &(ev->guid));
|
Account * acc = pgendAccountLookup (be, &(ev->guid));
|
||||||
AccountGroup *topgrp = xaccAccountGetRoot(acc);
|
AccountGroup *topgrp = xaccAccountGetRoot(acc);
|
||||||
xaccAccountBeginEdit (acc);
|
xaccAccountBeginEdit (acc);
|
||||||
@ -320,7 +320,7 @@ pgendProcessEvents (QofBackend *bend)
|
|||||||
default:
|
default:
|
||||||
PERR ("transaction: cant' happen !!!!!!!");
|
PERR ("transaction: cant' happen !!!!!!!");
|
||||||
break;
|
break;
|
||||||
case GNC_EVENT_CREATE: {
|
case QOF_EVENT_CREATE: {
|
||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
/* don't mirror transaction creations. If a register needs
|
/* don't mirror transaction creations. If a register needs
|
||||||
* it, it will do a query. */
|
* it, it will do a query. */
|
||||||
@ -329,14 +329,14 @@ pgendProcessEvents (QofBackend *bend)
|
|||||||
PINFO ("create transaction");
|
PINFO ("create transaction");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GNC_EVENT_MODIFY: {
|
case QOF_EVENT_MODIFY: {
|
||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
trans = pgendTransLookup (be, &(ev->guid));
|
trans = pgendTransLookup (be, &(ev->guid));
|
||||||
pgendCopyTransactionToEngine (be, &(ev->guid));
|
pgendCopyTransactionToEngine (be, &(ev->guid));
|
||||||
ent = (QofEntity*)trans;
|
ent = (QofEntity*)trans;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GNC_EVENT_DESTROY: {
|
case QOF_EVENT_DESTROY: {
|
||||||
Transaction *trans = pgendTransLookup (be, &(ev->guid));
|
Transaction *trans = pgendTransLookup (be, &(ev->guid));
|
||||||
xaccTransBeginEdit (trans);
|
xaccTransBeginEdit (trans);
|
||||||
/* mark trans for freeing */
|
/* mark trans for freeing */
|
||||||
@ -375,7 +375,7 @@ pgendProcessEvents (QofBackend *bend)
|
|||||||
local_obj_type = pgendGUIDType (be, &(ev->guid));
|
local_obj_type = pgendGUIDType (be, &(ev->guid));
|
||||||
if (GNC_ID_NONE != local_obj_type)
|
if (GNC_ID_NONE != local_obj_type)
|
||||||
{
|
{
|
||||||
gnc_engine_gen_event(ent, GNC_EVENT_CREATE);
|
qof_event_gen(ent, QOF_EVENT_CREATE, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -383,11 +383,11 @@ pgendProcessEvents (QofBackend *bend)
|
|||||||
local_obj_type = pgendGUIDType (be, &(ev->guid));
|
local_obj_type = pgendGUIDType (be, &(ev->guid));
|
||||||
if (GNC_ID_NONE != local_obj_type)
|
if (GNC_ID_NONE != local_obj_type)
|
||||||
{
|
{
|
||||||
gnc_engine_gen_event(ent, GNC_EVENT_MODIFY);
|
qof_event_gen(ent, QOF_EVENT_MODIFY, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gnc_engine_gen_event(ent, GNC_EVENT_DESTROY);
|
qof_event_gen(ent, QOF_EVENT_DESTROY, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ void mark_address (GncAddress *address)
|
|||||||
{
|
{
|
||||||
address->dirty = TRUE;
|
address->dirty = TRUE;
|
||||||
|
|
||||||
gnc_engine_gen_event (address->parent, GNC_EVENT_MODIFY);
|
qof_event_gen (address->parent, QOF_EVENT_MODIFY, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create/Destroy functions */
|
/* Create/Destroy functions */
|
||||||
|
@ -86,7 +86,7 @@ mark_term (GncBillTerm *term)
|
|||||||
{
|
{
|
||||||
term->inst.dirty = TRUE;
|
term->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (term->inst.entity.collection);
|
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)
|
static inline void maybe_resort_list (GncBillTerm *term)
|
||||||
@ -141,7 +141,7 @@ GncBillTerm * gncBillTermCreate (QofBook *book)
|
|||||||
term->desc = CACHE_INSERT ("");
|
term->desc = CACHE_INSERT ("");
|
||||||
term->discount = gnc_numeric_zero ();
|
term->discount = gnc_numeric_zero ();
|
||||||
addObj (term);
|
addObj (term);
|
||||||
gnc_engine_gen_event (&term->inst.entity, GNC_EVENT_CREATE);
|
qof_event_gen (&term->inst.entity, QOF_EVENT_CREATE, NULL);
|
||||||
return term;
|
return term;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ static void gncBillTermFree (GncBillTerm *term)
|
|||||||
|
|
||||||
if (!term) return;
|
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->name);
|
||||||
CACHE_REMOVE (term->desc);
|
CACHE_REMOVE (term->desc);
|
||||||
remObj (term);
|
remObj (term);
|
||||||
@ -229,7 +229,7 @@ gncCloneBillTerm (GncBillTerm *from, QofBook *book)
|
|||||||
}
|
}
|
||||||
|
|
||||||
addObj (term);
|
addObj (term);
|
||||||
gnc_engine_gen_event (&term->inst.entity, GNC_EVENT_CREATE);
|
qof_event_gen (&term->inst.entity, QOF_EVENT_CREATE, NULL);
|
||||||
return term;
|
return term;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void mark_customer (GncCustomer *customer)
|
|||||||
{
|
{
|
||||||
customer->inst.dirty = TRUE;
|
customer->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (customer->inst.entity.collection);
|
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 @@ GncCustomer *gncCustomerCreate (QofBook *book)
|
|||||||
cust->credit = gnc_numeric_zero();
|
cust->credit = gnc_numeric_zero();
|
||||||
cust->shipaddr = gncAddressCreate (book, &cust->inst.entity);
|
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;
|
return cust;
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ gncCloneCustomer (GncCustomer *from, QofBook *book)
|
|||||||
cust->jobs = g_list_prepend(cust->jobs, job);
|
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;
|
return cust;
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ static void gncCustomerFree (GncCustomer *cust)
|
|||||||
{
|
{
|
||||||
if (!cust) return;
|
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->id);
|
||||||
CACHE_REMOVE (cust->name);
|
CACHE_REMOVE (cust->name);
|
||||||
@ -341,7 +341,7 @@ void gncCustomerAddJob (GncCustomer *cust, GncJob *job)
|
|||||||
cust->jobs = g_list_insert_sorted (cust->jobs, job,
|
cust->jobs = g_list_insert_sorted (cust->jobs, job,
|
||||||
(GCompareFunc)gncJobCompare);
|
(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)
|
void gncCustomerRemoveJob (GncCustomer *cust, GncJob *job)
|
||||||
@ -358,7 +358,7 @@ void gncCustomerRemoveJob (GncCustomer *cust, GncJob *job)
|
|||||||
cust->jobs = g_list_remove_link (cust->jobs, node);
|
cust->jobs = g_list_remove_link (cust->jobs, node);
|
||||||
g_list_free_1 (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)
|
void gncCustomerBeginEdit (GncCustomer *cust)
|
||||||
|
@ -63,7 +63,7 @@ void mark_employee (GncEmployee *employee)
|
|||||||
{
|
{
|
||||||
employee->inst.dirty = TRUE;
|
employee->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (employee->inst.entity.collection);
|
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 @@ GncEmployee *gncEmployeeCreate (QofBook *book)
|
|||||||
employee->rate = gnc_numeric_zero();
|
employee->rate = gnc_numeric_zero();
|
||||||
employee->active = TRUE;
|
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;
|
return employee;
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ static void gncEmployeeFree (GncEmployee *employee)
|
|||||||
{
|
{
|
||||||
if (!employee) return;
|
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->id);
|
||||||
CACHE_REMOVE (employee->username);
|
CACHE_REMOVE (employee->username);
|
||||||
@ -137,7 +137,7 @@ gncCloneEmployee (GncEmployee *from, QofBook *book)
|
|||||||
employee->ccard_acc =
|
employee->ccard_acc =
|
||||||
GNC_ACCOUNT(qof_instance_lookup_twin(QOF_INSTANCE(from->ccard_acc), book));
|
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;
|
return employee;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ void mark_entry (GncEntry *entry)
|
|||||||
{
|
{
|
||||||
entry->inst.dirty = TRUE;
|
entry->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (entry->inst.entity.collection);
|
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 @@ GncEntry *gncEntryCreate (QofBook *book)
|
|||||||
|
|
||||||
entry->values_dirty = TRUE;
|
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;
|
return entry;
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ static void gncEntryFree (GncEntry *entry)
|
|||||||
{
|
{
|
||||||
if (!entry) return;
|
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->desc);
|
||||||
CACHE_REMOVE (entry->action);
|
CACHE_REMOVE (entry->action);
|
||||||
@ -560,8 +560,8 @@ void gncEntrySetOrder (GncEntry *entry, GncOrder *order)
|
|||||||
|
|
||||||
/* Generate an event modifying the Order's end-owner */
|
/* Generate an event modifying the Order's end-owner */
|
||||||
#if 0
|
#if 0
|
||||||
gnc_engine_gen_event (gncOwnerGetEndGUID (gncOrderGetOwner (order)),
|
qof_event_gen (gncOwnerGetEndGUID (gncOrderGetOwner (order)),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ mark_invoice (GncInvoice *invoice)
|
|||||||
{
|
{
|
||||||
invoice->inst.dirty = TRUE;
|
invoice->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (invoice->inst.entity.collection);
|
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 @@ GncInvoice *gncInvoiceCreate (QofBook *book)
|
|||||||
|
|
||||||
invoice->to_charge_amount = gnc_numeric_zero();
|
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;
|
return invoice;
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ static void gncInvoiceFree (GncInvoice *invoice)
|
|||||||
{
|
{
|
||||||
if (!invoice) return;
|
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->id);
|
||||||
CACHE_REMOVE (invoice->notes);
|
CACHE_REMOVE (invoice->notes);
|
||||||
@ -195,7 +195,7 @@ XXX not done */
|
|||||||
GNCLot * posted_lot;
|
GNCLot * posted_lot;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_CREATE);
|
qof_event_gen (&invoice->inst.entity, QOF_EVENT_CREATE, NULL);
|
||||||
|
|
||||||
return invoice;
|
return invoice;
|
||||||
}
|
}
|
||||||
@ -1381,7 +1381,7 @@ gncOwnerApplyPayment (GncOwner *owner, GncInvoice* invoice,
|
|||||||
/* Now send an event for the invoice so it gets updated as paid */
|
/* Now send an event for the invoice so it gets updated as paid */
|
||||||
this_invoice = gncInvoiceGetInvoiceFromLot(lot);
|
this_invoice = gncInvoiceGetInvoiceFromLot(lot);
|
||||||
if (this_invoice)
|
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))
|
if (gnc_numeric_zero_p (amount))
|
||||||
break;
|
break;
|
||||||
|
@ -58,7 +58,7 @@ void mark_job (GncJob *job)
|
|||||||
{
|
{
|
||||||
job->inst.dirty = TRUE;
|
job->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (job->inst.entity.collection);
|
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 @@ GncJob *gncJobCreate (QofBook *book)
|
|||||||
job->active = TRUE;
|
job->active = TRUE;
|
||||||
|
|
||||||
/* GncOwner not initialized */
|
/* 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;
|
return job;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ gncCloneJob (GncJob *from, QofBook *book)
|
|||||||
|
|
||||||
job->owner = gncCloneOwner(&from->owner, book);
|
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;
|
return job;
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ static void gncJobFree (GncJob *job)
|
|||||||
{
|
{
|
||||||
if (!job) return;
|
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->id);
|
||||||
CACHE_REMOVE (job->name);
|
CACHE_REMOVE (job->name);
|
||||||
|
@ -72,7 +72,7 @@ void mark_order (GncOrder *order)
|
|||||||
{
|
{
|
||||||
order->inst.dirty = TRUE;
|
order->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (order->inst.entity.collection);
|
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 @@ GncOrder *gncOrderCreate (QofBook *book)
|
|||||||
|
|
||||||
order->active = TRUE;
|
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;
|
return order;
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ static void gncOrderFree (GncOrder *order)
|
|||||||
{
|
{
|
||||||
if (!order) return;
|
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);
|
g_list_free (order->entries);
|
||||||
CACHE_REMOVE (order->id);
|
CACHE_REMOVE (order->id);
|
||||||
@ -153,7 +153,7 @@ gncCloneOrder (GncOrder *from, QofBook *book)
|
|||||||
order->entries = g_list_prepend (order->entries, entry);
|
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;
|
return order;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ mark_table (GncTaxTable *table)
|
|||||||
{
|
{
|
||||||
table->inst.dirty = TRUE;
|
table->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (table->inst.entity.collection);
|
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
|
static inline void
|
||||||
@ -213,7 +213,7 @@ gncTaxTableCreate (QofBook *book)
|
|||||||
qof_instance_init (&table->inst, _GNC_MOD_NAME, book);
|
qof_instance_init (&table->inst, _GNC_MOD_NAME, book);
|
||||||
table->name = CACHE_INSERT ("");
|
table->name = CACHE_INSERT ("");
|
||||||
addObj (table);
|
addObj (table);
|
||||||
gnc_engine_gen_event (&table->inst.entity, GNC_EVENT_CREATE);
|
qof_event_gen (&table->inst.entity, QOF_EVENT_CREATE, NULL);
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ gncCloneTaxTable (GncTaxTable *from, QofBook *book)
|
|||||||
}
|
}
|
||||||
|
|
||||||
addObj (table);
|
addObj (table);
|
||||||
gnc_engine_gen_event (&table->inst.entity, GNC_EVENT_CREATE);
|
qof_event_gen (&table->inst.entity, QOF_EVENT_CREATE, NULL);
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ gncTaxTableFree (GncTaxTable *table)
|
|||||||
|
|
||||||
if (!table) return;
|
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);
|
CACHE_REMOVE (table->name);
|
||||||
remObj (table);
|
remObj (table);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ void mark_vendor (GncVendor *vendor)
|
|||||||
{
|
{
|
||||||
vendor->inst.dirty = TRUE;
|
vendor->inst.dirty = TRUE;
|
||||||
qof_collection_mark_dirty (vendor->inst.entity.collection);
|
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 @@ GncVendor *gncVendorCreate (QofBook *book)
|
|||||||
vendor->active = TRUE;
|
vendor->active = TRUE;
|
||||||
vendor->jobs = NULL;
|
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;
|
return vendor;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ static void gncVendorFree (GncVendor *vendor)
|
|||||||
{
|
{
|
||||||
if (!vendor) return;
|
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->id);
|
||||||
CACHE_REMOVE (vendor->name);
|
CACHE_REMOVE (vendor->name);
|
||||||
@ -162,7 +162,7 @@ gncCloneVendor (GncVendor *from, QofBook *book)
|
|||||||
vendor->jobs = g_list_prepend(vendor->jobs, job);
|
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;
|
return vendor;
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ void gncVendorAddJob (GncVendor *vendor, GncJob *job)
|
|||||||
vendor->jobs = g_list_insert_sorted (vendor->jobs, job,
|
vendor->jobs = g_list_insert_sorted (vendor->jobs, job,
|
||||||
(GCompareFunc)gncJobCompare);
|
(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)
|
void gncVendorRemoveJob (GncVendor *vendor, GncJob *job)
|
||||||
@ -415,7 +415,7 @@ void gncVendorRemoveJob (GncVendor *vendor, GncJob *job)
|
|||||||
g_list_free_1 (node);
|
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)
|
void gncVendorBeginEdit (GncVendor *vendor)
|
||||||
|
@ -513,7 +513,7 @@ make_generic_optionmenu (GtkWidget *omenu, GNCBook *book,
|
|||||||
if (type_name)
|
if (type_name)
|
||||||
gnc_gui_component_watch_entity_type (omd->component_id,
|
gnc_gui_component_watch_entity_type (omd->component_id,
|
||||||
type_name,
|
type_name,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (omenu), "destroy",
|
g_signal_connect (G_OBJECT (omenu), "destroy",
|
||||||
G_CALLBACK (generic_omenu_destroy_cb), omd);
|
G_CALLBACK (generic_omenu_destroy_cb), omd);
|
||||||
|
@ -544,7 +544,7 @@ billterms_window_refresh (BillTermsWindow *btw)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity (btw->component_id,
|
gnc_gui_component_watch_entity (btw->component_id,
|
||||||
gncBillTermGetGUID (term),
|
gncBillTermGetGUID (term),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
|
|
||||||
row_text[0] = (char *)gncBillTermGetName (term);
|
row_text[0] = (char *)gncBillTermGetName (term);
|
||||||
row_text[1] = NULL;
|
row_text[1] = NULL;
|
||||||
@ -558,7 +558,7 @@ billterms_window_refresh (BillTermsWindow *btw)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (btw->component_id,
|
gnc_gui_component_watch_entity_type (btw->component_id,
|
||||||
GNC_BILLTERM_MODULE_NAME,
|
GNC_BILLTERM_MODULE_NAME,
|
||||||
GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
|
QOF_EVENT_CREATE | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
if (vadjustment) {
|
if (vadjustment) {
|
||||||
save_value = CLAMP (save_value, vadjustment->lower,
|
save_value = CLAMP (save_value, vadjustment->lower,
|
||||||
|
@ -405,7 +405,7 @@ gnc_customer_window_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
/* Next, close if this is a destroy event */
|
/* Next, close if this is a destroy event */
|
||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &cw->customer_guid);
|
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);
|
gnc_close_gui_component (cw->component_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -620,7 +620,7 @@ gnc_customer_new_window (GNCBook *bookp, GncCustomer *cust)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (cw->component_id,
|
gnc_gui_component_watch_entity_type (cw->component_id,
|
||||||
GNC_CUSTOMER_MODULE_NAME,
|
GNC_CUSTOMER_MODULE_NAME,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
gtk_widget_show_all (cw->dialog);
|
gtk_widget_show_all (cw->dialog);
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ gnc_employee_window_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
/* Next, close if this is a destroy event */
|
/* Next, close if this is a destroy event */
|
||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &ew->employee_guid);
|
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);
|
gnc_close_gui_component (ew->component_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -556,7 +556,7 @@ gnc_employee_new_window (GNCBook *bookp,
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (ew->component_id,
|
gnc_gui_component_watch_entity_type (ew->component_id,
|
||||||
GNC_EMPLOYEE_MODULE_NAME,
|
GNC_EMPLOYEE_MODULE_NAME,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
gtk_widget_show_all (ew->dialog);
|
gtk_widget_show_all (ew->dialog);
|
||||||
|
|
||||||
|
@ -1304,7 +1304,7 @@ gnc_invoice_window_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
/* Next, close if this is a destroy event */
|
/* Next, close if this is a destroy event */
|
||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &iw->invoice_guid);
|
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);
|
gnc_close_gui_component (iw->component_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1927,7 +1927,7 @@ gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (iw->component_id,
|
gnc_gui_component_watch_entity_type (iw->component_id,
|
||||||
GNC_INVOICE_MODULE_NAME,
|
GNC_INVOICE_MODULE_NAME,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
/* Create the register */
|
/* Create the register */
|
||||||
{
|
{
|
||||||
@ -2067,7 +2067,7 @@ gnc_invoice_window_new_invoice (GNCBook *bookp, GncOwner *owner,
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (iw->component_id,
|
gnc_gui_component_watch_entity_type (iw->component_id,
|
||||||
GNC_INVOICE_MODULE_NAME,
|
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 */
|
/* Now fill in a lot of the pieces and display properly */
|
||||||
gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
|
gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
|
||||||
|
@ -269,7 +269,7 @@ gnc_job_window_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
/* Next, close if this is a destroy event */
|
/* Next, close if this is a destroy event */
|
||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &jw->job_guid);
|
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);
|
gnc_close_gui_component (jw->component_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -378,7 +378,7 @@ gnc_job_new_window (GNCBook *bookp, GncOwner *owner, GncJob *job)
|
|||||||
gnc_job_name_changed_cb (NULL, jw);
|
gnc_job_name_changed_cb (NULL, jw);
|
||||||
gnc_gui_component_watch_entity_type (jw->component_id,
|
gnc_gui_component_watch_entity_type (jw->component_id,
|
||||||
GNC_JOB_MODULE_NAME,
|
GNC_JOB_MODULE_NAME,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
gtk_widget_show_all (jw->dialog);
|
gtk_widget_show_all (jw->dialog);
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ gnc_order_window_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
/* Next, close if this is a destroy event */
|
/* Next, close if this is a destroy event */
|
||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &ow->order_guid);
|
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);
|
gnc_close_gui_component (ow->component_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -480,7 +480,7 @@ gnc_order_update_window (OrderWindow *ow)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (ow->component_id,
|
gnc_gui_component_watch_entity_type (ow->component_id,
|
||||||
GNC_ORDER_MODULE_NAME,
|
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);
|
gnc_table_refresh_gui (gnc_entry_ledger_get_table (ow->ledger), TRUE);
|
||||||
|
|
||||||
|
@ -437,8 +437,8 @@ new_payment_window (GncOwner *owner, GNCBook *book, GncInvoice *invoice)
|
|||||||
/* Watch for any new or changed accounts */
|
/* Watch for any new or changed accounts */
|
||||||
gnc_gui_component_watch_entity_type (pw->component_id,
|
gnc_gui_component_watch_entity_type (pw->component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_CREATE | GNC_EVENT_MODIFY |
|
QOF_EVENT_CREATE | QOF_EVENT_MODIFY |
|
||||||
GNC_EVENT_DESTROY);
|
QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
/* Fill in the post_combo and account_tree widgets */
|
/* Fill in the post_combo and account_tree widgets */
|
||||||
gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types);
|
gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types);
|
||||||
|
@ -327,7 +327,7 @@ gnc_vendor_window_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
/* Next, close if this is a destroy event */
|
/* Next, close if this is a destroy event */
|
||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &vw->vendor_guid);
|
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);
|
gnc_close_gui_component (vw->component_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -487,7 +487,7 @@ gnc_vendor_new_window (GNCBook *bookp, GncVendor *vendor)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (vw->component_id,
|
gnc_gui_component_watch_entity_type (vw->component_id,
|
||||||
GNC_VENDOR_MODULE_NAME,
|
GNC_VENDOR_MODULE_NAME,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
gtk_widget_show_all (vw->dialog);
|
gtk_widget_show_all (vw->dialog);
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries)
|
|||||||
gnc_gui_component_watch_entity (ledger->component_id,
|
gnc_gui_component_watch_entity (ledger->component_id,
|
||||||
gncOwnerGetGUID
|
gncOwnerGetGUID
|
||||||
(gncInvoiceGetOwner (ledger->invoice)),
|
(gncInvoiceGetOwner (ledger->invoice)),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
case GNCENTRY_INVOICE_VIEWER:
|
case GNCENTRY_INVOICE_VIEWER:
|
||||||
case GNCENTRY_BILL_ENTRY:
|
case GNCENTRY_BILL_ENTRY:
|
||||||
case GNCENTRY_BILL_VIEWER:
|
case GNCENTRY_BILL_VIEWER:
|
||||||
@ -106,17 +106,17 @@ gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (ledger->component_id,
|
gnc_gui_component_watch_entity_type (ledger->component_id,
|
||||||
type,
|
type,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
/* To make sure the xfer cell is up to date */
|
/* To make sure the xfer cell is up to date */
|
||||||
gnc_gui_component_watch_entity_type (ledger->component_id,
|
gnc_gui_component_watch_entity_type (ledger->component_id,
|
||||||
GNC_ID_ACCOUNT,
|
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 */
|
/* To make sure the taxtable cell is up to date */
|
||||||
gnc_gui_component_watch_entity_type (ledger->component_id,
|
gnc_gui_component_watch_entity_type (ledger->component_id,
|
||||||
GNC_TAXTABLE_MODULE_NAME,
|
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 */
|
/* For expense vouchers, watch the employee and refresh if it's changed */
|
||||||
if (ledger->type == GNCENTRY_EXPVOUCHER_ENTRY) {
|
if (ledger->type == GNCENTRY_EXPVOUCHER_ENTRY) {
|
||||||
@ -126,7 +126,7 @@ gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries)
|
|||||||
if (employee)
|
if (employee)
|
||||||
gnc_gui_component_watch_entity (ledger->component_id,
|
gnc_gui_component_watch_entity (ledger->component_id,
|
||||||
gncEmployeeGetGUID (employee),
|
gncEmployeeGetGUID (employee),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (node = entries; node; node = node->next)
|
for (node = entries; node; node = node->next)
|
||||||
@ -134,7 +134,7 @@ gnc_entry_ledger_set_watches (GncEntryLedger *ledger, GList *entries)
|
|||||||
GncEntry *entry = node->data;
|
GncEntry *entry = node->data;
|
||||||
gnc_gui_component_watch_entity (ledger->component_id,
|
gnc_gui_component_watch_entity (ledger->component_id,
|
||||||
gncEntryGetGUID (entry),
|
gncEntryGetGUID (entry),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ tax_table_window_refresh (TaxTableWindow *ttw)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity (ttw->component_id,
|
gnc_gui_component_watch_entity (ttw->component_id,
|
||||||
gncTaxTableGetGUID (table),
|
gncTaxTableGetGUID (table),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
|
|
||||||
row_text[0] = (char *)gncTaxTableGetName (table);
|
row_text[0] = (char *)gncTaxTableGetName (table);
|
||||||
row_text[1] = NULL;
|
row_text[1] = NULL;
|
||||||
@ -467,7 +467,7 @@ tax_table_window_refresh (TaxTableWindow *ttw)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (ttw->component_id,
|
gnc_gui_component_watch_entity_type (ttw->component_id,
|
||||||
GNC_TAXTABLE_MODULE_NAME,
|
GNC_TAXTABLE_MODULE_NAME,
|
||||||
GNC_EVENT_CREATE | GNC_EVENT_DESTROY);
|
QOF_EVENT_CREATE | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
if (vadjustment) {
|
if (vadjustment) {
|
||||||
save_value = CLAMP (save_value, vadjustment->lower,
|
save_value = CLAMP (save_value, vadjustment->lower,
|
||||||
|
@ -159,7 +159,7 @@ xaccMallocAccount (QofBook *book)
|
|||||||
|
|
||||||
acc = g_new (Account, 1);
|
acc = g_new (Account, 1);
|
||||||
xaccInitAccount (acc, book);
|
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;
|
return acc;
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ xaccFreeAccount (Account *acc)
|
|||||||
|
|
||||||
if (!acc) return;
|
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)
|
if (acc->children)
|
||||||
{
|
{
|
||||||
@ -317,7 +317,7 @@ xaccAccountBeginEdit (Account *acc)
|
|||||||
static inline void on_done(QofInstance *inst)
|
static inline void on_done(QofInstance *inst)
|
||||||
{
|
{
|
||||||
/* old event style */
|
/* 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)
|
static inline void on_err (QofInstance *inst, QofBackendError errcode)
|
||||||
@ -939,7 +939,6 @@ xaccAccountRecomputeBalance (Account * acc)
|
|||||||
|
|
||||||
acc->balance_dirty = FALSE;
|
acc->balance_dirty = FALSE;
|
||||||
|
|
||||||
gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
|
@ -189,7 +189,7 @@ xaccFreqSpecMalloc(QofBook *book)
|
|||||||
|
|
||||||
fs = g_new0(FreqSpec, 1);
|
fs = g_new0(FreqSpec, 1);
|
||||||
xaccFreqSpecInit( fs, book );
|
xaccFreqSpecInit( fs, book );
|
||||||
gnc_engine_gen_event( &fs->entity, GNC_EVENT_CREATE );
|
qof_event_gen( &fs->entity, QOF_EVENT_CREATE , NULL);
|
||||||
return fs;
|
return fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ void
|
|||||||
xaccFreqSpecFree( FreqSpec *fs )
|
xaccFreqSpecFree( FreqSpec *fs )
|
||||||
{
|
{
|
||||||
if ( fs == NULL ) return;
|
if ( fs == NULL ) return;
|
||||||
gnc_engine_gen_event( &fs->entity, GNC_EVENT_DESTROY );
|
qof_event_gen( &fs->entity, QOF_EVENT_DESTROY , NULL);
|
||||||
xaccFreqSpecCleanUp( fs );
|
xaccFreqSpecCleanUp( fs );
|
||||||
|
|
||||||
qof_entity_release (&fs->entity);
|
qof_entity_release (&fs->entity);
|
||||||
|
@ -618,7 +618,7 @@ xaccAccountRemoveGroup (Account *acc)
|
|||||||
|
|
||||||
grp->saved = 0;
|
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 @@ xaccGroupRemoveAccount (AccountGroup *grp, Account *acc)
|
|||||||
xaccFreeAccountGroup (grp);
|
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 @@ xaccAccountInsertSubAccount (Account *adult, Account *child)
|
|||||||
|
|
||||||
xaccGroupInsertAccount (adult->children, child);
|
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 @@ xaccGroupInsertAccount (AccountGroup *grp, Account *acc)
|
|||||||
*/
|
*/
|
||||||
PWARN ("reparenting accounts across books is not correctly supported\n");
|
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);
|
col = qof_book_get_collection (grp->book, GNC_ID_ACCOUNT);
|
||||||
qof_collection_insert_entity (col, &acc->inst.entity);
|
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 @@ xaccGroupInsertAccount (AccountGroup *grp, Account *acc)
|
|||||||
|
|
||||||
grp->saved = 0;
|
grp->saved = 0;
|
||||||
|
|
||||||
gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
|
qof_event_gen (&acc->inst.entity, QOF_EVENT_MODIFY, NULL);
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,7 +833,7 @@ xaccGroupCopyGroup (AccountGroup *to, AccountGroup *from)
|
|||||||
xaccGroupCopyGroup (to_acc->children, from_acc->children);
|
xaccGroupCopyGroup (to_acc->children, from_acc->children);
|
||||||
}
|
}
|
||||||
xaccAccountCommitEdit (to_acc);
|
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
|
/* make sure that we have a symmetric, uniform number of
|
||||||
* begin-edits, so that subsequent GroupCommitEdit's
|
* begin-edits, so that subsequent GroupCommitEdit's
|
||||||
@ -893,14 +893,14 @@ xaccGroupMergeAccounts (AccountGroup *grp)
|
|||||||
gb->parent = acc_a;
|
gb->parent = acc_a;
|
||||||
acc_b->children = NULL;
|
acc_b->children = NULL;
|
||||||
|
|
||||||
gnc_engine_gen_event (&acc_a->inst.entity, GNC_EVENT_MODIFY);
|
qof_event_gen (&acc_a->inst.entity, QOF_EVENT_MODIFY, NULL);
|
||||||
gnc_engine_gen_event (&acc_b->inst.entity, GNC_EVENT_MODIFY);
|
qof_event_gen (&acc_b->inst.entity, QOF_EVENT_MODIFY, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xaccGroupConcatGroup (ga, gb);
|
xaccGroupConcatGroup (ga, gb);
|
||||||
acc_b->children = NULL;
|
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 @@ xaccGroupMergeAccounts (AccountGroup *grp)
|
|||||||
{
|
{
|
||||||
Split *split = lp->data;
|
Split *split = lp->data;
|
||||||
|
|
||||||
gnc_engine_gen_event (&xaccSplitGetAccount(split)->inst.entity,
|
qof_event_gen (&xaccSplitGetAccount(split)->inst.entity,
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY, NULL);
|
||||||
split->acc = NULL;
|
split->acc = NULL;
|
||||||
xaccAccountInsertSplit (acc_a, split);
|
xaccAccountInsertSplit (acc_a, split);
|
||||||
}
|
}
|
||||||
@ -927,7 +927,7 @@ xaccGroupMergeAccounts (AccountGroup *grp)
|
|||||||
node_b = node_b->prev;
|
node_b = node_b->prev;
|
||||||
|
|
||||||
/* remove from list -- node_a is ok, it's before node_b */
|
/* 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);
|
grp->accounts = g_list_remove (grp->accounts, acc_b);
|
||||||
|
|
||||||
xaccAccountBeginEdit (acc_b);
|
xaccAccountBeginEdit (acc_b);
|
||||||
|
@ -118,7 +118,7 @@ gnc_book_insert_trans_clobber (QofBook *book, Transaction *trans)
|
|||||||
}
|
}
|
||||||
|
|
||||||
xaccTransCommitEdit (newtrans);
|
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);
|
LEAVE ("trans=%p %s", trans, trans->description);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ gnc_book_insert_trans (QofBook *book, Transaction *trans)
|
|||||||
}
|
}
|
||||||
|
|
||||||
xaccTransCommitEdit (trans);
|
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);
|
LEAVE ("trans=%p %s", trans, trans->description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ xaccSchedXactionMalloc(QofBook *book)
|
|||||||
|
|
||||||
sx = g_new0( SchedXaction, 1 );
|
sx = g_new0( SchedXaction, 1 );
|
||||||
xaccSchedXactionInit( sx, book );
|
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;
|
return sx;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ xaccSchedXactionFree( SchedXaction *sx )
|
|||||||
if ( sx == NULL ) return;
|
if ( sx == NULL ) return;
|
||||||
|
|
||||||
xaccFreqSpecFree( sx->freq );
|
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 )
|
if ( sx->name )
|
||||||
g_free( sx->name );
|
g_free( sx->name );
|
||||||
|
@ -516,7 +516,7 @@ xaccSplitCommitEdit(Split *s)
|
|||||||
//FIXME: probably not needed.
|
//FIXME: probably not needed.
|
||||||
xaccGroupMarkNotSaved (orig_acc->parent);
|
xaccGroupMarkNotSaved (orig_acc->parent);
|
||||||
//FIXME: find better event type
|
//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.");
|
} else PERR("Account lost track of moved or deleted split.");
|
||||||
orig_acc->balance_dirty = TRUE;
|
orig_acc->balance_dirty = TRUE;
|
||||||
xaccAccountRecomputeBalance(orig_acc);
|
xaccAccountRecomputeBalance(orig_acc);
|
||||||
@ -540,7 +540,7 @@ xaccSplitCommitEdit(Split *s)
|
|||||||
|
|
||||||
xaccGroupMarkNotSaved (acc->parent); //FIXME: probably not needed.
|
xaccGroupMarkNotSaved (acc->parent); //FIXME: probably not needed.
|
||||||
//FIXME: find better event
|
//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.");
|
} else PERR("Account grabbed split prematurely.");
|
||||||
acc->balance_dirty = TRUE;
|
acc->balance_dirty = TRUE;
|
||||||
xaccSplitSetAmount(s, xaccSplitGetAmount(s));
|
xaccSplitSetAmount(s, xaccSplitGetAmount(s));
|
||||||
@ -548,11 +548,11 @@ xaccSplitCommitEdit(Split *s)
|
|||||||
|
|
||||||
if (s->orig_parent && s->parent != s->orig_parent) {
|
if (s->orig_parent && s->parent != s->orig_parent) {
|
||||||
//FIXME: find better event
|
//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) {
|
if (s->lot) {
|
||||||
/* A change of value/amnt affects gains display, etc. */
|
/* 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
|
/* Important: we save off the original parent transaction and account
|
||||||
|
@ -220,16 +220,16 @@ void gen_event_trans (Transaction *trans)
|
|||||||
if (account)
|
if (account)
|
||||||
{
|
{
|
||||||
xaccGroupMarkNotSaved (account->parent);
|
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)
|
if (lot)
|
||||||
{
|
{
|
||||||
/* A change of transaction date might affect opening date of 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
|
#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 @@ xaccMallocTransaction (QofBook *book)
|
|||||||
|
|
||||||
trans = g_new(Transaction, 1);
|
trans = g_new(Transaction, 1);
|
||||||
xaccInitTransaction (trans, book);
|
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;
|
return trans;
|
||||||
}
|
}
|
||||||
@ -889,7 +889,7 @@ do_destroy (Transaction *trans)
|
|||||||
if (!shutting_down)
|
if (!shutting_down)
|
||||||
xaccTransWriteLog (trans, 'D');
|
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. */
|
/* We only own the splits that still think they belong to us. */
|
||||||
trans->splits = g_list_copy(trans->splits);
|
trans->splits = g_list_copy(trans->splits);
|
||||||
|
@ -65,7 +65,7 @@ gnc_budget_new(QofBook *book)
|
|||||||
gnc_budget_set_description(budget, "");
|
gnc_budget_set_description(budget, "");
|
||||||
gnc_budget_set_num_periods(budget, 12);
|
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(" ");
|
LEAVE(" ");
|
||||||
return budget;
|
return budget;
|
||||||
@ -83,7 +83,7 @@ gnc_budget_free(GncBudget* budget)
|
|||||||
/* We first send the message that this object is about to be
|
/* We first send the message that this object is about to be
|
||||||
* destroyed so that any GUI elements can remove it before it is
|
* destroyed so that any GUI elements can remove it before it is
|
||||||
* actually gone. */
|
* 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->name);
|
||||||
CACHE_REMOVE(budget->description);
|
CACHE_REMOVE(budget->description);
|
||||||
@ -100,7 +100,7 @@ gnc_budget_set_name(GncBudget* budget, const gchar* name)
|
|||||||
CACHE_REPLACE(budget->name, name);
|
CACHE_REPLACE(budget->name, name);
|
||||||
qof_collection_mark_dirty(budget->inst.entity.collection);
|
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*
|
const gchar*
|
||||||
@ -119,7 +119,7 @@ gnc_budget_set_description(GncBudget* budget, const gchar* description)
|
|||||||
CACHE_REPLACE(budget->description, description);
|
CACHE_REPLACE(budget->description, description);
|
||||||
qof_collection_mark_dirty(budget->inst.entity.collection);
|
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*
|
const gchar*
|
||||||
@ -136,7 +136,7 @@ gnc_budget_set_recurrence(GncBudget *budget, const Recurrence *r)
|
|||||||
budget->recurrence = *r;
|
budget->recurrence = *r;
|
||||||
qof_collection_mark_dirty(budget->inst.entity.collection);
|
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 *
|
const Recurrence *
|
||||||
@ -161,7 +161,7 @@ gnc_budget_set_num_periods(GncBudget* budget, guint num_periods)
|
|||||||
budget->num_periods = num_periods;
|
budget->num_periods = num_periods;
|
||||||
qof_collection_mark_dirty(budget->inst.entity.collection);
|
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
|
guint
|
||||||
@ -193,7 +193,7 @@ gnc_budget_set_account_period_value(GncBudget *budget, Account *account,
|
|||||||
kvp_frame_set_numeric(frame, path, val);
|
kvp_frame_set_numeric(frame, path, val);
|
||||||
qof_collection_mark_dirty(budget->inst.entity.collection);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ mark_commodity_dirty (gnc_commodity *cm)
|
|||||||
{
|
{
|
||||||
cm->inst.dirty = TRUE; /* No-one uses or clears this flag. */
|
cm->inst.dirty = TRUE; /* No-one uses or clears this flag. */
|
||||||
qof_collection_mark_dirty (cm->inst.entity.collection);
|
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
|
static void
|
||||||
@ -528,7 +528,7 @@ gnc_commodity_new(QofBook *book, const char * fullname,
|
|||||||
|
|
||||||
reset_printname(retval);
|
reset_printname(retval);
|
||||||
reset_unique_name(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;
|
return retval;
|
||||||
}
|
}
|
||||||
@ -543,7 +543,7 @@ gnc_commodity_destroy(gnc_commodity * cm)
|
|||||||
{
|
{
|
||||||
if(!cm) return;
|
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 */
|
/* Set at creation */
|
||||||
CACHE_REMOVE (cm->fullname);
|
CACHE_REMOVE (cm->fullname);
|
||||||
@ -1214,7 +1214,7 @@ gnc_commodity_table_insert(gnc_commodity_table * table,
|
|||||||
(gpointer)comm);
|
(gpointer)comm);
|
||||||
nsp->cm_list = g_list_append(nsp->cm_list, 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);
|
LEAVE ("(table=%p, comm=%p)", table, comm);
|
||||||
return comm;
|
return comm;
|
||||||
}
|
}
|
||||||
@ -1239,7 +1239,7 @@ gnc_commodity_table_remove(gnc_commodity_table * table,
|
|||||||
c = gnc_commodity_table_lookup (table, ns_name, comm->mnemonic);
|
c = gnc_commodity_table_lookup (table, ns_name, comm->mnemonic);
|
||||||
if (c != comm) return;
|
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);
|
nsp = gnc_commodity_table_find_namespace(table, ns_name);
|
||||||
if (!nsp) return;
|
if (!nsp) return;
|
||||||
@ -1457,13 +1457,13 @@ gnc_commodity_table_add_namespace(gnc_commodity_table * table,
|
|||||||
ns->cm_table = g_hash_table_new(g_str_hash, g_str_equal);
|
ns->cm_table = g_hash_table_new(g_str_hash, g_str_equal);
|
||||||
ns->name = gnc_string_cache_insert((gpointer)namespace);
|
ns->name = gnc_string_cache_insert((gpointer)namespace);
|
||||||
qof_instance_init (&ns->inst, GNC_ID_COMMODITY_NAMESPACE, book);
|
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,
|
g_hash_table_insert(table->ns_table,
|
||||||
(gpointer) ns->name,
|
(gpointer) ns->name,
|
||||||
(gpointer) ns);
|
(gpointer) ns);
|
||||||
table->ns_list = g_list_append(table->ns_list, 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;
|
return ns;
|
||||||
}
|
}
|
||||||
@ -1526,7 +1526,7 @@ gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
|
|||||||
if (!ns)
|
if (!ns)
|
||||||
return;
|
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);
|
g_hash_table_remove(table->ns_table, namespace);
|
||||||
table->ns_list = g_list_remove(table->ns_list, ns);
|
table->ns_list = g_list_remove(table->ns_list, ns);
|
||||||
|
|
||||||
@ -1537,7 +1537,7 @@ gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
|
|||||||
g_hash_table_destroy(ns->cm_table);
|
g_hash_table_destroy(ns->cm_table);
|
||||||
gnc_string_cache_remove(ns->name);
|
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);
|
qof_instance_release(&ns->inst);
|
||||||
g_free(ns);
|
g_free(ns);
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ gnc_lot_new (QofBook *book)
|
|||||||
|
|
||||||
lot = g_new (GNCLot, 1);
|
lot = g_new (GNCLot, 1);
|
||||||
gnc_lot_init (lot, book);
|
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;
|
return lot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ gnc_lot_destroy (GNCLot *lot)
|
|||||||
if (!lot) return;
|
if (!lot) return;
|
||||||
|
|
||||||
ENTER ("(lot=%p)", lot);
|
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)
|
for (node=lot->splits; node; node=node->next)
|
||||||
@ -262,7 +262,7 @@ gnc_lot_add_split (GNCLot *lot, Split *split)
|
|||||||
/* for recomputation of is-closed */
|
/* for recomputation of is-closed */
|
||||||
lot->is_closed = -1;
|
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
|
void
|
||||||
@ -281,7 +281,7 @@ gnc_lot_remove_split (GNCLot *lot, Split *split)
|
|||||||
xaccAccountRemoveLot (lot->account, lot);
|
xaccAccountRemoveLot (lot->account, lot);
|
||||||
lot->account = NULL;
|
lot->account = NULL;
|
||||||
}
|
}
|
||||||
gnc_engine_gen_event (&lot->inst.entity, GNC_EVENT_MODIFY);
|
qof_event_gen (&lot->inst.entity, QOF_EVENT_MODIFY, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
|
@ -56,7 +56,7 @@ gnc_price_create (QofBook *book)
|
|||||||
p->source = NULL;
|
p->source = NULL;
|
||||||
|
|
||||||
qof_instance_init (&p->inst, GNC_ID_PRICE, book);
|
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;
|
return p;
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ static void
|
|||||||
gnc_price_destroy (GNCPrice *p)
|
gnc_price_destroy (GNCPrice *p)
|
||||||
{
|
{
|
||||||
ENTER(" ");
|
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->type) gnc_string_cache_remove(p->type);
|
||||||
if(p->source) gnc_string_cache_remove(p->source);
|
if(p->source) gnc_string_cache_remove(p->source);
|
||||||
@ -827,7 +827,7 @@ add_price(GNCPriceDB *db, GNCPrice *p)
|
|||||||
}
|
}
|
||||||
g_hash_table_insert(currency_hash, currency, price_list);
|
g_hash_table_insert(currency_hash, currency, price_list);
|
||||||
p->db = db;
|
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",
|
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,
|
db, p, p->inst.dirty, p->inst.do_free,
|
||||||
@ -892,7 +892,7 @@ remove_price(GNCPriceDB *db, GNCPrice *p, gboolean cleanup)
|
|||||||
currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
|
currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
|
||||||
if(!currency_hash) { LEAVE (" no currency hash"); return FALSE; }
|
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);
|
price_list = g_hash_table_lookup(currency_hash, currency);
|
||||||
gnc_price_ref(p);
|
gnc_price_ref(p);
|
||||||
if(!gnc_price_list_remove(&price_list, p)) {
|
if(!gnc_price_list_remove(&price_list, p)) {
|
||||||
|
@ -109,13 +109,13 @@
|
|||||||
|
|
||||||
(gw:wrap-as-wct ws '<gnc:Query*> "Query *" "const Query *")
|
(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 "QOF_EVENT_NONE" 'gnc-event-none)
|
||||||
(gw:enum-add-value! wt "GNC_EVENT_CREATE" 'gnc-event-create)
|
(gw:enum-add-value! wt "QOF_EVENT_CREATE" 'gnc-event-create)
|
||||||
(gw:enum-add-value! wt "GNC_EVENT_MODIFY" 'gnc-event-modify)
|
(gw:enum-add-value! wt "QOF_EVENT_MODIFY" 'gnc-event-modify)
|
||||||
(gw:enum-add-value! wt "GNC_EVENT_DESTROY" 'gnc-event-destroy)
|
(gw:enum-add-value! wt "QOF_EVENT_DESTROY" 'gnc-event-destroy)
|
||||||
(gw:enum-add-value! wt "GNC_EVENT_ALL" 'gnc-event-all))
|
(gw:enum-add-value! wt "QOF_EVENT_ALL" 'gnc-event-all))
|
||||||
|
|
||||||
(let ((wt (gw:wrap-enumeration ws '<gnc:query-op> "QofQueryOp")))
|
(let ((wt (gw:wrap-enumeration ws '<gnc:query-op> "QofQueryOp")))
|
||||||
|
|
||||||
@ -1491,7 +1491,7 @@ argument between 0 and 100 (inclusive).")
|
|||||||
ws
|
ws
|
||||||
'gnc:set-log-level-global
|
'gnc:set-log-level-global
|
||||||
'<gw:void>
|
'<gw:void>
|
||||||
"gnc_set_log_level_global"
|
"qof_log_set_level_registered"
|
||||||
'((<gw:int> level))
|
'((<gw:int> level))
|
||||||
"Set the logging level for all modules to level.")
|
"Set the logging level for all modules to level.")
|
||||||
|
|
||||||
@ -2465,7 +2465,7 @@ the timepair representing midday on that day")
|
|||||||
ws
|
ws
|
||||||
'gnc:engine-suspend-events
|
'gnc:engine-suspend-events
|
||||||
'<gw:void>
|
'<gw:void>
|
||||||
"gnc_engine_suspend_events"
|
"qof_event_suspend"
|
||||||
'()
|
'()
|
||||||
"Suspend all engine events.")
|
"Suspend all engine events.")
|
||||||
|
|
||||||
@ -2473,7 +2473,7 @@ the timepair representing midday on that day")
|
|||||||
ws
|
ws
|
||||||
'gnc:engine-resume-events
|
'gnc:engine-resume-events
|
||||||
'<gw:void>
|
'<gw:void>
|
||||||
"gnc_engine_resume_events"
|
"qof_event_resume"
|
||||||
'()
|
'()
|
||||||
"Resume engine event generation.")
|
"Resume engine event generation.")
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ obj_create(QofBook *book)
|
|||||||
g->active = TRUE;
|
g->active = TRUE;
|
||||||
g->version = 1;
|
g->version = 1;
|
||||||
g->minor = 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;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ test_merge (void)
|
|||||||
do_test ((NULL != &import_obj->inst), "#4 instance init");
|
do_test ((NULL != &import_obj->inst), "#4 instance init");
|
||||||
obj_setGUID(import_obj,qof_instance_get_guid(&import_obj->inst));
|
obj_setGUID(import_obj,qof_instance_get_guid(&import_obj->inst));
|
||||||
do_test ((NULL != &import_obj->obj_guid), "#5 guid set");
|
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");
|
do_test ((NULL != &import_obj->inst.entity), "#6 gnc event create");
|
||||||
obj_setName(import_obj, import_init);
|
obj_setName(import_obj, import_init);
|
||||||
do_test ((NULL != &import_obj->Name), "#7 string set");
|
do_test ((NULL != &import_obj->Name), "#7 string set");
|
||||||
@ -314,7 +314,7 @@ test_merge (void)
|
|||||||
new_obj = g_new(myobj, 1);
|
new_obj = g_new(myobj, 1);
|
||||||
qof_instance_init (&new_obj->inst, TEST_MODULE_NAME, import);
|
qof_instance_init (&new_obj->inst, TEST_MODULE_NAME, import);
|
||||||
obj_setGUID(new_obj,qof_instance_get_guid(&new_obj->inst));
|
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_setName(new_obj, import_init);
|
||||||
obj_setAmount(new_obj, obj_amount);
|
obj_setAmount(new_obj, obj_amount);
|
||||||
obj_setActive(new_obj, active);
|
obj_setActive(new_obj, active);
|
||||||
@ -334,7 +334,7 @@ test_merge (void)
|
|||||||
target_obj = g_new(myobj, 1);
|
target_obj = g_new(myobj, 1);
|
||||||
qof_instance_init (&target_obj->inst, TEST_MODULE_NAME, target);
|
qof_instance_init (&target_obj->inst, TEST_MODULE_NAME, target);
|
||||||
obj_setGUID(target_obj,qof_instance_get_guid(&target_obj->inst));
|
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_setName(target_obj, target_init);
|
||||||
obj_setAmount(target_obj, obj_amount);
|
obj_setAmount(target_obj, obj_amount);
|
||||||
obj_setActive(target_obj, active);
|
obj_setActive(target_obj, active);
|
||||||
|
@ -182,7 +182,7 @@ grand_create(QofBook *book)
|
|||||||
g->Amount = get_random_gnc_numeric();
|
g->Amount = get_random_gnc_numeric();
|
||||||
g->child = NULL;
|
g->child = NULL;
|
||||||
g->descend = 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;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ parent_create(QofBook *book)
|
|||||||
g->Name = get_random_string();
|
g->Name = get_random_string();
|
||||||
g->Amount = get_random_gnc_numeric();
|
g->Amount = get_random_gnc_numeric();
|
||||||
g->child = NULL;
|
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;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ child_create(QofBook *book)
|
|||||||
g->flag = get_random_character();
|
g->flag = get_random_character();
|
||||||
g->Name = get_random_string();
|
g->Name = get_random_string();
|
||||||
g->Amount = get_random_gnc_numeric();
|
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;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,7 +497,7 @@ search_new_item_cb (GtkButton *button, GNCSearchWindow *sw)
|
|||||||
guid, op);
|
guid, op);
|
||||||
|
|
||||||
/* Watch this entity so we'll refresh once it's actually changed */
|
/* 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ refresh_handler (GHashTable *changes, gpointer data)
|
|||||||
if (changes) {
|
if (changes) {
|
||||||
info = gnc_gui_get_entity_events (changes, &priv->guid);
|
info = gnc_gui_get_entity_events (changes, &priv->guid);
|
||||||
if (info) {
|
if (info) {
|
||||||
if (info->event_mask & GNC_EVENT_DESTROY)
|
if (info->event_mask & QOF_EVENT_DESTROY)
|
||||||
gsl->selected_item = NULL;
|
gsl->selected_item = NULL;
|
||||||
reset_selection_text (gsl);
|
reset_selection_text (gsl);
|
||||||
}
|
}
|
||||||
@ -341,7 +341,7 @@ gnc_general_search_set_selected (GNCGeneralSearch *gsl, gpointer selection)
|
|||||||
(gsl->selected_item, get_guid)));
|
(gsl->selected_item, get_guid)));
|
||||||
gnc_gui_component_watch_entity
|
gnc_gui_component_watch_entity
|
||||||
(priv->component_id, &(priv->guid),
|
(priv->component_id, &(priv->guid),
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
} else
|
} else
|
||||||
priv->guid = *xaccGUIDNULL ();
|
priv->guid = *xaccGUIDNULL ();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ shared_quickfill_destroy (QofBook *book, gpointer key, gpointer user_data)
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
listen_for_account_events (GUID *guid, QofIdType type,
|
listen_for_account_events (GUID *guid, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
QFB *qfb = user_data;
|
QFB *qfb = user_data;
|
||||||
@ -83,7 +83,7 @@ listen_for_account_events (GUID *guid, QofIdType type,
|
|||||||
Account *account;
|
Account *account;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
if (! (event_type & GNC_EVENT_MODIFY)) return;
|
if (! (event_type & QOF_EVENT_MODIFY)) return;
|
||||||
if (QSTRCMP (type, GNC_ID_ACCOUNT)) return;
|
if (QSTRCMP (type, GNC_ID_ACCOUNT)) return;
|
||||||
|
|
||||||
col = qof_book_get_collection (qfb->book, GNC_ID_ACCOUNT);
|
col = qof_book_get_collection (qfb->book, GNC_ID_ACCOUNT);
|
||||||
|
@ -1438,7 +1438,7 @@ refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
if (changes)
|
if (changes)
|
||||||
{
|
{
|
||||||
info = gnc_gui_get_entity_events (changes, &aw->account);
|
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);
|
gnc_close_gui_component (aw->component_id);
|
||||||
return;
|
return;
|
||||||
@ -1521,7 +1521,7 @@ gnc_ui_new_account_window_internal (Account *base_account,
|
|||||||
gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
|
gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
|
||||||
gnc_gui_component_watch_entity_type (aw->component_id,
|
gnc_gui_component_watch_entity_type (aw->component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
return aw;
|
return aw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1712,7 +1712,7 @@ gnc_ui_edit_account_window(Account *account)
|
|||||||
gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
|
gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
|
||||||
gnc_gui_component_watch_entity_type (aw->component_id,
|
gnc_gui_component_watch_entity_type (aw->component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
gtk_window_present(GTK_WINDOW(aw->dialog));
|
gtk_window_present(GTK_WINDOW(aw->dialog));
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ gnc_dialog_query_list_refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
for (node = dql->books; node; node = node->next)
|
for (node = dql->books; node; node = node->next)
|
||||||
{
|
{
|
||||||
info = gnc_gui_get_entity_events (changes, (const GUID*)(node->data));
|
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);
|
gnc_close_gui_component (dql->component_id);
|
||||||
return;
|
return;
|
||||||
@ -229,7 +229,7 @@ gnc_dialog_query_list_new (GList *param_list, Query *q)
|
|||||||
/* and register the books */
|
/* and register the books */
|
||||||
for (node = dql->books; node; node = node->next)
|
for (node = dql->books; node; node = node->next)
|
||||||
gnc_gui_component_watch_entity (dql->component_id, (GUID*)node->data,
|
gnc_gui_component_watch_entity (dql->component_id, (GUID*)node->data,
|
||||||
GNC_EVENT_DESTROY);
|
QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
return dql;
|
return dql;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ static void gas_accounts_to_names (gpointer data, gpointer user_data);
|
|||||||
static void gas_populate_list (GNCAccountSel *gas);
|
static void gas_populate_list (GNCAccountSel *gas);
|
||||||
static void gas_strcmp_adapter (gpointer a, gpointer b);
|
static void gas_strcmp_adapter (gpointer a, gpointer b);
|
||||||
static void gnc_account_sel_event_cb (GUID *entity, QofIdType id_type,
|
static void gnc_account_sel_event_cb (GUID *entity, QofIdType id_type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
static void gas_new_account_click (GtkButton *b, gpointer ud);
|
static void gas_new_account_click (GtkButton *b, gpointer ud);
|
||||||
@ -98,12 +98,12 @@ gnc_account_sel_get_type (void)
|
|||||||
static
|
static
|
||||||
void
|
void
|
||||||
gnc_account_sel_event_cb( GUID *entity, QofIdType type,
|
gnc_account_sel_event_cb( GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data )
|
gpointer user_data )
|
||||||
{
|
{
|
||||||
if ( ! ( event_type == GNC_EVENT_CREATE
|
if ( ! ( event_type == QOF_EVENT_CREATE
|
||||||
|| event_type == GNC_EVENT_MODIFY
|
|| event_type == QOF_EVENT_MODIFY
|
||||||
|| event_type == GNC_EVENT_DESTROY )
|
|| event_type == QOF_EVENT_DESTROY )
|
||||||
|| strcmp( type, GNC_ID_ACCOUNT ) != 0 ) {
|
|| strcmp( type, GNC_ID_ACCOUNT ) != 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -991,13 +991,13 @@ gnc_main_window_delete_event (GtkWidget *window,
|
|||||||
* function only cares about a type of GNC_ID_BOOK.
|
* function only cares about a type of GNC_ID_BOOK.
|
||||||
*
|
*
|
||||||
* @param event_type The type of the event. This function only cares
|
* @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.
|
* @param user_data A pointer to the window data structure.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gnc_main_window_event_handler (GUID *entity, QofIdType type,
|
gnc_main_window_event_handler (GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GncMainWindow *window;
|
GncMainWindow *window;
|
||||||
@ -1011,7 +1011,7 @@ gnc_main_window_event_handler (GUID *entity, QofIdType type,
|
|||||||
/* soft failures */
|
/* soft failures */
|
||||||
if (safe_strcmp(type, GNC_ID_BOOK) != 0)
|
if (safe_strcmp(type, GNC_ID_BOOK) != 0)
|
||||||
return;
|
return;
|
||||||
if (event_type != GNC_EVENT_DESTROY)
|
if (event_type != QOF_EVENT_DESTROY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ENTER("entity %p of type %s, event %d, window %p",
|
ENTER("entity %p of type %s, event %d, window %p",
|
||||||
|
@ -846,7 +846,7 @@ gnc_query_list_fill(GNCQueryList *list)
|
|||||||
gup = priv->get_guid;
|
gup = priv->get_guid;
|
||||||
guid = (const GUID*)((gup->param_getfcn)(item->data, gup));
|
guid = (const GUID*)((gup->param_getfcn)(item->data, gup));
|
||||||
gnc_gui_component_watch_entity (priv->component_id, guid,
|
gnc_gui_component_watch_entity (priv->component_id, guid,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
list->num_entries++;
|
list->num_entries++;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ static gboolean gnc_tree_model_commodity_iter_parent (GtkTreeModel *tree_model,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *child);
|
GtkTreeIter *child);
|
||||||
static void gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
static void gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
/** The instance private data for a commodity database tree model. */
|
/** The instance private data for a commodity database tree model. */
|
||||||
@ -1197,7 +1197,7 @@ gnc_tree_model_commodity_do_deletions (gpointer unused)
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GncTreeModelCommodity *model;
|
GncTreeModelCommodity *model;
|
||||||
@ -1219,7 +1219,7 @@ gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
|||||||
|
|
||||||
commodity = gnc_commodity_find_commodity_by_guid(entity, gnc_get_current_book ());
|
commodity = gnc_commodity_find_commodity_by_guid(entity, gnc_get_current_book ());
|
||||||
name = gnc_commodity_get_mnemonic(commodity);
|
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)) {
|
if (!gnc_tree_model_commodity_get_iter_from_commodity (model, commodity, &iter)) {
|
||||||
LEAVE("no iter");
|
LEAVE("no iter");
|
||||||
return;
|
return;
|
||||||
@ -1230,7 +1230,7 @@ gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
|||||||
|
|
||||||
namespace = gnc_commodity_find_namespace_by_guid(entity, gnc_get_current_book ());
|
namespace = gnc_commodity_find_namespace_by_guid(entity, gnc_get_current_book ());
|
||||||
name = gnc_commodity_namespace_get_name(namespace);
|
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)) {
|
if (!gnc_tree_model_commodity_get_iter_from_namespace (model, namespace, &iter)) {
|
||||||
LEAVE("no iter");
|
LEAVE("no iter");
|
||||||
return;
|
return;
|
||||||
@ -1241,13 +1241,13 @@ gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (event_type) {
|
switch (event_type) {
|
||||||
case GNC_EVENT_ADD:
|
case QOF_EVENT_ADD:
|
||||||
/* Tell the filters/views where the new account was added. */
|
/* Tell the filters/views where the new account was added. */
|
||||||
DEBUG("add %s", name);
|
DEBUG("add %s", name);
|
||||||
gnc_tree_model_commodity_path_added (model, &iter);
|
gnc_tree_model_commodity_path_added (model, &iter);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GNC_EVENT_REMOVE:
|
case QOF_EVENT_REMOVE:
|
||||||
/* Record the path of this account for later use in destruction */
|
/* Record the path of this account for later use in destruction */
|
||||||
DEBUG("remove %s", name);
|
DEBUG("remove %s", name);
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
||||||
@ -1266,7 +1266,7 @@ gnc_tree_model_commodity_event_handler (GUID *entity, QofIdType type,
|
|||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case GNC_EVENT_MODIFY:
|
case QOF_EVENT_MODIFY:
|
||||||
DEBUG("change %s", name);
|
DEBUG("change %s", name);
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
|
@ -102,7 +102,7 @@ static gboolean gnc_tree_model_price_iter_parent (GtkTreeModel *tree_model,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GtkTreeIter *child);
|
GtkTreeIter *child);
|
||||||
static void gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
static void gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
/** The instance private data for a price database tree model. */
|
/** The instance private data for a price database tree model. */
|
||||||
@ -1445,7 +1445,7 @@ gnc_tree_model_price_do_deletions (gpointer unused)
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
||||||
GNCEngineEventType event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GncTreeModelPrice *model;
|
GncTreeModelPrice *model;
|
||||||
@ -1467,7 +1467,7 @@ gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
|||||||
|
|
||||||
commodity = gnc_commodity_find_commodity_by_guid(entity, gnc_get_current_book ());
|
commodity = gnc_commodity_find_commodity_by_guid(entity, gnc_get_current_book ());
|
||||||
name = gnc_commodity_get_mnemonic(commodity);
|
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)) {
|
if (!gnc_tree_model_price_get_iter_from_commodity (model, commodity, &iter)) {
|
||||||
LEAVE("no iter");
|
LEAVE("no iter");
|
||||||
return;
|
return;
|
||||||
@ -1478,7 +1478,7 @@ gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
|||||||
|
|
||||||
namespace = gnc_commodity_find_namespace_by_guid(entity, gnc_get_current_book ());
|
namespace = gnc_commodity_find_namespace_by_guid(entity, gnc_get_current_book ());
|
||||||
name = gnc_commodity_namespace_get_name(namespace);
|
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)) {
|
if (!gnc_tree_model_price_get_iter_from_namespace (model, namespace, &iter)) {
|
||||||
LEAVE("no iter");
|
LEAVE("no iter");
|
||||||
return;
|
return;
|
||||||
@ -1489,7 +1489,7 @@ gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
|||||||
|
|
||||||
price = gnc_price_lookup(entity, gnc_get_current_book ());
|
price = gnc_price_lookup(entity, gnc_get_current_book ());
|
||||||
name = "price";
|
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)) {
|
if (!gnc_tree_model_price_get_iter_from_price (model, price, &iter)) {
|
||||||
LEAVE("no iter");
|
LEAVE("no iter");
|
||||||
return;
|
return;
|
||||||
@ -1500,13 +1500,13 @@ gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (event_type) {
|
switch (event_type) {
|
||||||
case GNC_EVENT_ADD:
|
case QOF_EVENT_ADD:
|
||||||
/* Tell the filters/views where the new account was added. */
|
/* Tell the filters/views where the new account was added. */
|
||||||
DEBUG("add %s", name);
|
DEBUG("add %s", name);
|
||||||
gnc_tree_model_price_path_added (model, &iter);
|
gnc_tree_model_price_path_added (model, &iter);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GNC_EVENT_REMOVE:
|
case QOF_EVENT_REMOVE:
|
||||||
/* Record the path of this account for later use in destruction */
|
/* Record the path of this account for later use in destruction */
|
||||||
DEBUG("remove %s", name);
|
DEBUG("remove %s", name);
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
||||||
@ -1525,7 +1525,7 @@ gnc_tree_model_price_event_handler (GUID *entity, QofIdType type,
|
|||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case GNC_EVENT_MODIFY:
|
case QOF_EVENT_MODIFY:
|
||||||
DEBUG("change %s", name);
|
DEBUG("change %s", name);
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL(model), &iter);
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
|
@ -489,7 +489,7 @@ gnc_main_window_summary_new (void)
|
|||||||
NULL, retval);
|
NULL, retval);
|
||||||
gnc_gui_component_watch_entity_type (retval->component_id,
|
gnc_gui_component_watch_entity_type (retval->component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
for ( i = 0; i < N_COLUMNS; i++ )
|
for ( i = 0; i < N_COLUMNS; i++ )
|
||||||
{
|
{
|
||||||
|
@ -843,7 +843,7 @@ gnc_tax_info_dialog (GtkWidget * parent)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (component_id,
|
gnc_gui_component_watch_entity_type (component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
gtk_widget_grab_focus (ti_dialog->account_treeview);
|
gtk_widget_grab_focus (ti_dialog->account_treeview);
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ balance_cell_edited (GtkCellRendererText *cell,
|
|||||||
g_object_set (G_OBJECT(cell), "text", "", NULL);
|
g_object_set (G_OBJECT(cell), "text", "", NULL);
|
||||||
}
|
}
|
||||||
set_final_balance (data->balance_hash, account, amount);
|
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
|
static void
|
||||||
|
@ -746,7 +746,7 @@ gnc_stock_split_dialog (GtkWidget *parent, Account * initial)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (component_id,
|
gnc_gui_component_watch_entity_type (component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
if (fill_account_list (info, initial) == 0)
|
if (fill_account_list (info, initial) == 0)
|
||||||
{
|
{
|
||||||
|
@ -341,11 +341,11 @@ gnc_plugin_page_budget_refresh_cb(GHashTable *changes, gpointer user_data)
|
|||||||
if (changes) {
|
if (changes) {
|
||||||
ei = gnc_gui_get_entity_events(changes, &priv->key);
|
ei = gnc_gui_get_entity_events(changes, &priv->key);
|
||||||
if (ei) {
|
if (ei) {
|
||||||
if (ei->event_mask & GNC_EVENT_DESTROY) {
|
if (ei->event_mask & QOF_EVENT_DESTROY) {
|
||||||
gnc_plugin_page_budget_close_cb(user_data);
|
gnc_plugin_page_budget_close_cb(user_data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ei->event_mask & GNC_EVENT_MODIFY) {
|
if (ei->event_mask & QOF_EVENT_MODIFY) {
|
||||||
DEBUG("refreshing budget view because budget was modified");
|
DEBUG("refreshing budget view because budget was modified");
|
||||||
gnc_plugin_page_budget_view_refresh(page);
|
gnc_plugin_page_budget_view_refresh(page);
|
||||||
}
|
}
|
||||||
@ -425,7 +425,7 @@ gnc_plugin_page_budget_create_widget (GncPluginPage *plugin_page)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity (priv->component_id,
|
gnc_gui_component_watch_entity (priv->component_id,
|
||||||
gnc_budget_get_guid(priv->budget),
|
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);
|
gnc_plugin_page_budget_view_refresh(page);
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page)
|
|||||||
if (acct)
|
if (acct)
|
||||||
gnc_gui_component_watch_entity (
|
gnc_gui_component_watch_entity (
|
||||||
priv->component_manager_id, xaccAccountGetGUID(acct),
|
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. */
|
/* DRH - Probably lots of other stuff from regWindowLedger should end up here. */
|
||||||
@ -2716,11 +2716,11 @@ gnc_plugin_page_register_refresh_cb (GHashTable *changes, gpointer user_data)
|
|||||||
const EventInfo* ei;
|
const EventInfo* ei;
|
||||||
ei = gnc_gui_get_entity_events(changes, &priv->key);
|
ei = gnc_gui_get_entity_events(changes, &priv->key);
|
||||||
if (ei) {
|
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));
|
gnc_main_window_close_page(GNC_PLUGIN_PAGE(page));
|
||||||
return;
|
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
|
/* CAS: We need to also handle account renames, but at
|
||||||
least we don't crash for those. */
|
least we don't crash for those. */
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ gnc_lot_viewer_dialog (Account *account)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (component_id,
|
gnc_gui_component_watch_entity_type (component_id,
|
||||||
GNC_ID_LOT,
|
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);
|
gtk_widget_show_all (lv->window);
|
||||||
gnc_window_adjust_for_screen (GTK_WINDOW(lv->window));
|
gnc_window_adjust_for_screen (GTK_WINDOW(lv->window));
|
||||||
|
@ -1276,7 +1276,7 @@ recn_set_watches_one_account (gpointer data, gpointer user_data)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity (recnData->component_id,
|
gnc_gui_component_watch_entity (recnData->component_id,
|
||||||
xaccTransGetGUID (trans),
|
xaccTransGetGUID (trans),
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1296,7 +1296,7 @@ recn_set_watches (RecnWindow *recnData)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity (recnData->component_id,
|
gnc_gui_component_watch_entity (recnData->component_id,
|
||||||
&recnData->account,
|
&recnData->account,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
account = recn_get_account (recnData);
|
account = recn_get_account (recnData);
|
||||||
|
|
||||||
@ -1329,7 +1329,7 @@ refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
if (changes)
|
if (changes)
|
||||||
{
|
{
|
||||||
info = gnc_gui_get_entity_events (changes, &recnData->account);
|
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);
|
gnc_close_gui_component_by_data (WINDOW_RECONCILE_CM_CLASS, recnData);
|
||||||
return;
|
return;
|
||||||
|
@ -508,7 +508,7 @@ gnc_ledger_display_set_watches (GNCLedgerDisplay *ld, GList *splits)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity_type (ld->component_id,
|
gnc_gui_component_watch_entity_type (ld->component_id,
|
||||||
GNC_ID_ACCOUNT,
|
GNC_ID_ACCOUNT,
|
||||||
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
|
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||||
|
|
||||||
for (node = splits; node; node = node->next)
|
for (node = splits; node; node = node->next)
|
||||||
{
|
{
|
||||||
@ -517,7 +517,7 @@ gnc_ledger_display_set_watches (GNCLedgerDisplay *ld, GList *splits)
|
|||||||
|
|
||||||
gnc_gui_component_watch_entity (ld->component_id,
|
gnc_gui_component_watch_entity (ld->component_id,
|
||||||
xaccTransGetGUID (trans),
|
xaccTransGetGUID (trans),
|
||||||
GNC_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -547,7 +547,7 @@ refresh_handler (GHashTable *changes, gpointer user_data)
|
|||||||
if (changes && has_leader)
|
if (changes && has_leader)
|
||||||
{
|
{
|
||||||
info = gnc_gui_get_entity_events (changes, &ld->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);
|
gnc_close_gui_component (ld->component_id);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user