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/SmileyAdd/src/smileys.cpp | 45 +++------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) (limited to 'plugins/SmileyAdd') diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 2f16cee51e..2cc8039052 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -994,50 +994,11 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void) if (lpcp == CALLSERVICE_NOTFOUND) lpcp = CP_ACP; - PROTOCOLDESCRIPTOR **protoList; PROTOACCOUNT **accList; int protoCount; - - if (ProtoEnumAccounts(&protoCount, &accList) == CALLSERVICE_NOTFOUND || (protoCount > 0 && accList[0]->cbSize == 0)) - { - CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protoCount, (LPARAM)&protoList); - for (int i = 0; i < protoCount; i++) - { - if (protoList[i]->type != PROTOTYPE_PROTOCOL) continue; - - if (IsSmileyProto(protoList[i]->szName)) - { - const char* packnam = protoList[i]->szName; - if (strcmp(packnam, "JABBER") == 0) - packnam = "JGMail"; - else if (strstr(packnam, "SIP") != NULL) - packnam = "MSN"; - - char path[MAX_PATH]; - mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packnam); - - bkstring paths = A2T_SM(path), patha; - pathToAbsolute(paths, patha); - - if (_taccess(patha.c_str(), 0) != 0) - paths = defaultFile; - - char protoName[128]; - CallProtoService(protoList[i]->szName, PS_GETNAME, sizeof(protoName), (LPARAM)protoName); - - - displayName = A2W_SM(protoName, lpcp); - - tname = A2T_SM(protoList[i]->szName); - AddCategory(tname, displayName, smcProto, paths); - } - } - } - else - { - for (int i = 0; i < protoCount; i++) - AddAccountAsCategory(accList[i], defaultFile); - } + ProtoEnumAccounts(&protoCount, &accList); + for (int i = 0; i < protoCount; i++) + AddAccountAsCategory(accList[i], defaultFile); HANDLE hContact = (HANDLE)CallService( MS_DB_CONTACT_FINDFIRST, 0, 0); while (hContact != NULL) -- cgit v1.2.3