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
6eeb389d
Commit
6eeb389d
authored
Apr 24, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Apr 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Don't alter the shell imagelist.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b79436a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
explorer.c
programs/explorer/explorer.c
+25
-25
No files found.
programs/explorer/explorer.c
View file @
6eeb389d
...
...
@@ -105,42 +105,43 @@ static ULONG WINAPI IExplorerBrowserEventsImpl_fnRelease(IExplorerBrowserEvents
return
ref
;
}
static
BOOL
create_combobox_item
(
IShellFolder
*
folder
,
LPCITEMIDLIST
pidl
,
IImageList
*
icon_list
,
COMBOBOXEXITEMW
*
item
)
static
BOOL
create_combobox_item
(
IShellFolder
*
folder
,
LPCITEMIDLIST
child_
pidl
,
IImageList
*
icon_list
,
COMBOBOXEXITEMW
*
item
)
{
STRRET
strret
;
HRESULT
hres
;
IExtractIconW
*
extract_icon
;
UINT
reserved
;
WCHAR
icon_file
[
MAX_PATH
];
INT
icon_index
;
UINT
icon_flags
;
HICON
icon
;
PIDLIST_ABSOLUTE
parent_pidl
,
pidl
;
SHFILEINFOW
info
;
IImageList
*
list
;
strret
.
uType
=
STRRET_WSTR
;
hres
=
IShellFolder_GetDisplayNameOf
(
folder
,
pidl
,
SHGDN_FORADDRESSBAR
,
&
strret
);
hres
=
IShellFolder_GetDisplayNameOf
(
folder
,
child_pidl
,
SHGDN_FORADDRESSBAR
,
&
strret
);
if
(
SUCCEEDED
(
hres
))
hres
=
StrRetToStrW
(
&
strret
,
pidl
,
&
item
->
pszText
);
hres
=
StrRetToStrW
(
&
strret
,
child_
pidl
,
&
item
->
pszText
);
if
(
FAILED
(
hres
))
{
WINE_WARN
(
"Could not get name for pidl
\n
"
);
return
FALSE
;
}
hres
=
IShellFolder_GetUIObjectOf
(
folder
,
NULL
,
1
,
&
pidl
,
&
IID_IExtractIconW
,
&
reserved
,(
void
**
)
&
extract_icon
);
if
(
SUCCEEDED
(
hres
))
{
item
->
mask
|=
CBEIF_IMAGE
;
IExtractIconW_GetIconLocation
(
extract_icon
,
GIL_FORSHELL
,
icon_file
,
sizeof
(
icon_file
)
/
sizeof
(
WCHAR
),
&
icon_index
,
&
icon_flags
);
IExtractIconW_Extract
(
extract_icon
,
icon_file
,
icon_index
,
NULL
,
&
icon
,
20
);
item
->
iImage
=
ImageList_AddIcon
((
HIMAGELIST
)
icon_list
,
icon
);
IExtractIconW_Release
(
extract_icon
);
}
else
item
->
mask
&=
~
CBEIF_IMAGE
;
hres
=
SHGetIDListFromObject
(
(
IUnknown
*
)
folder
,
&
parent_pidl
);
if
(
FAILED
(
hres
))
return
FALSE
;
pidl
=
ILCombine
(
parent_pidl
,
child_pidl
);
if
(
pidl
)
{
item
->
mask
&=
~
CBEIF_IMAGE
;
WINE_WARN
(
"Could not get an icon for %s
\n
"
,
wine_dbgstr_w
(
item
->
pszText
));
list
=
(
IImageList
*
)
SHGetFileInfoW
(
(
WCHAR
*
)
pidl
,
0
,
&
info
,
sizeof
(
info
),
SHGFI_PIDL
|
SHGFI_SMALLICON
|
SHGFI_SYSICONINDEX
);
if
(
list
)
{
IImageList_Release
(
list
);
item
->
iImage
=
info
.
iIcon
;
item
->
mask
|=
CBEIF_IMAGE
;
}
ILFree
(
pidl
);
}
ILFree
(
parent_pidl
);
return
TRUE
;
}
...
...
@@ -153,7 +154,6 @@ static void update_path_box(explorer_info *info)
LPITEMIDLIST
desktop_pidl
;
IEnumIDList
*
ids
;
ImageList_Remove
((
HIMAGELIST
)
info
->
icon_list
,
-
1
);
SendMessageW
(
info
->
path_box
,
CB_RESETCONTENT
,
0
,
0
);
SHGetDesktopFolder
(
&
desktop
);
IShellFolder_QueryInterface
(
desktop
,
&
IID_IPersistFolder2
,(
void
**
)
&
persist
);
...
...
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