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 --- plugins/Clist_nicer/src/clistopts.cpp | 2 +- plugins/Clist_nicer/src/clui.cpp | 2 +- plugins/Clist_nicer/src/cluiservices.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 19a31cd3c7..d713c58080 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -93,7 +93,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM 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/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c58002ab00..bf76dfffae 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -263,7 +263,7 @@ static void InitIcoLib() int p_count = 0; Proto_EnumAccounts(&p_count, &accs); for (int k = 0; k < p_count; k++) { - if (!Proto_IsAccountEnabled(accs[k]) || CallProtoService(accs[k]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0) + if (!accs[k]->IsEnabled() || CallProtoService(accs[k]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0) continue; wchar_t szDescr[128]; diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 4d81e16761..2e84ed6039 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -79,12 +79,12 @@ void CluiProtocolStatusChanged(int, const char*) rc.right -= borders[0] * 2; int toshow = 0; for (int i = 0; i < protoCount; i++) - if (pcli->pfnGetProtocolVisibility(accs[i]->szModuleName)) + if (accs[i]->IsVisible()) toshow++; if (toshow > 0) { for (int part = 0, i = 0; i < protoCount; i++) { - if (!pcli->pfnGetProtocolVisibility(accs[i]->szModuleName)) + if (!accs[i]->IsVisible()) continue; partWidths[part] = ((rc.right - rc.left - rdelta) / toshow)*(part + 1) + cfg::dat.bCLeft; @@ -112,7 +112,7 @@ void CluiProtocolStatusChanged(int, const char*) continue; PROTOACCOUNT *pa = accs[idx]; - if (!pcli->pfnGetProtocolVisibility(pa->szModuleName)) + if (!pa->IsVisible()) continue; int x = 2; @@ -157,7 +157,7 @@ void CluiProtocolStatusChanged(int, const char*) continue; PROTOACCOUNT *pa = accs[idx]; - if (!pcli->pfnGetProtocolVisibility(pa->szModuleName)) + if (!pa->IsVisible()) continue; int status = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0); -- cgit v1.2.3