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/UserInfoEx/src/classPsTreeItem.cpp | |
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/UserInfoEx/src/classPsTreeItem.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTreeItem.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
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;
}
}
}
|