diff options
author | Mataes <mataes2007@gmail.com> | 2019-11-04 22:52:17 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2019-11-04 22:52:40 +0300 |
commit | 4d6fa4f3f9fe692486a1e35cfe85a14ddac79d51 (patch) | |
tree | a10699427399a078a70c0c2351cfa6ce654edb71 | |
parent | 7d716084840c4a704c856cbc7f7616ce3a0825a2 (diff) |
newstory: added hook for ME_DB_EVENT_EDITED
-rw-r--r-- | plugins/NewStory/src/history.cpp | 8 | ||||
-rw-r--r-- | plugins/NewStory/src/history.h | 1 | ||||
-rw-r--r-- | plugins/NewStory/src/main.cpp | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp index 6723d7f48c..79d0a7678a 100644 --- a/plugins/NewStory/src/history.cpp +++ b/plugins/NewStory/src/history.cpp @@ -29,12 +29,20 @@ int evtEventDeleted(WPARAM wParam, LPARAM lParam) return 0; } +int evtEventEdited(WPARAM wParam, LPARAM lParam) +{ + HWND hwnd = WindowList_Find(hNewstoryWindows, (UINT_PTR)wParam); + SendMessage(hwnd, UM_EDITEVENT, wParam, lParam); + return 0; +} + void InitHistory() { hNewstoryWindows = WindowList_Create(); HookEvent(ME_DB_EVENT_ADDED, evtEventAdded); HookEvent(ME_DB_EVENT_DELETED, evtEventDeleted); + HookEvent(ME_DB_EVENT_EDITED, evtEventEdited); } void FreeHistory() diff --git a/plugins/NewStory/src/history.h b/plugins/NewStory/src/history.h index cf89af421e..8d699bcbfe 100644 --- a/plugins/NewStory/src/history.h +++ b/plugins/NewStory/src/history.h @@ -16,6 +16,7 @@ enum UM_ADDEVENT, UM_ADDEVENTFILTER, UM_REMOVEEVENT, + UM_EDITEVENT, UM_SELECTED, diff --git a/plugins/NewStory/src/main.cpp b/plugins/NewStory/src/main.cpp index 69a455ff93..59800536b0 100644 --- a/plugins/NewStory/src/main.cpp +++ b/plugins/NewStory/src/main.cpp @@ -11,8 +11,6 @@ #include "stdafx.h" -HANDLE hhkModulesLoaded = 0, hhkOptInitialise = 0, hhkTTBLoaded = 0; - CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// @@ -104,13 +102,12 @@ int CMPlugin::Load() CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, svcShowNewstory); CreateServiceFunction("Newstory/System", svcShowSystemNewstory); - hhkModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, evtModulesLoaded); + HookEvent(ME_SYSTEM_MODULESLOADED, evtModulesLoaded); return 0; } int CMPlugin::Unload() { - UnhookEvent(hhkModulesLoaded); FreeHistory(); return 0; } |