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/AvatarHistory/src/AvatarDlg.cpp | 2 +- plugins/AvatarHistory/src/AvatarHistory.cpp | 4 ++-- plugins/AvatarHistory/src/icolib.cpp | 2 +- plugins/AvatarHistory/src/utils.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/AvatarHistory/src') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index cc5c63a9af..8bbdb853d0 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -485,7 +485,7 @@ int CleanupAvatarPic(HWND hwnd) int PreBuildContactMenu(WPARAM wParam, LPARAM) { - char *proto = GetContactProto(wParam); + char *proto = Proto_GetBaseAccountName(wParam); Menu_ShowItem(hMenu, 0 != ProtocolEnabled(proto)); return 0; } diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index b040b3d37c..6441f989f9 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -97,7 +97,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) if (hContact == NULL) return 0; - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); if (proto == nullptr) return 0; @@ -204,7 +204,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) T2Utf blob(rel_path); DBEVENTINFO dbei = {}; - dbei.szModule = GetContactProto(hContact); + dbei.szModule = Proto_GetBaseAccountName(hContact); dbei.flags = DBEF_READ | DBEF_UTF; dbei.timestamp = (DWORD)time(0); dbei.eventType = EVENTTYPE_AVATAR_CHANGE; diff --git a/plugins/AvatarHistory/src/icolib.cpp b/plugins/AvatarHistory/src/icolib.cpp index c7acb20385..2b23ea743d 100644 --- a/plugins/AvatarHistory/src/icolib.cpp +++ b/plugins/AvatarHistory/src/icolib.cpp @@ -74,7 +74,7 @@ HICON createProtoOverlayedIcon(MCONTACT hContact) { HICON icon1 = LoadIconEx(I_OVERLAY); - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); HICON icon0 = Skin_LoadProtoIcon(szProto, ID_STATUS_ONLINE); HICON resIcon = getOverlayedIcon(icon0, icon1, FALSE); diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 3dc10fa840..280b5acf79 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -34,7 +34,7 @@ bool ContactEnabled(MCONTACT hContact, char *setting, int def) if (hContact == NULL) return false; - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); if (!ProtocolEnabled(proto)) return false; @@ -106,7 +106,7 @@ wchar_t* GetProtocolFolder(wchar_t *fn, char *proto) wchar_t* GetContactFolder(wchar_t *fn, MCONTACT hContact) { - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); GetProtocolFolder(fn, proto); wchar_t uin[MAX_PATH]; -- cgit v1.2.3