summaryrefslogtreecommitdiff
path: root/plugins/NewEventNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
commit10bc9e42dfba6ed8be41199243d688c2e367dc0d (patch)
tree891aca91eeb2feddb6c76498c4eb880689360fe6 /plugins/NewEventNotify/src
parent5dac5be47f2d9af8cbceead6511ff4c0fc40bab5 (diff)
MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members
git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewEventNotify/src')
-rw-r--r--plugins/NewEventNotify/src/main.cpp17
-rw-r--r--plugins/NewEventNotify/src/popup.cpp2
2 files changed, 6 insertions, 13 deletions
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 63fd90ea86..086a51f325 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -30,6 +30,7 @@ extern PLUGIN_DATA* PopupList[20];
//---------------------------
//---Some global variables for the plugin
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
PLUGIN_OPTIONS pluginOptions;
int hLangpack;
@@ -50,12 +51,6 @@ PLUGININFOEX pluginInfo = {
//---------------------------
//---Hooks
-//---Handles to my hooks, needed to unhook them again
-HANDLE hHookedInit;
-HANDLE hHookedOpt;
-HANDLE hHookedNewEvent;
-HANDLE hHookedDeletedEvent;
-
//---Called when a new event is added to the database
//wParam: contact-handle
//lParam: dbevent-handle
@@ -113,7 +108,7 @@ int HookedNewEvent(WPARAM hContact, LPARAM hDbEvent)
//---Called when all the modules are loaded
int HookedInit(WPARAM, LPARAM)
{
- hHookedNewEvent = HookEvent(ME_DB_EVENT_ADDED, HookedNewEvent);
+ HookEvent(ME_DB_EVENT_ADDED, HookedNewEvent);
// Plugin sweeper support
if (ServiceExists("PluginSweeper/Add"))
CallService("PluginSweeper/Add", (WPARAM)MODULE, (LPARAM)MODULE);
@@ -142,10 +137,11 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load(void)
{
- hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
- hHookedOpt = HookEvent(ME_OPT_INITIALISE, HookedOptions);
+ HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
+ HookEvent(ME_OPT_INITIALISE, HookedOptions);
mir_getLP(&pluginInfo);
+ mir_getCLI();
OptionsInit(&pluginOptions);
pluginOptions.hInst = hInst;
@@ -155,9 +151,6 @@ extern "C" __declspec(dllexport) int Load(void)
extern "C" __declspec(dllexport) int Unload(void)
{
- UnhookEvent(hHookedNewEvent);
- UnhookEvent(hHookedOpt);
- UnhookEvent(hHookedInit);
return 0;
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index 487aa7d1fc..d3dfa415f7 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -494,7 +494,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U
_tcsncpy(pudw.lptzText, TranslateTS(sampleEvent), MAX_SECONDLINE);
}
else { // get the needed event data
- _tcsncpy(pudw.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(pudw.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(pudw.lptzText, ptrT(GetEventPreview(&dbe)), MAX_SECONDLINE);
}