diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 14:24:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 14:24:12 +0000 |
commit | 83310365c69bd40365ee0ae0e16c99c28e24cd0b (patch) | |
tree | 10ac18bfdc3fcf0fd62a5aba3ccb5dedffa2e410 /plugins/UserInfoEx/src/classPsTreeItem.cpp | |
parent | d68cd04d6f7b997692476b531bdc30f546a50efd (diff) |
- all static protocol services replaced with functions;
- m_protomod.h removed as useless
git-svn-id: http://svn.miranda-ng.org/main/trunk@14260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTreeItem.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTreeItem.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 2231f7c157..f5d6d28d63 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -274,21 +274,21 @@ int CPsTreeItem::ItemLabel(const BYTE bReadDBValue) **/
HICON CPsTreeItem::ProtoIcon()
{
+ if (!_pszName)
+ return NULL;
+
PROTOACCOUNT **pa;
int ProtoCount;
- if (!ProtoEnumAccounts(&ProtoCount, &pa)) {
- if (_pszName) {
- for (int i = 0; i < ProtoCount; i++) {
- if (!mir_tcsnicmp(pa[i]->tszAccountName, _A2T(_pszName), mir_tstrlen(pa[i]->tszAccountName))) {
- CHAR szIconID[MAX_PATH];
- mir_snprintf(szIconID, SIZEOF(szIconID), "core_status_%s1", pa[i]->szModuleName);
- HICON hIco = IcoLib_GetIcon(szIconID);
- if (!hIco)
- hIco = (HICON)CallProtoService(pa[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL, NULL);
-
- return hIco;
- }
- }
+ Proto_EnumAccounts(&ProtoCount, &pa);
+ for (int i = 0; i < ProtoCount; i++) {
+ if (!mir_tcsnicmp(pa[i]->tszAccountName, _A2T(_pszName), mir_tstrlen(pa[i]->tszAccountName))) {
+ CHAR szIconID[MAX_PATH];
+ mir_snprintf(szIconID, SIZEOF(szIconID), "core_status_%s1", pa[i]->szModuleName);
+ HICON hIco = IcoLib_GetIcon(szIconID);
+ if (!hIco)
+ hIco = (HICON)CallProtoService(pa[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL, NULL);
+
+ return hIco;
}
}
return NULL;
|