summaryrefslogtreecommitdiff
path: root/plugins/TooltipNotify
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/TooltipNotify
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/TooltipNotify')
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp41
-rw-r--r--plugins/TooltipNotify/src/main.cpp3
2 files changed, 19 insertions, 25 deletions
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 649d9c07ef..08a8e0864f 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -861,37 +861,30 @@ BOOL CTooltipNotify::ContactsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
}
-
-
TCHAR *CTooltipNotify::StatusToString(int iStatus, TCHAR *szStatus, int iBufSize)
{
- if((iStatus>=ID_STATUS_OFFLINE) && (iStatus<=ID_STATUS_OUTTOLUNCH))
- {
- mir_tstrncpy(szStatus, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,iStatus,GSMDF_TCHAR), iBufSize);
- }
- else
- {
- switch(iStatus)
- {
- case ID_TTNTF_STATUS_TYPING:
- mir_tstrncpy(szStatus, TranslateT("Typing"), iBufSize);
- break;
+ if (iStatus >= ID_STATUS_OFFLINE && iStatus <= ID_STATUS_OUTTOLUNCH)
+ mir_tstrncpy(szStatus, pcli->pfnGetStatusModeDescription(iStatus, 0), iBufSize);
+ else {
+ switch(iStatus) {
+ case ID_TTNTF_STATUS_TYPING:
+ mir_tstrncpy(szStatus, TranslateT("Typing"), iBufSize);
+ break;
- case ID_TTNTF_STATUS_IDLE:
- mir_tstrncpy(szStatus, TranslateT("Idle"), iBufSize);
- break;
+ case ID_TTNTF_STATUS_IDLE:
+ mir_tstrncpy(szStatus, TranslateT("Idle"), iBufSize);
+ break;
- case ID_TTNTF_STATUS_NOT_IDLE:
- mir_tstrncpy(szStatus, TranslateT("Not Idle"), iBufSize);
- break;
+ case ID_TTNTF_STATUS_NOT_IDLE:
+ mir_tstrncpy(szStatus, TranslateT("Not Idle"), iBufSize);
+ break;
- default:
- mir_tstrncpy(szStatus, TranslateT("Unknown"), iBufSize);
- break;
+ default:
+ mir_tstrncpy(szStatus, TranslateT("Unknown"), iBufSize);
+ break;
}
}
return szStatus;
-
}
TCHAR *CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *szString, int iBufSize)
@@ -906,7 +899,7 @@ TCHAR *CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *
const char* szProto =
hContact==0 ? "Proto" : (char*)::GetContactProto(hContact);
const TCHAR* szContactName =
- (TCHAR *)::CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
+ (TCHAR *)::pcli->pfnGetContactDisplayName(hContact, 0);
memset(szString, 0, iBufSize*sizeof(TCHAR));
diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp
index d53c350fea..24c2e25929 100644
--- a/plugins/TooltipNotify/src/main.cpp
+++ b/plugins/TooltipNotify/src/main.cpp
@@ -21,7 +21,7 @@ HINSTANCE g_hInstDLL = 0;
// Main global object
static CTooltipNotify *g_pTooltipNotify = 0;
int hLangpack;
-
+CLIST_INTERFACE *pcli;
//================================================================================
// plugin init/deinit routines
@@ -56,6 +56,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&sPluginInfo);
+ mir_getCLI();
g_pTooltipNotify = new CTooltipNotify();
assert(g_pTooltipNotify!=0);