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/SmileyAdd/src/dlgboxsubclass.cpp | 2 +- plugins/SmileyAdd/src/services.cpp | 4 ++-- plugins/SmileyAdd/src/smileys.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 1a786ddae2..078d6e46be 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -163,7 +163,7 @@ static int MsgDlgHook(WPARAM, LPARAM lParam) msgwnd->hwndInput = wndEvtData->hwndInput; // Get the protocol for this contact to display correct smileys. - char *protonam = GetContactProto(DecodeMetaContact(msgwnd->hContact)); + char *protonam = Proto_GetBaseAccountName(DecodeMetaContact(msgwnd->hContact)); if (protonam) strncpy_s(msgwnd->ProtocolName, protonam, _TRUNCATE); diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 65cea6dce4..7cfe8d1f97 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -43,7 +43,7 @@ SmileyPackType* GetSmileyPack(const char *proto, MCONTACT hContact, SmileyPackCT } if (categoryName.IsEmpty() && !opt.UseOneForAll) { - char *protonam = GetContactProto(hContact); + char *protonam = Proto_GetBaseAccountName(hContact); if (protonam != nullptr) { DBVARIANT dbv; if (db_get_ws(hContact, protonam, "Transport", &dbv) == 0) { @@ -268,7 +268,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) { SmileyCategoryListType::SmileyCategoryVectorType &smc = *g_SmileyCategories.GetSmileyCategoryList(); - char *protnam = GetContactProto(wParam); + char *protnam = Proto_GetBaseAccountName(wParam); bool haveMenu = IsSmileyProto(protnam); if (haveMenu && opt.UseOneForAll) { unsigned cnt = 0; diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 4a8a033588..734d66acd2 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -231,7 +231,7 @@ void SmileyType::CallSmileyService(MCONTACT hContact) const char *proto = ""; if (name[0] == '/') { - proto = (const char*)GetContactProto(hContact); + proto = (const char*)Proto_GetBaseAccountName(hContact); if (proto == nullptr) return; } @@ -865,7 +865,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) CMStringW tname(_A2T(acc->szModuleName)); for (auto &hContact : Contacts()) { - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); if (proto == nullptr) continue; @@ -888,7 +888,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, const CMStringW &defaultFile) { - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); if (proto == nullptr) return; -- cgit v1.2.3