From c6fb861d7159279b6ee4a4dd678d4693ee56bac6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Oct 2012 12:50:40 +0000 Subject: 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 --- plugins/DbEditorPP/src/icons.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'plugins/DbEditorPP/src') 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; } -- cgit v1.2.3