Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b8bf0c26
Commit
b8bf0c26
authored
May 02, 2017
by
Huw Davies
Committed by
Alexandre Julliard
May 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Simplify imagelist handling.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3a1b289d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
shell32_main.c
dlls/shell32/shell32_main.c
+10
-18
No files found.
dlls/shell32/shell32_main.c
View file @
b8bf0c26
...
...
@@ -429,7 +429,6 @@ 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
,
...
...
@@ -581,9 +580,6 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
}
/* ### icons ###*/
Shell_GetImageLists
(
&
big_icons
,
&
small_icons
);
if
(
flags
&
SHGFI_OPENICON
)
uGilFlags
|=
GIL_OPENICON
;
...
...
@@ -666,6 +662,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
/* get icon index (or load icon)*/
if
(
SUCCEEDED
(
hr
)
&&
(
flags
&
(
SHGFI_ICON
|
SHGFI_SYSICONINDEX
)))
{
IImageList
*
icon_list
;
SHGetImageList
(
(
flags
&
SHGFI_SMALLICON
)
?
SHIL_SMALL
:
SHIL_LARGE
,
&
IID_IImageList
,
(
void
**
)
&
icon_list
);
if
(
flags
&
SHGFI_USEFILEATTRIBUTES
&&
!
(
flags
&
SHGFI_PIDL
))
{
WCHAR
sTemp
[
MAX_PATH
];
...
...
@@ -727,21 +726,14 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
}
if
(
ret
&&
(
flags
&
SHGFI_SYSICONINDEX
))
{
if
(
flags
&
SHGFI_SMALLICON
)
ret
=
(
DWORD_PTR
)
small_icons
;
else
ret
=
(
DWORD_PTR
)
big_icons
;
IImageList_AddRef
((
IImageList
*
)
ret
);
IImageList_AddRef
(
icon_list
);
ret
=
(
DWORD_PTR
)
icon_list
;
}
}
/* icon handle */
if
(
SUCCEEDED
(
hr
)
&&
(
flags
&
SHGFI_ICON
)
&&
IconNotYetLoaded
)
{
if
(
flags
&
SHGFI_SMALLICON
)
psfi
->
hIcon
=
ImageList_GetIcon
(
small_icons
,
psfi
->
iIcon
,
ILD_NORMAL
);
else
psfi
->
hIcon
=
ImageList_GetIcon
(
big_icons
,
psfi
->
iIcon
,
ILD_NORMAL
);
if
(
ret
&&
(
flags
&
SHGFI_ICON
))
{
hr
=
IImageList_GetIcon
(
icon_list
,
psfi
->
iIcon
,
ILD_NORMAL
,
&
psfi
->
hIcon
);
}
IImageList_Release
(
icon_list
);
}
if
(
flags
&
~
SHGFI_KNOWN_FLAGS
)
...
...
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