summaryrefslogtreecommitdiff
path: root/src/mir_app
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 /src/mir_app
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 'src/mir_app')
-rw-r--r--src/mir_app/src/clistmod.cpp17
-rw-r--r--src/mir_app/src/clistsettings.cpp50
-rw-r--r--src/mir_app/src/path.cpp4
-rw-r--r--src/mir_app/src/stdafx.h1
4 files changed, 2 insertions, 70 deletions
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 <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_avatars.h>
#include <m_button.h>
#include <m_protosvc.h>