diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-07 12:50:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-07 12:50:40 +0000 |
commit | c6fb861d7159279b6ee4a4dd678d4693ee56bac6 (patch) | |
tree | df911e6eaf7bd944081aae96f5df9c2ef84c2476 /plugins/Popup/src | |
parent | 95da57c8e9cf894adf3afae124a29d292b085c5e (diff) |
death of old nasty clutch with MS_PROTO_ENUMPROTOCOLS & PROTOACCOUNT::type
git-svn-id: http://svn.miranda-ng.org/main/trunk@1799 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src')
-rw-r--r-- | plugins/Popup/src/opt_gen.cpp | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 667ddc7c0f..de54c568cf 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -217,13 +217,11 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int protocolCount = 0;
int i;
- PROTOCOLDESCRIPTOR **protocols;
- CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protocolCount, (LPARAM)&protocols);
+ PROTOACCOUNT **protocols;
+ ProtoEnumAccounts(&protocolCount, &protocols);
DWORD globalFlags = 0;
for (i = 0; i < protocolCount; ++i) {
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
- DWORD protoFlags = CallProtoService(protocols[i]->szName, PS_GETCAPS, PFLAGNUM_2, 0);
+ DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
globalFlags |= protoFlags;
statusOptionsCount += CountStatusModes(protoFlags);
}
@@ -234,13 +232,11 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int pos = 0;
pos = AddStatusModes(statusOptions, pos, _T("Global Status"), globalFlags);
for (i = 0; i < protocolCount; ++i) {
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
- DWORD protoFlags = CallProtoService(protocols[i]->szName, PS_GETCAPS, PFLAGNUM_2, 0);
+ DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
if (!CountStatusModes(protoFlags))
continue;
TCHAR prefix[128];
- wsprintf(prefix, _T("Protocol Status/%hs"), protocols[i]->szName);
+ wsprintf(prefix, _T("Protocol Status/%hs"), protocols[i]->szModuleName);
pos = AddStatusModes(statusOptions, pos, prefix, protoFlags);
}
@@ -250,13 +246,11 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char prefix[128];
LPTSTR pszSettingName = NULL;
for (i = 0; i < protocolCount; ++i) {
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
- DWORD protoFlags = CallProtoService(protocols[i]->szName, PS_GETCAPS, PFLAGNUM_2, 0);
+ DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
if (!CountStatusModes(protoFlags))
continue;
- mir_snprintf(prefix, sizeof(prefix), "Protocol Status/%s", protocols[i]->szName);
+ mir_snprintf(prefix, sizeof(prefix), "Protocol Status/%s", protocols[i]->szModuleName);
pszSettingName = mir_a2t(prefix);
OptTree_SetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount,
DBGetContactSettingDword(NULL, MODULNAME, prefix, 0),
@@ -560,17 +554,14 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM //new status options
{
int protocolCount;
- PROTOCOLDESCRIPTOR **protocols;
- CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protocolCount, (LPARAM)&protocols);
+ PROTOACCOUNT **protocols;
+ ProtoEnumAccounts(&protocolCount, &protocols);
char prefix[128];
LPTSTR pszSettingName = NULL;
for (int i = 0; i < protocolCount; ++i)
{
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
-
- mir_snprintf(prefix, sizeof(prefix), "Protocol Status/%s", protocols[i]->szName);
+ mir_snprintf(prefix, sizeof(prefix), "Protocol Status/%s", protocols[i]->szModuleName);
pszSettingName = mir_a2t(prefix);
DBWriteContactSettingDword(NULL, MODULNAME, prefix,
OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, pszSettingName));
|