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/NoHistory/src/dllmain.cpp | 6 +++--- plugins/NoHistory/src/options.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/NoHistory') diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index d2a8de5f9e..bc1a257072 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -135,7 +135,7 @@ INT_PTR ServiceClear(WPARAM hContact, LPARAM) int PrebuildContactMenu(WPARAM hContact, LPARAM) { bool remove = g_plugin.getByte(hContact, DBSETTING_REMOVE) != 0; - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0); if (chat_room) @@ -173,7 +173,7 @@ int WindowEvent(WPARAM, LPARAM lParam) break; case MSG_WINDOW_EVT_OPEN: - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0); int remove = g_plugin.getByte(hContact, DBSETTING_REMOVE) != 0; @@ -193,7 +193,7 @@ int IconPressed(WPARAM hContact, LPARAM lParam) if (sicd->flags & MBCF_RIGHTBUTTON) return 0; // ignore right-clicks if (mir_strcmp(sicd->szModule, MODULENAME) != 0) return 0; // not our event - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0); if (!chat_room) ServiceToggle(hContact, 0); diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp index 3107787b21..92944f174f 100644 --- a/plugins/NoHistory/src/options.cpp +++ b/plugins/NoHistory/src/options.cpp @@ -78,7 +78,7 @@ static void ResetListOptions(HWND hwndList) static void SetAllContactIcons(HWND hwndList) { for (auto &hContact : Contacts()) { - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0); if (!chat_room) { @@ -193,7 +193,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: for (auto &hContact : Contacts()) { - char *proto = GetContactProto(hContact); + char *proto = Proto_GetBaseAccountName(hContact); bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0); if (!chat_room) { -- cgit v1.2.3