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
209069ae
Commit
209069ae
authored
Apr 01, 2011
by
David Hedberg
Committed by
Alexandre Julliard
Apr 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Implement filetype filtering for the item dialog.
parent
ccfbe722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
itemdlg.c
dlls/comdlg32/itemdlg.c
+41
-2
No files found.
dlls/comdlg32/itemdlg.c
View file @
209069ae
...
...
@@ -1746,8 +1746,47 @@ static HRESULT WINAPI ICommDlgBrowser3_fnIncludeObject(ICommDlgBrowser3 *iface,
IShellView
*
shv
,
LPCITEMIDLIST
pidl
)
{
FileDialogImpl
*
This
=
impl_from_ICommDlgBrowser3
(
iface
);
FIXME
(
"Stub: %p (%p, %p)
\n
"
,
This
,
shv
,
pidl
);
return
S_OK
;
IShellItem
*
psi
;
LPWSTR
filename
;
LPITEMIDLIST
parent_pidl
;
HRESULT
hr
;
ULONG
attr
;
TRACE
(
"%p (%p, %p)
\n
"
,
This
,
shv
,
pidl
);
if
(
!
This
->
filterspec_count
)
return
S_OK
;
hr
=
SHGetIDListFromObject
((
IUnknown
*
)
shv
,
&
parent_pidl
);
if
(
SUCCEEDED
(
hr
))
{
LPITEMIDLIST
full_pidl
=
ILCombine
(
parent_pidl
,
pidl
);
hr
=
SHCreateItemFromIDList
(
full_pidl
,
&
IID_IShellItem
,
(
void
**
)
&
psi
);
ILFree
(
parent_pidl
);
ILFree
(
full_pidl
);
}
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get shellitem (%08x).
\n
"
,
hr
);
return
S_OK
;
}
hr
=
IShellItem_GetAttributes
(
psi
,
SFGAO_FOLDER
|
SFGAO_LINK
,
&
attr
);
if
(
FAILED
(
hr
)
||
(
attr
&
(
SFGAO_FOLDER
|
SFGAO_LINK
)))
{
IShellItem_Release
(
psi
);
return
S_OK
;
}
hr
=
S_OK
;
if
(
SUCCEEDED
(
IShellItem_GetDisplayName
(
psi
,
SIGDN_PARENTRELATIVEPARSING
,
&
filename
)))
{
if
(
!
PathMatchSpecW
(
filename
,
This
->
filterspecs
[
This
->
filetypeindex
].
pszSpec
))
hr
=
S_FALSE
;
CoTaskMemFree
(
filename
);
}
IShellItem_Release
(
psi
);
return
hr
;
}
static
HRESULT
WINAPI
ICommDlgBrowser3_fnNotify
(
ICommDlgBrowser3
*
iface
,
...
...
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