Author: akhaldi
Date: Mon Nov 3 13:43:01 2014
New Revision: 65222
URL:
http://svn.reactos.org/svn/reactos?rev=65222&view=rev
Log:
[SHELL32]
* Apply Wine commit e330a128 by Alexandre Julliard: Use Shell_GetImageLists to retrieve
image lists instead of using a global variable.
CORE-8540
Modified:
branches/shell-experiments/dll/win32/shell32/folders/printers.cpp
branches/shell-experiments/dll/win32/shell32/iconcache.cpp
branches/shell-experiments/dll/win32/shell32/shell32.cpp
branches/shell-experiments/dll/win32/shell32/shlview.cpp
branches/shell-experiments/dll/win32/shell32/wine/shell32_main.c
branches/shell-experiments/dll/win32/shell32/wine/shell32_main.h
Modified: branches/shell-experiments/dll/win32/shell32/folders/printers.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/printers.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/printers.cpp [iso-8859-1] Mon Nov
3 13:43:01 2014
@@ -125,17 +125,20 @@
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;
}
Modified: branches/shell-experiments/dll/win32/shell32/iconcache.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/iconcache.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/iconcache.cpp [iso-8859-1] Mon Nov 3
13:43:01 2014
@@ -36,6 +36,9 @@
} SIC_ENTRY, * LPSIC_ENTRY;
static HDPA sic_hdpa = 0;
+
+static HIMAGELIST ShellSmallIconList;
+static HIMAGELIST ShellBigIconList;
namespace
{
Modified: branches/shell-experiments/dll/win32/shell32/shell32.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shell32.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shell32.cpp [iso-8859-1] Mon Nov 3
13:43:01 2014
@@ -233,8 +233,6 @@
*
*/
HINSTANCE shell32_hInstance;
-HIMAGELIST ShellSmallIconList = 0;
-HIMAGELIST ShellBigIconList = 0;
void *operator new (size_t, void *buf)
{
Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Mon Nov 3
13:43:01 2014
@@ -587,6 +587,7 @@
{
SHELLDETAILS sd;
WCHAR szTemp[50];
+ HIMAGELIST big_icons, small_icons;
TRACE("%p\n", this);
@@ -608,8 +609,9 @@
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;
}
Modified: branches/shell-experiments/dll/win32/shell32/wine/shell32_main.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/wine/shell32_main.c [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/wine/shell32_main.c [iso-8859-1] Mon Nov
3 13:43:01 2014
@@ -419,6 +419,7 @@
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 @@
}
/* ### icons ###*/
+
+ Shell_GetImageLists( &big_icons, &small_icons );
+
if (flags & SHGFI_OPENICON)
uGilFlags |= GIL_OPENICON;
@@ -701,9 +705,9 @@
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 @@
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)
Modified: branches/shell-experiments/dll/win32/shell32/wine/shell32_main.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/wine/shell32_main.h [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/wine/shell32_main.h [iso-8859-1] Mon Nov
3 13:43:01 2014
@@ -31,8 +31,6 @@
*/
extern HMODULE huser32;
extern HINSTANCE shell32_hInstance;
-extern HIMAGELIST ShellSmallIconList;
-extern HIMAGELIST ShellBigIconList;
BOOL WINAPI Shell_GetImageLists(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);