diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-05 22:10:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-05 22:10:25 +0300 |
commit | 35e2289786a7f1542573d1a58ebc971970ea981c (patch) | |
tree | da8887c793611fdbf6072fd477fd8c01c60b8b02 /protocols | |
parent | f7c00d6dc53774d16b9721e79ed5d4017af63884 (diff) |
CLIST_INTERFACE::pfnGetContactDisplayName => Clist_GetContactDisplayName
Diffstat (limited to 'protocols')
25 files changed, 35 insertions, 46 deletions
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index 2e7f7849dd..ee2810a5c7 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // TODO: Make following as "globals" structure?
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
int hLangpack;
HINSTANCE g_hInstance;
@@ -68,7 +67,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
InitIcons();
InitContactMenus();
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 0203045c42..f52f9087a6 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -103,7 +103,7 @@ void FacebookProto::ProcessFriendList(void*) // Notify it, if user wants to be notified if (getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) { std::string url = FACEBOOK_URL_PROFILE + fbu->user_id; - NotifyEvent(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Contact is back on server-list."), hContact, EVENT_FRIENDSHIP, &url); + NotifyEvent(Clist_GetContactDisplayName(hContact), TranslateT("Contact is back on server-list."), hContact, EVENT_FRIENDSHIP, &url); } } @@ -127,7 +127,7 @@ void FacebookProto::ProcessFriendList(void*) // Notify it, if user wants to be notified if (getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) { std::string url = FACEBOOK_URL_PROFILE + std::string(id); - NotifyEvent(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Contact is no longer on server-list."), hContact, EVENT_FRIENDSHIP, &url); + NotifyEvent(Clist_GetContactDisplayName(hContact), TranslateT("Contact is no longer on server-list."), hContact, EVENT_FRIENDSHIP, &url); } } } diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 94ad21a6da..42852de473 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -819,7 +819,7 @@ retry: gce.ptszUID = id;
wchar_t* messageT = mir_utf8decodeW(e->event.msg.message);
gce.ptszText = messageT;
- gce.ptszNick = (wchar_t*)pcli->pfnGetContactDisplayName(getcontact(e->event.msg.sender, 1, 0, nullptr), 0);
+ gce.ptszNick = (wchar_t*)Clist_GetContactDisplayName(getcontact(e->event.msg.sender, 1, 0, nullptr));
gce.time = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time;
gce.dwFlags = GCEF_ADDTOLOG;
debugLogW(L"mainthread() (%x): Conference message to room %s & id %s.", this, chat, id);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 7cde32feef..f1d5e11aec 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -282,7 +282,7 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c unknown >= getWord(GG_KEY_GC_COUNT_UNKNOWN, GG_KEYDEF_GC_COUNT_UNKNOWN))))
{
wchar_t *senderName = unknownSender ?
- TranslateT("Unknown") : pcli->pfnGetContactDisplayName(getcontact(sender, 0, 0, nullptr), 0);
+ TranslateT("Unknown") : Clist_GetContactDisplayName(getcontact(sender, 0, 0, nullptr));
wchar_t error[256];
mir_snwprintf(error, TranslateT("%s has initiated conference with %d participants (%d unknowns).\nDo you want to participate?"),
senderName, recipients_count + 1, unknown);
@@ -309,7 +309,7 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c wchar_t *senderName;
if (sender)
{
- senderName = pcli->pfnGetContactDisplayName(getcontact(sender, 1, 0, nullptr), 0);
+ senderName = Clist_GetContactDisplayName(getcontact(sender, 1, 0, nullptr));
mir_snwprintf(status, TranslateT("%s initiated the conference."), senderName);
}
else
@@ -365,7 +365,7 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c MCONTACT hContact = getcontact(chat->recipients[i], 1, 0, nullptr);
UIN2IDT(chat->recipients[i], id);
if (hContact)
- gce.ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ gce.ptszNick = Clist_GetContactDisplayName(hContact);
else
gce.ptszNick = TranslateT("'Unknown'");
gce.bIsMe = 0;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 38540c4620..844d3a4c28 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -423,7 +423,7 @@ static INT_PTR CALLBACK gg_img_dlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // Set main window image
Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(IDI_IMAGE));
- wchar_t *szName = pcli->pfnGetContactDisplayName(dat->hContact, 0), szTitle[128];
+ wchar_t *szName = Clist_GetContactDisplayName(dat->hContact), szTitle[128];
if (dat->bReceiving)
mir_snwprintf(szTitle, TranslateT("Image from %s"), szName);
else
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index 46e5b68c17..4f6cd06873 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -31,7 +31,6 @@ CMPlugin g_plugin;
HINSTANCE hInst;
int hLangpack;
-CLIST_INTERFACE *pcli;
bool g_bTerminated;
BOOL bPopupService = FALSE;
@@ -85,7 +84,6 @@ IconItem iconList[] = extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
srand(time(nullptr));
_tzset();
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp index 0c6ac962d3..b9b97b89a8 100644 --- a/protocols/IcqOscarJ/src/stdpackets.cpp +++ b/protocols/IcqOscarJ/src/stdpackets.cpp @@ -1346,7 +1346,7 @@ DWORD CIcqProto::icq_sendSMSServ(const char *szPhoneNumber, const char *szMsg) strftime(szTime, sizeof(szTime), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now));
/* Sun, 00 Jan 0000 00:00:00 GMT */
- char *szMyNick = null_strdup(_T2A(pcli->pfnGetContactDisplayName(NULL, 0)));
+ char *szMyNick = null_strdup(_T2A(Clist_GetContactDisplayName(0)));
size_t nBufferSize = 1 + mir_strlen(szMyNick) + mir_strlen(szPhoneNumber) + mir_strlen(szMsg) + sizeof("<icq_sms_message><destination></destination><text></text><codepage>1252</codepage><encoding>utf8</encoding><senders_UIN>0000000000</senders_UIN><senders_name></senders_name><delivery_receipt>Yes</delivery_receipt><time>Sun, 00 Jan 0000 00:00:00 GMT</time></icq_sms_message>");
if (szBuffer = (char *)_alloca(nBufferSize)) {
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index d4b1aba429..cc3ce357b1 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -544,7 +544,7 @@ char* NickFromHandle(MCONTACT hContact) if (hContact == INVALID_CONTACT_ID)
return null_strdup(Translate("<invalid>"));
- return null_strdup(_T2A(pcli->pfnGetContactDisplayName(hContact, 0)));
+ return null_strdup(_T2A(Clist_GetContactDisplayName(hContact)));
}
char* NickFromHandleUtf(MCONTACT hContact)
@@ -552,7 +552,7 @@ char* NickFromHandleUtf(MCONTACT hContact) if (hContact == INVALID_CONTACT_ID)
return ICQTranslateUtf(LPGEN("<invalid>"));
- return make_utf8_string(pcli->pfnGetContactDisplayName(hContact, 0));
+ return make_utf8_string(Clist_GetContactDisplayName(hContact));
}
char* strUID(DWORD dwUIN, char *pszUID)
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 41f505a4ce..50cfa1acae 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1282,7 +1282,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g if (item != nullptr) {
item->type = L"conference";
MCONTACT hContact = ppro->HContactFromJID(item->jid);
- item->name = pcli->pfnGetContactDisplayName(hContact, 0);
+ item->name = Clist_GetContactDisplayName(hContact);
ppro->AddEditBookmark(item);
}
}
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index ec31312ec5..866e09447d 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -112,7 +112,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT return;
if (cws->value.type == DBVT_DELETED) {
- wchar_t *nick = pcli->pfnGetContactDisplayName(hContact, GCDNF_NOMYHANDLE);
+ wchar_t *nick = Clist_GetContactDisplayName(hContact, GCDNF_NOMYHANDLE);
AddContactToRoster(item->jid, nick, item->group);
mir_free(nick);
return;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 240330daec..a18c7f1152 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -516,7 +516,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM) if (ListGetItemPtr(LIST_BOOKMARK, roomID) == nullptr) {
JABBER_LIST_ITEM *item = new JABBER_LIST_ITEM();
item->jid = mir_wstrdup(roomID);
- item->name = pcli->pfnGetContactDisplayName(hContact, 0);
+ item->name = Clist_GetContactDisplayName(hContact);
item->type = L"conference";
item->nick = getWStringA(hContact, "MyNick");
AddEditBookmark(item);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 88304d7830..4496d76659 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -1158,7 +1158,7 @@ void CJabberDlgPrivacyLists::DrawRulesList(LPDRAWITEMSTRUCT lpdis) DrawNextRulePart(lpdis->hDC, clLine2, TranslateT("'"), &rc);
if (MCONTACT hContact = m_proto->HContactFromJID(pRule->GetValue())) {
- wchar_t *szName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(hContact);
if (szName) {
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT(" (nickname: "), &rc);
DrawNextRulePart(lpdis->hDC, clLine1, szName, &rc);
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp index 9d80158bb0..49d172e9bb 100644 --- a/protocols/MRA/src/MraChat.cpp +++ b/protocols/MRA/src/MraChat.cpp @@ -28,7 +28,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact) CMStringW wszEMail;
mraGetStringW(hContact, "e-mail", wszEMail);
- if (Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszEMail, pcli->pfnGetContactDisplayName(hContact, 0), (void*)hContact))
+ if (Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszEMail, Clist_GetContactDisplayName(hContact), (void*)hContact))
return 1;
for (auto &it : lpwszStatuses)
@@ -90,7 +90,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(MCONTACT hContactChatSession, MCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, nullptr);
wszUID = lpszUID;
if (hContactSender)
- gce.ptszNick = pcli->pfnGetContactDisplayName(hContactSender, 0);
+ gce.ptszNick = Clist_GetContactDisplayName(hContactSender);
else
gce.ptszNick = wszUID;
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 819587e4e6..9d4cff4987 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -343,7 +343,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 + ';' + pcli->pfnGetContactDisplayName(hContactsList[i], 0) + ';';
+ wszData += wszEmail + ';' + Clist_GetContactDisplayName(hContactsList[i]) + ';';
}
bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp index 51d9078ff2..68b1e65b31 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", _T2A(pcli->pfnGetContactDisplayName(dat->hContact, 0)), szEmail.c_str());
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", _T2A(Clist_GetContactDisplayName(dat->hContact)), szEmail.c_str());
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 6fc14f60e7..1549e50769 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1102,7 +1102,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"), pcli->pfnGetContactDisplayName(dat->hContact, 0));
+ szBuff.Format(TranslateT("Reply to %s blog status"), Clist_GetContactDisplayName(dat->hContact));
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 c0fdb52406..572d64b0b8 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -130,7 +130,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", _T2A(pcli->pfnGetContactDisplayName(wParam, 0)), szEmail.c_str());
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", _T2A(Clist_GetContactDisplayName(wParam)), szEmail.c_str());
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index aa1048ddf4..0c057efd27 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -699,7 +699,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf) if (dwTemp == ID_STATUS_OFFLINE) { // was/now invisible
CMStringW wszEmail, wszBuff;
mraGetStringW(hContact, "e-mail", wszEmail);
- wszBuff.Format(L"%s <%s> - %s", pcli->pfnGetContactDisplayName(hContact, 0), wszEmail.c_str(), TranslateT("invisible status changed"));
+ wszBuff.Format(L"%s <%s> - %s", Clist_GetContactDisplayName(hContact), wszEmail.c_str(), TranslateT("invisible status changed"));
MraPopupShowFromContactW(hContact, MRA_POPUP_TYPE_INFORMATION, wszBuff);
MraSetContactStatus(hContact, ID_STATUS_INVISIBLE);
@@ -1266,7 +1266,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, nullptr, &wszNick, &szCustomPhones);
if (wszNick.IsEmpty()) { // set the server-side nick
- wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ wszNick = Clist_GetContactDisplayName(hContact);
MraModifyContact(hContact, &dwID, &dwContactFlag, &dwGroupID, &szEmail, &wszNick, &szCustomPhones);
}
}
@@ -1317,7 +1317,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) SetExtraIcons(hContact);
MraSetContactStatus(hContact, ID_STATUS_ONLINE);
- CMStringW wszCustomName = pcli->pfnGetContactDisplayName(hContact, 0);
+ CMStringW wszCustomName = Clist_GetContactDisplayName(hContact);
MraAddContact(hContact, (CONTACT_FLAG_VISIBLE | CONTACT_FLAG_MULTICHAT), -1, email, wszCustomName);
}
else {
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4e546b7e03..7f8405ebd0 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 = pcli->pfnGetContactDisplayName(hContact, 0);
+ wszNick = Clist_GetContactDisplayName(hContact);
db_set_ws(hContact, "CList", "MyHandle", wszNick);
}
else if (cws->value.pszVal) {
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp index ebe4b2982d..8e6984999d 100644 --- a/protocols/MSN/src/msn_std.cpp +++ b/protocols/MSN/src/msn_std.cpp @@ -46,7 +46,7 @@ void CMsnProto::setStringUtf(MCONTACT hContact, const char *name, const char *va wchar_t* CMsnProto::GetContactNameT(MCONTACT hContact)
{
if (hContact)
- return (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
+ return (wchar_t*)Clist_GetContactDisplayName(hContact);
wchar_t *str = Contact_GetInfo(CNF_DISPLAY, NULL, m_szModuleName);
if (str != nullptr) {
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index f66a1fdddc..860a9f14ee 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -17,7 +17,6 @@ PLUGININFOEX pluginInfo = };
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
LIST<CSametimeProto> g_Instances(1, PtrKeySortT);
int hLangpack;
@@ -250,7 +249,6 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
return 0;
}
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp index 6016e9df27..fe4faa8861 100644 --- a/protocols/Sametime/src/session_announce_win.cpp +++ b/protocols/Sametime/src/session_announce_win.cpp @@ -44,7 +44,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara if (db_get_b(hContact, proto->m_szModuleName, "ChatRoom", 0) == 0
&& db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
lvI.lParam = (LPARAM)hContact;
- lvI.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ lvI.pszText = Clist_GetContactDisplayName(hContact);
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_LST_ANTO), &lvI);
lvI.iItem++;
}
diff --git a/protocols/SkypeWeb/src/skype_dialogs.cpp b/protocols/SkypeWeb/src/skype_dialogs.cpp index 1147810864..a10eaafb62 100644 --- a/protocols/SkypeWeb/src/skype_dialogs.cpp +++ b/protocols/SkypeWeb/src/skype_dialogs.cpp @@ -39,13 +39,11 @@ CSkypeInviteDlg::CSkypeInviteDlg(CSkypeProto *proto) : void CSkypeInviteDlg::OnInitDialog()
{
- for (auto &hContact : m_proto->AccContacts()) {
- if (!m_proto->isChatRoom(hContact)) {
- wchar_t *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
- m_combo.AddString(ptszNick, hContact);
- }
- }
+ for (auto &hContact : m_proto->AccContacts())
+ if (!m_proto->isChatRoom(hContact))
+ m_combo.AddString(Clist_GetContactDisplayName(hContact), hContact);
}
+
void CSkypeInviteDlg::btnOk_OnOk(CCtrlButton*)
{
m_hContact = m_combo.GetItemData(m_combo.GetCurSel());
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 9a19dfaa9a..c89b9954a1 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -199,11 +199,11 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &) CMStringA service(FORMAT, "%s/IncomingCallCLE", GetContactProto(hContact));
cle.pszService = service.GetBuffer();
- CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), Clist_GetContactDisplayName(hContact));
cle.szTooltip.w = tooltip.GetBuffer();
pcli->pfnAddEvent(&cle);
- ShowNotification(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL);
+ ShowNotification(Clist_GetContactDisplayName(hContact), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL);
}
}
break;
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp index 303592e658..5985cb390f 100644 --- a/protocols/VKontakte/src/vk_dialogs.cpp +++ b/protocols/VKontakte/src/vk_dialogs.cpp @@ -157,12 +157,9 @@ CVkInviteChatForm::CVkInviteChatForm(CVkProto *proto) : void CVkInviteChatForm::OnInitDialog()
{
- for (auto &hContact : m_proto->AccContacts()) {
- if (!m_proto->isChatRoom(hContact)) {
- wchar_t *pwszNick = pcli->pfnGetContactDisplayName(hContact, 0);
- m_cbxCombo.AddString(pwszNick, hContact);
- }
- }
+ for (auto &hContact : m_proto->AccContacts())
+ if (!m_proto->isChatRoom(hContact))
+ m_cbxCombo.AddString(Clist_GetContactDisplayName(hContact), hContact);
}
void CVkInviteChatForm::btnOk_OnOk(CCtrlButton*)
|