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 --- src/core/stdauth/src/commonheaders.h | 1 - src/core/stdaway/src/commonheaders.h | 1 - src/core/stdchat/src/chat.h | 1 - src/core/stdclist/src/commonheaders.h | 1 - src/core/stdemail/src/commonheaders.h | 2 +- src/core/stdfile/src/commonheaders.h | 1 - src/core/stdfile/src/filerecvdlg.cpp | 2 +- src/core/stdhelp/src/commonheaders.h | 1 - src/core/stdidle/src/commonheaders.h | 1 - src/core/stdmsg/src/commonheaders.h | 1 - src/core/stdssl/src/commonheaders.h | 1 - src/core/stduihist/src/commonheaders.h | 1 - src/core/stdurl/commonheaders.h | 2 +- src/core/stduserinfo/src/commonheaders.h | 2 +- src/core/stduseronline/src/commonheaders.h | 2 +- src/mir_app/src/clistmod.cpp | 17 ---------- src/mir_app/src/clistsettings.cpp | 50 ------------------------------ src/mir_app/src/path.cpp | 4 +-- src/mir_app/src/stdafx.h | 1 - 19 files changed, 7 insertions(+), 85 deletions(-) (limited to 'src') diff --git a/src/core/stdauth/src/commonheaders.h b/src/core/stdauth/src/commonheaders.h index 9ac9abbf2a..209a0a9813 100644 --- a/src/core/stdauth/src/commonheaders.h +++ b/src/core/stdauth/src/commonheaders.h @@ -51,7 +51,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdaway/src/commonheaders.h b/src/core/stdaway/src/commonheaders.h index cac3b84b67..9003105e93 100644 --- a/src/core/stdaway/src/commonheaders.h +++ b/src/core/stdaway/src/commonheaders.h @@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdchat/src/chat.h b/src/core/stdchat/src/chat.h index d2706c8605..da9ed84090 100644 --- a/src/core/stdchat/src/chat.h +++ b/src/core/stdchat/src/chat.h @@ -48,7 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdclist/src/commonheaders.h b/src/core/stdclist/src/commonheaders.h index fb41436634..deff5b4d14 100644 --- a/src/core/stdclist/src/commonheaders.h +++ b/src/core/stdclist/src/commonheaders.h @@ -40,7 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdemail/src/commonheaders.h b/src/core/stdemail/src/commonheaders.h index 5d64b310f8..9515f7b34d 100644 --- a/src/core/stdemail/src/commonheaders.h +++ b/src/core/stdemail/src/commonheaders.h @@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include +#include #include #include #include diff --git a/src/core/stdfile/src/commonheaders.h b/src/core/stdfile/src/commonheaders.h index c028084e09..7c71d453e0 100644 --- a/src/core/stdfile/src/commonheaders.h +++ b/src/core/stdfile/src/commonheaders.h @@ -53,7 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index 21842deb6e..84808b6c2b 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -136,7 +136,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOO REPLACEVARSARRAY rvaVarsToReplace[4]; rvaVarsToReplace[0].key.t = _T("nick"); - rvaVarsToReplace[0].value.t = mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)); + rvaVarsToReplace[0].value.t = mir_tstrdup((TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0)); rvaVarsToReplace[1].key.t = _T("userid"); rvaVarsToReplace[1].value.t = GetContactID(hContact); rvaVarsToReplace[2].key.t = _T("proto"); diff --git a/src/core/stdhelp/src/commonheaders.h b/src/core/stdhelp/src/commonheaders.h index ef3c230d8f..cc3471325e 100644 --- a/src/core/stdhelp/src/commonheaders.h +++ b/src/core/stdhelp/src/commonheaders.h @@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdidle/src/commonheaders.h b/src/core/stdidle/src/commonheaders.h index 565408f1ba..defe5a7a76 100644 --- a/src/core/stdidle/src/commonheaders.h +++ b/src/core/stdidle/src/commonheaders.h @@ -50,7 +50,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdmsg/src/commonheaders.h b/src/core/stdmsg/src/commonheaders.h index 82b52cbfc3..db3d85499d 100644 --- a/src/core/stdmsg/src/commonheaders.h +++ b/src/core/stdmsg/src/commonheaders.h @@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdssl/src/commonheaders.h b/src/core/stdssl/src/commonheaders.h index 1ad4b81011..fcfad31b67 100644 --- a/src/core/stdssl/src/commonheaders.h +++ b/src/core/stdssl/src/commonheaders.h @@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stduihist/src/commonheaders.h b/src/core/stduihist/src/commonheaders.h index 52ab245752..1779af3b6b 100644 --- a/src/core/stduihist/src/commonheaders.h +++ b/src/core/stduihist/src/commonheaders.h @@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdurl/commonheaders.h b/src/core/stdurl/commonheaders.h index 3acf6d5748..38a6e03725 100644 --- a/src/core/stdurl/commonheaders.h +++ b/src/core/stdurl/commonheaders.h @@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include +#include #include #include #include diff --git a/src/core/stduserinfo/src/commonheaders.h b/src/core/stduserinfo/src/commonheaders.h index 49583b6a21..7f9b1dd414 100644 --- a/src/core/stduserinfo/src/commonheaders.h +++ b/src/core/stduserinfo/src/commonheaders.h @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include +#include #include #include #include diff --git a/src/core/stduseronline/src/commonheaders.h b/src/core/stduseronline/src/commonheaders.h index df5c89598e..e654e02b1c 100644 --- a/src/core/stduseronline/src/commonheaders.h +++ b/src/core/stduseronline/src/commonheaders.h @@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include +#include #include #include #include diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index 9d54905a72..7ce932340c 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -110,21 +110,6 @@ TCHAR* fnGetStatusModeDescription(int mode, int flags) return (flags & GSMDF_UNTRANSLATED) ? descr : TranslateTS(descr); } -static INT_PTR GetStatusModeDescription(WPARAM wParam, LPARAM lParam) -{ - TCHAR *buf1 = cli.pfnGetStatusModeDescription(wParam, lParam); - - if (!(lParam & GSMDF_TCHAR)) { - static char szMode[64]; - char *buf2 = mir_u2a(buf1); - strncpy_s(szMode, buf2, _TRUNCATE); - mir_free(buf2); - return (INT_PTR)szMode; - } - - return (INT_PTR)buf1; -} - static int ProtocolAck(WPARAM, LPARAM lParam) { ACKDATA *ack = (ACKDATA *) lParam; @@ -491,8 +476,6 @@ int LoadContactListModule2(void) CreateServiceFunction(MS_CLIST_CONTACTDOUBLECLICKED, ContactDoubleClicked); CreateServiceFunction(MS_CLIST_CONTACTFILESDROPPED, ContactFilesDropped); - CreateServiceFunction(MS_CLIST_GETSTATUSMODEDESCRIPTION, GetStatusModeDescription); - CreateServiceFunction(MS_CLIST_GETCONTACTDISPLAYNAME, GetContactDisplayName); CreateServiceFunction(MS_CLIST_INVALIDATEDISPLAYNAME, InvalidateDisplayName); CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE, CompareContacts); CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP, ContactChangeGroup); diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index 66792adb9a..050c67a9a3 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -140,56 +140,6 @@ TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode) return (cacheEntry == NULL) ? mir_tstrdup(buffer) : buffer; } -INT_PTR GetContactDisplayName(WPARAM hContact, LPARAM lParam) -{ - static char retVal[200]; - ClcCacheEntry *cacheEntry = NULL; - - if (lParam & GCDNF_UNICODE) - return (INT_PTR)cli.pfnGetContactDisplayName(hContact, lParam & ~GCDNF_UNICODE); - - if (lParam & GCDNF_NOCACHE) - lParam &= ~GCDNF_NOCACHE; - else if (lParam != GCDNF_NOMYHANDLE) { - cacheEntry = cli.pfnGetCacheEntry(hContact); - if (cacheEntry->tszName) { - strncpy_s(retVal, _T2A(cacheEntry->tszName), _TRUNCATE); - return (INT_PTR)retVal; - } - } - - CONTACTINFO ci = { 0 }; - ci.cbSize = sizeof(ci); - ci.hContact = hContact; - if (ci.hContact == NULL) // killme !!!!!!!!!! - ci.szProto = "ICQ"; - ci.dwFlag = ((lParam == GCDNF_NOMYHANDLE) ? CNF_DISPLAYNC : CNF_DISPLAY) | CNF_TCHAR; - if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci)) { - if (ci.type == CNFT_ASCIIZ) { - strncpy_s(retVal, _T2A(ci.pszVal), _TRUNCATE); - if (cacheEntry == NULL) { - mir_free(ci.pszVal); - return (INT_PTR)mir_strdup(retVal); - } - - cacheEntry->tszName = ci.pszVal; - return (INT_PTR)retVal; - } - if (ci.type == CNFT_DWORD) { - _ltoa(ci.dVal, retVal, 10); - if (cacheEntry == NULL) - return (INT_PTR)mir_strdup(retVal); - - cacheEntry->tszName = mir_a2u(retVal); - return (INT_PTR)retVal; - } - } - - CallContactService(hContact, PSS_GETINFO, SGIF_MINIMAL, 0); - char* result = Translate("(Unknown contact)"); - return (INT_PTR)((cacheEntry == NULL) ? mir_strdup(result) : result); -} - INT_PTR InvalidateDisplayName(WPARAM wParam, LPARAM) { cli.pfnInvalidateDisplayNameCacheEntry(wParam); diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp index 058d9b4284..73189cc361 100644 --- a/src/mir_app/src/path.cpp +++ b/src/mir_app/src/path.cpp @@ -80,7 +80,7 @@ static __forceinline char *mir_a2x(const char*, const char *s) { return mir_strd static __forceinline char *GetContactNickX(const char*, MCONTACT hContact) { - return mir_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0)); + return mir_strdup(_T2A(cli.pfnGetContactDisplayName(hContact, 0))); } static __forceinline char *GetContactIDX(const char*, MCONTACT hContact) @@ -167,7 +167,7 @@ static __forceinline TCHAR* mir_a2x(const TCHAR *, const char *s) { return mir_a static __forceinline TCHAR* GetContactNickX(const TCHAR*, MCONTACT hContact) { - return mir_tstrdup((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)); + return mir_tstrdup(cli.pfnGetContactDisplayName(hContact, 0)); } static __forceinline TCHAR* GetContactIDX(const TCHAR*, MCONTACT hContact) diff --git a/src/mir_app/src/stdafx.h b/src/mir_app/src/stdafx.h index b619bcf35a..935e2dd4c1 100644 --- a/src/mir_app/src/stdafx.h +++ b/src/mir_app/src/stdafx.h @@ -68,7 +68,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include -- cgit v1.2.3