SHGetFileInfoA: Fixed SHGFI_SYSICONINDEX flag handling.
Carlos Lozano
clozano at andago.com
Tue Oct 29 17:10:30 CST 2002
Changelog
* Fixed SHGFI_SYSICONINDEX flag handling.
Carlos.
--
___ _ \ | / Infraestructuras
| . |._ _ _| | ___ ___ ___ http://www.andago.com
| || ' |/ . |<_> |/ . |/ . \__ GNU/Linux
|_|_||_|_|\___|<___|\_. |\___/ _ \ __|\ \ /
Carlos A. Lozano <___'/ | \ -_) __/\__ \ > < -_)
[ carlos.lozano at andago.com ]\___|_| ____/ _/\_\___|
[ calb at epsxe.com ] http://www.epsxe.com
-------------- next part --------------
Index: dlls/shell32/shell32_main.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.c,v
retrieving revision 1.103
diff -u -r1.103 shell32_main.c
--- dlls/shell32/shell32_main.c 28 Oct 2002 18:47:15 -0000 1.103
+++ dlls/shell32/shell32_main.c 29 Oct 2002 22:58:48 -0000
@@ -410,13 +410,21 @@
{
if (!strcmp("%1",sTemp)) /* icon is in the file */
strcpy(sTemp, path);
-
- IconNotYetLoaded=FALSE;
- /* FIXME: is it working correctly? */
- PrivateExtractIconsA(sTemp,dwNr,(flags&SHGFI_LARGEICON) ?
- GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXSMICON),
- (flags&SHGFI_LARGEICON) ? GetSystemMetrics(SM_CYICON) :
- GetSystemMetrics(SM_CYSMICON), &psfi->hIcon,0,1,0);
+
+ if (flags & SHGFI_SYSICONINDEX)
+ {
+ psfi->iIcon = SIC_GetIconIndex(sTemp,dwNr);
+ if (psfi->iIcon == -1) psfi->iIcon = 0;
+ }
+ else
+ {
+ IconNotYetLoaded=FALSE;
+ PrivateExtractIconsA(sTemp,dwNr,(flags&SHGFI_LARGEICON) ?
+ GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXSMICON),
+ (flags&SHGFI_LARGEICON) ? GetSystemMetrics(SM_CYICON) :
+ GetSystemMetrics(SM_CYSMICON), &psfi->hIcon,0,1,0);
+ psfi->iIcon = dwNr;
+ }
}
}
}
Index: dlls/shell32/shell32_main.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v
retrieving revision 1.55
diff -u -r1.55 shell32_main.h
--- dlls/shell32/shell32_main.h 29 Oct 2002 21:30:01 -0000 1.55
+++ dlls/shell32/shell32_main.h 29 Oct 2002 22:58:48 -0000
@@ -54,6 +54,7 @@
BOOL SIC_Initialize(void);
void SIC_Destroy(void);
BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex);
+INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex );
/* Classes Root */
BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);
More information about the wine-patches
mailing list