summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-03 13:37:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-03 13:37:13 +0300
commit66b61f42871089f3962920924f9030cd6dff2ad8 (patch)
treebfa19d1db1c84a841dd1e6ea258ae1d9212d2ada /src/core
parentdfe4c13573386072b6fcf177e8f52fafc81891f1 (diff)
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
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdautoaway/src/autoaway.cpp2
-rw-r--r--src/core/stdaway/src/sendmsg.cpp6
-rw-r--r--src/core/stdclist/src/clistopts.cpp2
-rw-r--r--src/core/stduseronline/src/useronline.cpp4
4 files changed, 7 insertions, 7 deletions
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;
}