Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e330a128
Commit
e330a128
authored
Jan 02, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use Shell_GetImageLists to retrieve image lists instead of using a global variable.
parent
5f4ccc01
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
13 deletions
+18
-13
folders.c
dlls/shell32/folders.c
+4
-3
iconcache.c
dlls/shell32/iconcache.c
+2
-0
shell32_main.c
dlls/shell32/shell32_main.c
+8
-6
shell32_main.h
dlls/shell32/shell32_main.h
+0
-2
shlview.c
dlls/shell32/shlview.c
+4
-2
No files found.
dlls/shell32/folders.c
View file @
e330a128
...
@@ -354,17 +354,18 @@ static HRESULT WINAPI IExtractIconW_fnExtract(IExtractIconW * iface, LPCWSTR psz
...
@@ -354,17 +354,18 @@ static HRESULT WINAPI IExtractIconW_fnExtract(IExtractIconW * iface, LPCWSTR psz
{
{
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
);
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
);
int
index
;
int
index
;
HIMAGELIST
big_icons
,
small_icons
;
FIXME
(
"(%p) (file=%s index=%d %p %p size=%08x) semi-stub
\n
"
,
This
,
debugstr_w
(
pszFile
),
FIXME
(
"(%p) (file=%s index=%d %p %p size=%08x) semi-stub
\n
"
,
This
,
debugstr_w
(
pszFile
),
(
signed
)
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIconSize
);
(
signed
)
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIconSize
);
index
=
SIC_GetIconIndex
(
pszFile
,
nIconIndex
,
0
);
index
=
SIC_GetIconIndex
(
pszFile
,
nIconIndex
,
0
);
Shell_GetImageLists
(
&
big_icons
,
&
small_icons
);
if
(
phiconLarge
)
if
(
phiconLarge
)
*
phiconLarge
=
ImageList_GetIcon
(
ShellBigIconList
,
index
,
ILD_TRANSPARENT
);
*
phiconLarge
=
ImageList_GetIcon
(
big_icons
,
index
,
ILD_TRANSPARENT
);
if
(
phiconSmall
)
if
(
phiconSmall
)
*
phiconSmall
=
ImageList_GetIcon
(
ShellSmallIconList
,
index
,
ILD_TRANSPARENT
);
*
phiconSmall
=
ImageList_GetIcon
(
small_icons
,
index
,
ILD_TRANSPARENT
);
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/shell32/iconcache.c
View file @
e330a128
...
@@ -61,6 +61,8 @@ typedef struct
...
@@ -61,6 +61,8 @@ typedef struct
static
HDPA
sic_hdpa
;
static
HDPA
sic_hdpa
;
static
INIT_ONCE
sic_init_once
=
INIT_ONCE_STATIC_INIT
;
static
INIT_ONCE
sic_init_once
=
INIT_ONCE_STATIC_INIT
;
static
HIMAGELIST
ShellSmallIconList
;
static
HIMAGELIST
ShellBigIconList
;
static
CRITICAL_SECTION
SHELL32_SicCS
;
static
CRITICAL_SECTION
SHELL32_SicCS
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
...
...
dlls/shell32/shell32_main.c
View file @
e330a128
...
@@ -425,6 +425,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
...
@@ -425,6 +425,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
BOOL
IconNotYetLoaded
=
TRUE
;
BOOL
IconNotYetLoaded
=
TRUE
;
UINT
uGilFlags
=
0
;
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
"
,
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
,
(
flags
&
SHGFI_PIDL
)
?
"pidl"
:
debugstr_w
(
path
),
dwFileAttributes
,
...
@@ -563,6 +564,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
...
@@ -563,6 +564,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
}
}
/* ### icons ###*/
/* ### icons ###*/
Shell_GetImageLists
(
&
big_icons
,
&
small_icons
);
if
(
flags
&
SHGFI_OPENICON
)
if
(
flags
&
SHGFI_OPENICON
)
uGilFlags
|=
GIL_OPENICON
;
uGilFlags
|=
GIL_OPENICON
;
...
@@ -707,9 +711,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
...
@@ -707,9 +711,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
if
(
ret
&&
(
flags
&
SHGFI_SYSICONINDEX
))
if
(
ret
&&
(
flags
&
SHGFI_SYSICONINDEX
))
{
{
if
(
flags
&
SHGFI_SMALLICON
)
if
(
flags
&
SHGFI_SMALLICON
)
ret
=
(
DWORD_PTR
)
ShellSmallIconList
;
ret
=
(
DWORD_PTR
)
small_icons
;
else
else
ret
=
(
DWORD_PTR
)
ShellBigIconList
;
ret
=
(
DWORD_PTR
)
big_icons
;
}
}
}
}
...
@@ -717,9 +721,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
...
@@ -717,9 +721,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
if
(
SUCCEEDED
(
hr
)
&&
(
flags
&
SHGFI_ICON
)
&&
IconNotYetLoaded
)
if
(
SUCCEEDED
(
hr
)
&&
(
flags
&
SHGFI_ICON
)
&&
IconNotYetLoaded
)
{
{
if
(
flags
&
SHGFI_SMALLICON
)
if
(
flags
&
SHGFI_SMALLICON
)
psfi
->
hIcon
=
ImageList_GetIcon
(
ShellSmallIconList
,
psfi
->
iIcon
,
ILD_NORMAL
);
psfi
->
hIcon
=
ImageList_GetIcon
(
small_icons
,
psfi
->
iIcon
,
ILD_NORMAL
);
else
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
)
if
(
flags
&
~
SHGFI_KNOWN_FLAGS
)
...
@@ -1248,8 +1252,6 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
...
@@ -1248,8 +1252,6 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
*
*
*/
*/
HINSTANCE
shell32_hInstance
=
0
;
HINSTANCE
shell32_hInstance
=
0
;
HIMAGELIST
ShellSmallIconList
=
0
;
HIMAGELIST
ShellBigIconList
=
0
;
/*************************************************************************
/*************************************************************************
...
...
dlls/shell32/shell32_main.h
View file @
e330a128
...
@@ -42,8 +42,6 @@
...
@@ -42,8 +42,6 @@
*/
*/
extern
HMODULE
huser32
DECLSPEC_HIDDEN
;
extern
HMODULE
huser32
DECLSPEC_HIDDEN
;
extern
HINSTANCE
shell32_hInstance
DECLSPEC_HIDDEN
;
extern
HINSTANCE
shell32_hInstance
DECLSPEC_HIDDEN
;
extern
HIMAGELIST
ShellSmallIconList
DECLSPEC_HIDDEN
;
extern
HIMAGELIST
ShellBigIconList
DECLSPEC_HIDDEN
;
/* Iconcache */
/* Iconcache */
#define INVALID_INDEX -1
#define INVALID_INDEX -1
...
...
dlls/shell32/shlview.c
View file @
e330a128
...
@@ -406,6 +406,7 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
...
@@ -406,6 +406,7 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
static
void
ShellView_InitList
(
IShellViewImpl
*
This
)
static
void
ShellView_InitList
(
IShellViewImpl
*
This
)
{
{
IShellDetails
*
details
=
NULL
;
IShellDetails
*
details
=
NULL
;
HIMAGELIST
big_icons
,
small_icons
;
LVCOLUMNW
lvColumn
;
LVCOLUMNW
lvColumn
;
SHELLDETAILS
sd
;
SHELLDETAILS
sd
;
WCHAR
nameW
[
50
];
WCHAR
nameW
[
50
];
...
@@ -414,9 +415,10 @@ static void ShellView_InitList(IShellViewImpl *This)
...
@@ -414,9 +415,10 @@ static void ShellView_InitList(IShellViewImpl *This)
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)
\n
"
,
This
);
Shell_GetImageLists
(
&
big_icons
,
&
small_icons
);
SendMessageW
(
This
->
hWndList
,
LVM_DELETEALLITEMS
,
0
,
0
);
SendMessageW
(
This
->
hWndList
,
LVM_DELETEALLITEMS
,
0
,
0
);
SendMessageW
(
This
->
hWndList
,
LVM_SETIMAGELIST
,
LVSIL_SMALL
,
(
LPARAM
)
ShellSmallIconList
);
SendMessageW
(
This
->
hWndList
,
LVM_SETIMAGELIST
,
LVSIL_SMALL
,
(
LPARAM
)
small_icons
);
SendMessageW
(
This
->
hWndList
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,
(
LPARAM
)
ShellBigIconList
);
SendMessageW
(
This
->
hWndList
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,
(
LPARAM
)
big_icons
);
lvColumn
.
mask
=
LVCF_FMT
|
LVCF_WIDTH
|
LVCF_TEXT
;
lvColumn
.
mask
=
LVCF_FMT
|
LVCF_WIDTH
|
LVCF_TEXT
;
lvColumn
.
pszText
=
nameW
;
lvColumn
.
pszText
=
nameW
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment