diff options
Diffstat (limited to 'plugins/BuddyExpectator/src')
-rw-r--r-- | plugins/BuddyExpectator/src/BuddyExpectator.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 8e84683491..3c444dcf0a 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -21,6 +21,7 @@ #include "stdafx.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -231,7 +232,7 @@ bool isContactGoneFor(MCONTACT hContact, int days) ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
mir_sntprintf(ppd.lptzContactName, _countof(ppd.lptzContactName), TranslateT("Hiding %s (%S)"),
- CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
+ pcli->pfnGetContactDisplayName(hContact, 0),
GetContactProto(hContact));
mir_sntprintf(ppd.lptzText, _countof(ppd.lptzText), TranslateT("%d days since last message"), daysSinceMessage);
@@ -267,7 +268,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message) POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -286,7 +287,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message) cle.pszService = "BuddyExpectator/actionReturned";
cle.flags = CLEF_TCHAR;
- TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR* nick = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tmpMsg[512];
mir_sntprintf(tmpMsg, _countof(tmpMsg), _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
@@ -305,7 +306,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message) POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -324,7 +325,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message) cle.hIcon = hIcon;
cle.pszService = "BuddyExpectator/actionStillAbsent";
- TCHAR* nick = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ TCHAR* nick = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tmpMsg[512];
mir_sntprintf(tmpMsg, _countof(tmpMsg), _T("%s %s"), nick, message);
cle.ptszTooltip = tmpMsg;
@@ -489,7 +490,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- _tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzContactName, (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -663,6 +664,7 @@ int onShutdown(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
InitOptions();
|