diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-30 18:59:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-30 18:59:38 +0000 |
commit | 10bc9e42dfba6ed8be41199243d688c2e367dc0d (patch) | |
tree | 891aca91eeb2feddb6c76498c4eb880689360fe6 /protocols/MRA/src | |
parent | 5dac5be47f2d9af8cbceead6511ff4c0fc40bab5 (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 'protocols/MRA/src')
-rw-r--r-- | protocols/MRA/src/MraChat.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraSelectEMail.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_menus.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 6 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_svcs.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/stdafx.h | 4 |
8 files changed, 10 insertions, 14 deletions
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp index 758669b69b..2d63e092ce 100644 --- a/protocols/MRA/src/MraChat.cpp +++ b/protocols/MRA/src/MraChat.cpp @@ -37,7 +37,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact) GCSESSION gcw = { sizeof(gcw) };
gcw.iType = GCW_CHATROOM;
gcw.pszModule = m_szModuleName;
- gcw.ptszName = GetContactNameW(hContact);
+ gcw.ptszName = pcli->pfnGetContactDisplayName(hContact, 0);
gcw.ptszID = wszEMail;
gcw.ptszStatusbarText = _T("status bar");
gcw.dwItemData = (DWORD)hContact;
@@ -114,7 +114,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(MCONTACT hContactChatSession, MCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, NULL);
wszUID = lpszUID;
if (hContactSender)
- gce.ptszNick = GetContactNameW(hContactSender);
+ gce.ptszNick = pcli->pfnGetContactDisplayName(hContactSender, 0);
else
gce.ptszNick = wszUID;
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 94a41372e4..ffc0918b64 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -357,7 +357,7 @@ int CMraProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hCo for (int i = 0; i < nContacts; i++) {
if (IsContactMra(hContactsList[i]))
if (mraGetStringW(hContactsList[i], "e-mail", wszEmail))
- wszData += wszEmail + ';' + GetContactNameW(hContactsList[i]) + ';';
+ wszData += wszEmail + ';' + pcli->pfnGetContactDisplayName(hContactsList[i], 0) + ';';
}
bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp index f956bddbec..f43beb4a9d 100644 --- a/protocols/MRA/src/MraSelectEMail.cpp +++ b/protocols/MRA/src/MraSelectEMail.cpp @@ -103,7 +103,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg, UINT message, WPARAM wParam case MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD:
{
CMStringA szUrl;
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", GetContactNameA(dat->hContact), szEmail);
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", pcli->pfnGetContactDisplayName(dat->hContact, 0), szEmail);
dat->ppro->MraMPopSessionQueueAddUrl(dat->ppro->hMPopSessionQueue, szUrl);
}
break;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 2ee94802f0..ef7ded50ad 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1114,7 +1114,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w // reply to some user blog
if (dat->hContact) {
- szBuff.Format(TranslateT("Reply to %s blog status"), GetContactNameW(dat->hContact));
+ szBuff.Format(TranslateT("Reply to %s blog status"), pcli->pfnGetContactDisplayName(dat->hContact, 0));
SetWindowText(hWndDlg, szBuff.c_str());
}
else SetWindowText(hWndDlg, TranslateT("Set my blog status"));
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index ce92e1781c..b6cc63c25e 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -131,7 +131,7 @@ INT_PTR CMraProto::MraSendPostcard(WPARAM wParam, LPARAM) CMStringA szUrl, szEmail;
if (GetContactFirstEMail(wParam, FALSE, szEmail)) {
szEmail.MakeLower();
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", GetContactNameA((HANDLE)wParam), szEmail);
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", pcli->pfnGetContactDisplayName(wParam, 0), szEmail);
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 3279852f6a..6b42437dbf 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -693,7 +693,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf) if (dwTemp == ID_STATUS_OFFLINE) { // was/now invisible
CMStringW szEmail, szBuff;
mraGetStringW(hContact, "e-mail", szEmail);
- szBuff.Format(L"%s <%s> - %s", GetContactNameW(hContact), szEmail, TranslateT("invisible status changed"));
+ szBuff.Format(L"%s <%s> - %s", pcli->pfnGetContactDisplayName(hContact, 0), szEmail, TranslateT("invisible status changed"));
MraPopupShowFromContactW(hContact, MRA_POPUP_TYPE_INFORMATION, 0, szBuff);
MraSetContactStatus(hContact, ID_STATUS_INVISIBLE);
@@ -1261,7 +1261,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS),
dwID, dwGroupID, dwContactFlag, dwContactSeverFlags, dwTemp, NULL, &wszNick, &szCustomPhones);
if (wszNick.IsEmpty()) { // set the server-side nick
- wszNick = GetContactNameW(hContact);
+ wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
MraModifyContact(hContact, &dwID, &dwContactFlag, &dwGroupID, &szEmail, &wszNick, &szCustomPhones);
}
}
@@ -1312,7 +1312,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) SetExtraIcons(hContact);
MraSetContactStatus(hContact, ID_STATUS_ONLINE);
- CMStringW wszCustomName = GetContactNameW(hContact);
+ CMStringW wszCustomName = pcli->pfnGetContactDisplayName(hContact, 0);
MraAddContact(hContact, (CONTACT_FLAG_VISIBLE | CONTACT_FLAG_MULTICHAT), -1, szEmail, wszCustomName);
}
else {
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 44b6dde3ac..0440cfa9eb 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -202,7 +202,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) // always store custom nick
CMStringW wszNick;
if (cws->value.type == DBVT_DELETED) {
- wszNick = GetContactNameW(hContact);
+ wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
db_set_ws(hContact, "CList", "MyHandle", wszNick);
}
else if (cws->value.pszVal) {
diff --git a/protocols/MRA/src/stdafx.h b/protocols/MRA/src/stdafx.h index f5b3741957..8262f8ef69 100644 --- a/protocols/MRA/src/stdafx.h +++ b/protocols/MRA/src/stdafx.h @@ -25,7 +25,6 @@ #include <m_system_cpp.h>
#include <m_protocols.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_cluiframes.h>
#include <m_clui.h>
#include <m_genmenu.h>
@@ -179,9 +178,6 @@ void InitExtraIcons(); CMStringA MraGetSelfVersionString();
-#define GetContactNameA(Contact) (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, 0)
-#define GetContactNameW(Contact) (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, GCDNF_UNICODE)
-
#define SetBit(bytes, bitpos) bytes |= (1<<bitpos)
#define GetBit(bytes, bitpos) ((bytes&(1<<bitpos))? TRUE:FALSE)
|