summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-29 13:44:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-29 13:44:40 +0000
commitc14ed6c75c2c6dfcdaf94597cfb59db42749b140 (patch)
treefc05fb9e4c0df25cb17103209a285d8f5d8ed7b0
parent837ba88833d864c06ee5d6110a570387a1f37d48 (diff)
relative paths in icolib
git-svn-id: http://svn.miranda-ng.org/main/trunk@1241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/modules/icolib/skin2icons.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 609080d4aa..e4796692a3 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -555,9 +555,8 @@ HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC* sid)
int cx = item->cx ? item->cx : GetSystemMetrics(SM_CXSMICON);
int cy = item->cy ? item->cy : GetSystemMetrics(SM_CYSMICON);
item->default_icon = CreateStaticIconSourceItem(cx, cy);
- if (GetIconData(sid->hDefaultIcon, &item->default_icon->icon_data, &item->default_icon->icon_size)) {
+ if (GetIconData(sid->hDefaultIcon, &item->default_icon->icon_data, &item->default_icon->icon_size))
IconSourceItem_Release(&item->default_icon);
- }
}
}
@@ -665,9 +664,11 @@ HICON IconItem_GetIcon(IconItem* item, bool big)
IconSourceItem* &source = big ? item->source_big : item->source_small;
if ( !source && !DBGetContactSettingTString(NULL, "SkinIcons", item->name, &dbv)) {
+ TCHAR tszFullPath[MAX_PATH];
+ PathToAbsoluteT(dbv.ptszVal, tszFullPath, NULL);
int cx = item->cx ? item->cx : GetSystemMetrics(big ? SM_CXICON : SM_CXSMICON);
int cy = item->cy ? item->cy : GetSystemMetrics(big ? SM_CYICON : SM_CYSMICON);
- source = GetIconSourceItemFromPath(dbv.ptszVal, cx, cy);
+ source = GetIconSourceItemFromPath(tszFullPath, cx, cy);
DBFreeVariant(&dbv);
}
@@ -814,13 +815,13 @@ 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_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);