From 10bc9e42dfba6ed8be41199243d688c2e367dc0d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Jun 2015 18:59:38 +0000 Subject: 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 --- plugins/TooltipNotify/src/TooltipNotify.cpp | 41 ++++++++++++----------------- plugins/TooltipNotify/src/main.cpp | 3 ++- 2 files changed, 19 insertions(+), 25 deletions(-) (limited to 'plugins/TooltipNotify/src') 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); -- cgit v1.2.3