From 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 4 Dec 2019 16:08:03 +0300 Subject: GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName --- plugins/BasicHistory/src/DatExport.cpp | 2 +- plugins/BasicHistory/src/EventList.cpp | 8 ++++---- plugins/BasicHistory/src/HistoryWindow.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/BasicHistory/src') diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp index c21a030abe..c6a020fb05 100644 --- a/plugins/BasicHistory/src/DatExport.cpp +++ b/plugins/BasicHistory/src/DatExport.cpp @@ -151,7 +151,7 @@ bool DatExport::GetEventList(std::vector& eventList) dataSize = header.dataSize; DBEVENTINFO86 messageHeader; DBEVENTINFO info = {}; - info.szModule = GetContactProto(hContact); + info.szModule = Proto_GetBaseAccountName(hContact); wchar_t _str[MAXSELECTSTR + 8]; // for safety reason std::multimap sortedEvents; while (dataSize > 0) { diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 8e3b635be2..834cc025fa 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -394,7 +394,7 @@ std::wstring HistoryEventList::GetContactName() std::wstring HistoryEventList::GetMyName() { - ptrW name(Contact_GetInfo(CNF_DISPLAY, NULL, GetContactProto(m_hContact))); + ptrW name(Contact_GetInfo(CNF_DISPLAY, NULL, Proto_GetBaseAccountName(m_hContact))); return (name == NULL) ? TranslateT("Me") : name; } @@ -421,13 +421,13 @@ std::wstring HistoryEventList::GetProtocolName() std::string HistoryEventList::GetBaseProtocol() { - char* proto = GetContactProto(m_hContact); + char* proto = Proto_GetBaseAccountName(m_hContact); return proto == nullptr ? "" : proto; } std::wstring HistoryEventList::GetMyId() { - ptrW id(Contact_GetInfo(CNF_DISPLAYUID, NULL, GetContactProto(m_hContact))); + ptrW id(Contact_GetInfo(CNF_DISPLAYUID, NULL, Proto_GetBaseAccountName(m_hContact))); return (id == NULL) ? L"" : id; } @@ -495,7 +495,7 @@ void HistoryEventList::MargeMessages(const std::vector GetTempList(tempList, true, false, m_hContact); DBEVENTINFO dbei = {}; - dbei.szModule = GetContactProto(m_hContact); + dbei.szModule = Proto_GetBaseAccountName(m_hContact); db_set_safety_mode(FALSE); for (std::list::iterator it = tempList.begin(); it != tempList.end(); ++it) { diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 7c393354ee..22053a663c 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1245,7 +1245,7 @@ void HistoryWindow::ReplaceIcons(HWND hwndDlg, int selStart, BOOL isSent) SMADD_RICHEDIT3 smadd = { 0 }; smadd.cbSize = sizeof(smadd); smadd.hwndRichEditControl = hwndDlg; - smadd.Protocolname = GetContactProto(m_hContact); + smadd.Protocolname = Proto_GetBaseAccountName(m_hContact); smadd.hContact = m_hContact; smadd.flags = isSent ? SAFLRE_OUTGOING : 0; if (selStart > 0) -- cgit v1.2.3