From c11a4fe35d96f7f118a7286292bc33971180972b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 21 Jul 2012 08:23:09 +0000 Subject: events declaration moved into Load() git-svn-id: http://svn.miranda-ng.org/main/trunk@1090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/dbintf.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/Db3x_mmap/dbintf.cpp b/plugins/Db3x_mmap/dbintf.cpp index 831b147ea5..fffc01d728 100644 --- a/plugins/Db3x_mmap/dbintf.cpp +++ b/plugins/Db3x_mmap/dbintf.cpp @@ -69,11 +69,6 @@ CDdxMmap::CDdxMmap(const TCHAR* tszFileName) : m_codePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0); m_hCacheHeap = HeapCreate(0, 0, 0); m_hModHeap = HeapCreate(0,0,0); - - hSettingChangeEvent = CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED); - hEventAddedEvent = CreateHookableEvent(ME_DB_EVENT_ADDED); - hEventDeletedEvent = CreateHookableEvent(ME_DB_EVENT_DELETED); - hEventFilterAddedEvent = CreateHookableEvent(ME_DB_EVENT_FILTER_ADD); } CDdxMmap::~CDdxMmap() @@ -129,6 +124,14 @@ int CDdxMmap::Load(bool bSkipInit) if ( !bSkipInit) { if (InitCache()) return 1; if (InitModuleNames()) return 1; + + hContactDeletedEvent = CreateHookableEvent(ME_DB_CONTACT_DELETED); + hContactAddedEvent = CreateHookableEvent(ME_DB_CONTACT_ADDED); + hSettingChangeEvent = CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED); + + hEventAddedEvent = CreateHookableEvent(ME_DB_EVENT_ADDED); + hEventDeletedEvent = CreateHookableEvent(ME_DB_EVENT_DELETED); + hEventFilterAddedEvent = CreateHookableEvent(ME_DB_EVENT_FILTER_ADD); } return 0; } -- cgit v1.2.3