Commit d699222e authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Remove iconcache pre-initialization hack, it's not necessary any

more.
parent bec54e7c
......@@ -351,18 +351,8 @@ INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags )
if ( INVALID_INDEX == index )
{
if (0 == strcmpiW (sSourceFile, swShell32Name) &&
-IDI_SHELL_MY_DOCUMENTS <= dwSourceIndex &&
dwSourceIndex < IDI_SHELL_MY_DOCUMENTS)
{
/* Return default icon for icons not present in shell32 */
ret = 0;
}
else
{
ret = SIC_LoadIcon (sSourceFile, dwSourceIndex, dwFlags);
}
}
else
{
TRACE("-- found\n");
......@@ -374,15 +364,10 @@ INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags )
}
/*****************************************************************************
* SIC_Initialize [internal]
*
* NOTES
* hack to load the resources from the shell32.dll under a different dll name
* will be removed when the resource-compiler is ready
*/
BOOL SIC_Initialize(void)
{
HICON hSm, hLg;
UINT index;
int cx_small, cy_small;
int cx_large, cy_large;
......@@ -403,24 +388,27 @@ BOOL SIC_Initialize(void)
return(FALSE);
}
ShellSmallIconList = ImageList_Create(16,16,ILC_COLOR32|ILC_MASK,0,0x20);
ShellBigIconList = ImageList_Create(32,32,ILC_COLOR32|ILC_MASK,0,0x20);
ShellSmallIconList = ImageList_Create(cx_small,cy_small,ILC_COLOR32|ILC_MASK,0,0x20);
ShellBigIconList = ImageList_Create(cx_large,cy_large,ILC_COLOR32|ILC_MASK,0,0x20);
ImageList_SetBkColor(ShellSmallIconList, CLR_NONE);
ImageList_SetBkColor(ShellBigIconList, CLR_NONE);
for (index=1; index<=IDI_SHELL_MY_DOCUMENTS; index++)
{
hSm = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_small, cy_small, LR_SHARED);
hLg = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_large, cy_large, LR_SHARED);
/* Load the document icon, which is used as the default if an icon isn't found. */
hSm = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT),
IMAGE_ICON, cx_small, cy_small, LR_SHARED);
hLg = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT),
IMAGE_ICON, cx_large, cy_large, LR_SHARED);
if(hSm)
if (!hSm || !hLg)
{
SIC_IconAppend (swShell32Name, index - 1, hSm, hLg, 0);
SIC_IconAppend (swShell32Name, -index, hSm, hLg, 0);
}
FIXME("Failed to load IDI_SHELL_DOCUMENT icon!\n");
return FALSE;
}
SIC_IconAppend (swShell32Name, IDI_SHELL_DOCUMENT-1, hSm, hLg, 0);
SIC_IconAppend (swShell32Name, -IDI_SHELL_DOCUMENT, hSm, hLg, 0);
TRACE("hIconSmall=%p hIconBig=%p\n",ShellSmallIconList, ShellBigIconList);
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment