diff --git a/lib/libqof/qof/qofevent.c b/lib/libqof/qof/qofevent.c index 7833e7b395..76504c6f56 100644 --- a/lib/libqof/qof/qofevent.c +++ b/lib/libqof/qof/qofevent.c @@ -205,7 +205,7 @@ qof_event_generate_internal (QofEntity *entity, QofEventId event_id, g_return_if_fail(entity); - if (event_id <= QOF_DEFAULT_EVENT_LIMIT) + if (event_id <= QOF_EVENT_BASE) { use_old_handlers = TRUE; } diff --git a/lib/libqof/qof/qofevent.h b/lib/libqof/qof/qofevent.h index 899c0ddfd5..a5e148e44a 100644 --- a/lib/libqof/qof/qofevent.h +++ b/lib/libqof/qof/qofevent.h @@ -40,23 +40,36 @@ /** Define the type of events allowed. */ typedef gint QofEventId; +/** \brief Allow application-specific events to be created. + +Used together with QOF_EVENT_BASE to simplify creation +of application events without interfering with any new +events added within QOF. + +/verbatim +#define APP_EVENT_A QOF_MAKE_EVENT(QOF_EVENT_BASE+0) +#define APP_EVENT_B QOF_MAKE_EVENT(QOF_EVENT_BASE+1) +/endverbatim +*/ +#define QOF_MAKE_EVENT(x) (1<