From 66b61f42871089f3962920924f9030cd6dff2ad8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 3 Apr 2018 13:37:13 +0300 Subject: CLIST_INTERFACE: - unused members removed (requires new History++ for people who compile Miranda themselves); - useless helpers Proto_IsAccountEnabled & Proto_IsProtocolLocked replaced with direct calls of PROTOACCOUNT members IsEnabled & IsLocked respectively; - static interface member pfnGetProtocolVisibility replaced with static function Clist_GetProtocolVisibility or PROTOACCOUNT::IsVisible when possible --- src/core/stdautoaway/src/autoaway.cpp | 2 +- src/core/stdaway/src/sendmsg.cpp | 6 +++--- src/core/stdclist/src/clistopts.cpp | 2 +- src/core/stduseronline/src/useronline.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp index bf783cc3a1..27531d2b2b 100644 --- a/src/core/stdautoaway/src/autoaway.cpp +++ b/src/core/stdautoaway/src/autoaway.cpp @@ -63,7 +63,7 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam) for (int i = 0; i < numAccounts; i++) { PROTOACCOUNT *pa = accounts[i]; - if (!Proto_IsAccountEnabled(pa) || Proto_IsAccountLocked(pa)) + if (!pa->IsEnabled() || pa->IsLocked()) continue; int currentstatus = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0); diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp index 14ec7baffb..52b727f8fe 100644 --- a/src/core/stdaway/src/sendmsg.cpp +++ b/src/core/stdaway/src/sendmsg.cpp @@ -178,10 +178,10 @@ void ChangeAllProtoMessages(char *szProto, int statusMode, wchar_t *msg) for (int i = 0; i < nAccounts; i++) { PROTOACCOUNT *pa = accounts[i]; - if (!Proto_IsAccountEnabled(pa)) + if (!pa->IsEnabled()) continue; - if ((CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) && !Proto_IsAccountLocked(pa)) + if ((CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) && !pa->IsLocked()) CallProtoService(pa->szModuleName, PS_SETAWAYMSG, statusMode, (LPARAM)msg); } } @@ -540,7 +540,7 @@ static int AwayMsgSendAccountsChanged(WPARAM, LPARAM) PROTOACCOUNT **accounts; Proto_EnumAccounts(&nAccounts, &accounts); for (int i = 0; i < nAccounts; i++) { - if (!Proto_IsAccountEnabled(accounts[i])) + if (!accounts[i]->IsEnabled()) continue; protoModeMsgFlags |= CallProtoService(accounts[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 873ebb6f3e..d17b469d1a 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -107,7 +107,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP PROTOACCOUNT **accs; Proto_EnumAccounts(&count, &accs); for (int i = 0; i < count; i++) { - if (!Proto_IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0) + if (!accs[i]->IsEnabled() || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0) continue; item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName); diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index 1077defd18..2a3c16d49f 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -90,7 +90,7 @@ static int UserOnlineModulesLoaded(WPARAM, LPARAM) // reset the counter for (int i = 0; i < numAccounts; i++) - if (Proto_IsAccountEnabled(accounts[i])) + if (accounts[i]->IsEnabled()) db_set_dw(NULL, "UserOnline", accounts[i]->szModuleName, GetTickCount()); return 0; @@ -104,7 +104,7 @@ static int UserOnlineAccountsChanged(WPARAM eventCode, LPARAM lParam) case PRAC_ADDED: case PRAC_CHECKED: // reset the counter - if (Proto_IsAccountEnabled(pa)) + if (pa->IsEnabled()) db_set_dw(NULL, "UserOnline", pa->szModuleName, GetTickCount()); break; } -- cgit v1.2.3