summaryrefslogtreecommitdiff
path: root/src/modules/icolib
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-06 23:05:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-06 23:05:29 +0000
commit6640a8f419a9ef61ad7af41a419615c2d07b872e (patch)
tree6dfecb48ccc82c0c372ced9be59255c7408ebafd /src/modules/icolib
parent06823b967ab360de98fa2c9e685695e1dff6f78a (diff)
menu item flag CMIF_ICONFROMICOLIB is ignored by the core from now on
git-svn-id: http://svn.miranda-ng.org/main/trunk@4354 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/icolib')
-rw-r--r--src/modules/icolib/skin2icons.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index f5e7484df2..46f60374fd 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -449,12 +449,8 @@ static void IcoLib_RemoveSection(SectionItem* section)
IcolibItem* IcoLib_FindIcon(const char* pszIconName)
{
- int indx;
- IcolibItem key = { (char*)pszIconName };
- if ((indx = iconList.getIndex(&key)) != -1)
- return iconList[ indx ];
-
- return NULL;
+ int indx = iconList.getIndex((IcolibItem*)&pszIconName);
+ return (indx != -1) ? iconList[ indx ] : 0;
}
IcolibItem* IcoLib_FindHIcon(HICON hIcon, bool &big)
@@ -465,7 +461,7 @@ IcolibItem* IcoLib_FindHIcon(HICON hIcon, bool &big)
big = (p->source_small == NULL);
return p;
}
- if (p->source_small && p->source_small->icon == hIcon) {
+ if (p->source_small && p->source_small->icon == hIcon) {
big = false;
return p;
}
@@ -838,18 +834,18 @@ int LoadIcoLibModule(void)
hIconBlank = LoadIconEx(NULL, MAKEINTRESOURCE(IDI_BLANK), 0);
InitializeCriticalSection(&csIconList);
- hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
- hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
- hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
- hIcoLib_GetIconHandle = CreateServiceFunction(MS_SKIN2_GETICONHANDLE, sttIcoLib_GetIconHandle);
- hIcoLib_GetIcon2 = CreateServiceFunction(MS_SKIN2_GETICONBYHANDLE, sttIcoLib_GetIconByHandle);
- hIcoLib_IsManaged = CreateServiceFunction(MS_SKIN2_ISMANAGEDICON, sttIcoLib_IsManaged);
- hIcoLib_AddRef = CreateServiceFunction(MS_SKIN2_ADDREFICON, IcoLib_AddRef);
- hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICON, sttIcoLib_ReleaseIcon);
- hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICONBIG, sttIcoLib_ReleaseIconBig);
+ hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
+ hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
+ hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
+ hIcoLib_GetIconHandle = CreateServiceFunction(MS_SKIN2_GETICONHANDLE, sttIcoLib_GetIconHandle);
+ hIcoLib_GetIcon2 = CreateServiceFunction(MS_SKIN2_GETICONBYHANDLE, sttIcoLib_GetIconByHandle);
+ hIcoLib_IsManaged = CreateServiceFunction(MS_SKIN2_ISMANAGEDICON, sttIcoLib_IsManaged);
+ hIcoLib_AddRef = CreateServiceFunction(MS_SKIN2_ADDREFICON, IcoLib_AddRef);
+ hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICON, sttIcoLib_ReleaseIcon);
+ hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICONBIG, sttIcoLib_ReleaseIconBig);
hIcons2ChangedEvent = CreateHookableEvent(ME_SKIN2_ICONSCHANGED);
- hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED);
+ hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED);
HookEvent(ME_SYSTEM_MODULESLOADED, SkinSystemModulesLoaded);