summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-07 12:50:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-07 12:50:40 +0000
commitc6fb861d7159279b6ee4a4dd678d4693ee56bac6 (patch)
treedf911e6eaf7bd944081aae96f5df9c2ef84c2476 /plugins/DbEditorPP/src
parent95da57c8e9cf894adf3afae124a29d292b085c5e (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/DbEditorPP/src')
-rw-r--r--plugins/DbEditorPP/src/icons.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/plugins/DbEditorPP/src/icons.cpp b/plugins/DbEditorPP/src/icons.cpp
index 6da3723bfe..9ba200a923 100644
--- a/plugins/DbEditorPP/src/icons.cpp
+++ b/plugins/DbEditorPP/src/icons.cpp
@@ -86,7 +86,7 @@ int AddIconToList(HIMAGELIST hil, HICON hIcon)
return 1;
}
-static PROTOCOLDESCRIPTOR **protocols = NULL;
+static PROTOACCOUNT **protocols = NULL;
static int protoCount = 0;
static int shift = 0;
@@ -94,14 +94,11 @@ void AddProtoIconsToList(HIMAGELIST hil, int newshift)
{
shift = newshift;
- CallService(MS_PROTO_ENUMPROTOCOLS,(WPARAM)&protoCount,(LPARAM)&protocols);
+ ProtoEnumAccounts(&protoCount, &protocols);
for (int i = 0; i < protoCount; i++) {
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
-
HICON hIcon;
- if (hIcon=LoadSkinnedProtoIcon(protocols[i]->szName, ID_STATUS_ONLINE))
+ if (hIcon=LoadSkinnedProtoIcon(protocols[i]->szModuleName, ID_STATUS_ONLINE))
AddIconToList(hil, hIcon);
else
AddIconToList(himl, LoadSkinnedDBEIcon(ICO_ONLINE));
@@ -116,10 +113,7 @@ int GetProtoIcon(char *szProto)
int n = 0;
for (int i = 0; i < protoCount; i++) {
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
-
- if (!mir_strcmp(protocols[i]->szName, szProto))
+ if (!mir_strcmp(protocols[i]->szModuleName, szProto))
return n + shift;
n++;
@@ -131,13 +125,9 @@ int GetProtoIcon(char *szProto)
BOOL IsProtocolLoaded(char* pszProtocolName)
{
if (protoCount)
- for(int i = 0; i < protoCount; i++) {
- if (protocols[i]->type != PROTOTYPE_PROTOCOL)
- continue;
-
- if (!mir_strcmp(protocols[i]->szName, pszProtocolName))
+ for(int i = 0; i < protoCount; i++)
+ if (!mir_strcmp(protocols[i]->szModuleName, pszProtocolName))
return TRUE;
- }
return FALSE;
}