mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 08:51:29 +00:00
[SHELL32]
* Apply Wine commit e330a128 by Alexandre Julliard: Use Shell_GetImageLists to retrieve image lists instead of using a global variable. CORE-8540 svn path=/branches/shell-experiments/; revision=65222
This commit is contained in:
parent
3a9653d24e
commit
e24032eb8c
|
@ -125,17 +125,20 @@ HRESULT WINAPI CPrintersExtractIconW::Extract(LPCWSTR pszFile,
|
|||
HICON *phiconSmall, UINT nIconSize)
|
||||
{
|
||||
int index;
|
||||
HIMAGELIST big_icons, small_icons;
|
||||
|
||||
FIXME("(%p) (file=%p index=%d %p %p size=%x) semi-stub\n", this, debugstr_w(pszFile),
|
||||
(signed)nIconIndex, phiconLarge, phiconSmall, nIconSize);
|
||||
|
||||
index = SIC_GetIconIndex(pszFile, nIconIndex, 0);
|
||||
|
||||
Shell_GetImageLists(&big_icons, &small_icons);
|
||||
|
||||
if (phiconLarge)
|
||||
*phiconLarge = ImageList_GetIcon(ShellBigIconList, index, ILD_TRANSPARENT);
|
||||
*phiconLarge = ImageList_GetIcon(big_icons, index, ILD_TRANSPARENT);
|
||||
|
||||
if (phiconSmall)
|
||||
*phiconSmall = ImageList_GetIcon(ShellSmallIconList, index, ILD_TRANSPARENT);
|
||||
*phiconSmall = ImageList_GetIcon(small_icons, index, ILD_TRANSPARENT);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,9 @@ typedef struct
|
|||
|
||||
static HDPA sic_hdpa = 0;
|
||||
|
||||
static HIMAGELIST ShellSmallIconList;
|
||||
static HIMAGELIST ShellBigIconList;
|
||||
|
||||
namespace
|
||||
{
|
||||
extern CRITICAL_SECTION SHELL32_SicCS;
|
||||
|
|
|
@ -233,8 +233,6 @@ STDAPI DllGetVersion(DLLVERSIONINFO *pdvi)
|
|||
*
|
||||
*/
|
||||
HINSTANCE shell32_hInstance;
|
||||
HIMAGELIST ShellSmallIconList = 0;
|
||||
HIMAGELIST ShellBigIconList = 0;
|
||||
|
||||
void *operator new (size_t, void *buf)
|
||||
{
|
||||
|
|
|
@ -587,6 +587,7 @@ BOOL CDefView::InitList()
|
|||
{
|
||||
SHELLDETAILS sd;
|
||||
WCHAR szTemp[50];
|
||||
HIMAGELIST big_icons, small_icons;
|
||||
|
||||
TRACE("%p\n", this);
|
||||
|
||||
|
@ -608,8 +609,9 @@ BOOL CDefView::InitList()
|
|||
FIXME("no SF2\n");
|
||||
}
|
||||
|
||||
m_ListView.SetImageList(ShellBigIconList, LVSIL_NORMAL);
|
||||
m_ListView.SetImageList(ShellSmallIconList, LVSIL_SMALL);
|
||||
Shell_GetImageLists(&big_icons, &small_icons);
|
||||
m_ListView.SetImageList(big_icons, LVSIL_NORMAL);
|
||||
m_ListView.SetImageList(small_icons, LVSIL_SMALL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -419,6 +419,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
|
|||
HRESULT hr = S_OK;
|
||||
BOOL IconNotYetLoaded=TRUE;
|
||||
UINT uGilFlags = 0;
|
||||
HIMAGELIST big_icons, small_icons;
|
||||
|
||||
TRACE("%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
|
||||
(flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes,
|
||||
|
@ -557,6 +558,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
|
|||
}
|
||||
|
||||
/* ### icons ###*/
|
||||
|
||||
Shell_GetImageLists( &big_icons, &small_icons );
|
||||
|
||||
if (flags & SHGFI_OPENICON)
|
||||
uGilFlags |= GIL_OPENICON;
|
||||
|
||||
|
@ -701,9 +705,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
|
|||
if (ret && (flags & SHGFI_SYSICONINDEX))
|
||||
{
|
||||
if (flags & SHGFI_SMALLICON)
|
||||
ret = (DWORD_PTR) ShellSmallIconList;
|
||||
ret = (DWORD_PTR)small_icons;
|
||||
else
|
||||
ret = (DWORD_PTR) ShellBigIconList;
|
||||
ret = (DWORD_PTR)big_icons;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -711,9 +715,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
|
|||
if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded)
|
||||
{
|
||||
if (flags & SHGFI_SMALLICON)
|
||||
psfi->hIcon = ImageList_GetIcon( ShellSmallIconList, psfi->iIcon, ILD_NORMAL);
|
||||
psfi->hIcon = ImageList_GetIcon( small_icons, psfi->iIcon, ILD_NORMAL);
|
||||
else
|
||||
psfi->hIcon = ImageList_GetIcon( ShellBigIconList, psfi->iIcon, ILD_NORMAL);
|
||||
psfi->hIcon = ImageList_GetIcon( big_icons, psfi->iIcon, ILD_NORMAL);
|
||||
}
|
||||
|
||||
if (flags & ~SHGFI_KNOWN_FLAGS)
|
||||
|
|
|
@ -31,8 +31,6 @@ extern "C" {
|
|||
*/
|
||||
extern HMODULE huser32;
|
||||
extern HINSTANCE shell32_hInstance;
|
||||
extern HIMAGELIST ShellSmallIconList;
|
||||
extern HIMAGELIST ShellBigIconList;
|
||||
|
||||
BOOL WINAPI Shell_GetImageLists(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
|
||||
|
||||
|
|
Loading…
Reference in a new issue