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/UserInfoEx/src/classPsTreeItem.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'plugins/UserInfoEx/src/classPsTreeItem.cpp') diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 4f8b641691..c9da4f453d 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -322,24 +322,17 @@ HICON CPsTreeItem::ProtoIcon() { for (i = 0; i < ProtoCount; i++) { - if (pa[i]->type == PROTOTYPE_PROTOCOL) + if (!mir_tcsnicmp(pa[i]->tszAccountName, _A2T(_pszName), mir_tcslen(pa[i]->tszAccountName))) { - TCHAR *ptszName = mir_a2t(_pszName); - if (!mir_tcsnicmp(pa[i]->tszAccountName, ptszName, mir_tcslen(pa[i]->tszAccountName))) - { - HICON hIco; - CHAR szIconID[MAX_PATH]; - - mir_snprintf(szIconID, SIZEOF(szIconID), "core_status_%s1", pa[i]->szModuleName); - hIco = IcoLib_GetIcon(szIconID); - if (!hIco) - { - hIco = (HICON)CallProtoService(pa[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL, NULL); - } - MIR_FREE (ptszName); - return hIco; - } - MIR_FREE (ptszName); + HICON hIco; + CHAR szIconID[MAX_PATH]; + + mir_snprintf(szIconID, SIZEOF(szIconID), "core_status_%s1", pa[i]->szModuleName); + hIco = IcoLib_GetIcon(szIconID); + if (!hIco) + hIco = (HICON)CallProtoService(pa[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL, NULL); + + return hIco; } } } -- cgit v1.2.3