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
d935fa69
Commit
d935fa69
authored
Sep 26, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement FolderItem attributes properties.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0d87da46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
16 deletions
+40
-16
shelldispatch.c
dlls/shell32/shelldispatch.c
+33
-16
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+7
-0
No files found.
dlls/shell32/shelldispatch.c
View file @
d935fa69
...
...
@@ -83,6 +83,7 @@ typedef struct {
LONG
ref
;
FolderImpl
*
folder
;
WCHAR
*
path
;
/* if NULL, folder path is used */
DWORD
attributes
;
}
FolderItemImpl
;
typedef
struct
{
...
...
@@ -788,36 +789,48 @@ static HRESULT WINAPI FolderItemImpl_get_GetFolder(FolderItem2 *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_IsLink
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
pb
)
static
HRESULT
WINAPI
FolderItemImpl_get_IsLink
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
b
)
{
F
IXME
(
"(%p,%p)
\n
"
,
iface
,
pb
);
F
olderItemImpl
*
This
=
impl_from_FolderItem
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
b
);
*
b
=
This
->
attributes
&
SFGAO_LINK
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_IsFolder
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
pb
)
static
HRESULT
WINAPI
FolderItemImpl_get_IsFolder
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
b
)
{
F
IXME
(
"(%p,%p)
\n
"
,
iface
,
pb
);
F
olderItemImpl
*
This
=
impl_from_FolderItem
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
b
);
*
b
=
This
->
attributes
&
SFGAO_FOLDER
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_IsFileSystem
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
pb
)
static
HRESULT
WINAPI
FolderItemImpl_get_IsFileSystem
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
b
)
{
F
IXME
(
"(%p,%p)
\n
"
,
iface
,
pb
);
F
olderItemImpl
*
This
=
impl_from_FolderItem
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
b
);
*
b
=
This
->
attributes
&
SFGAO_FILESYSTEM
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_IsBrowsable
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
pb
)
static
HRESULT
WINAPI
FolderItemImpl_get_IsBrowsable
(
FolderItem2
*
iface
,
VARIANT_BOOL
*
b
)
{
F
IXME
(
"(%p,%p)
\n
"
,
iface
,
pb
);
F
olderItemImpl
*
This
=
impl_from_FolderItem
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
b
);
*
b
=
This
->
attributes
&
SFGAO_BROWSABLE
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_ModifyDate
(
FolderItem2
*
iface
,
...
...
@@ -924,6 +937,7 @@ static const FolderItem2Vtbl FolderItemImpl_Vtbl = {
static
HRESULT
FolderItem_Constructor
(
FolderImpl
*
folder
,
const
WCHAR
*
path
,
FolderItem
**
item
)
{
PIDLIST_ABSOLUTE
pidl
;
FolderItemImpl
*
This
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
path
));
...
...
@@ -942,6 +956,9 @@ static HRESULT FolderItem_Constructor(FolderImpl *folder, const WCHAR *path, Fol
This
->
folder
=
folder
;
Folder3_AddRef
(
&
folder
->
Folder3_iface
);
if
(
SHParseDisplayName
(
This
->
path
,
NULL
,
&
pidl
,
~
0u
,
&
This
->
attributes
)
==
S_OK
)
ILFree
(
pidl
);
*
item
=
(
FolderItem
*
)
&
This
->
FolderItem2_iface
;
return
S_OK
;
}
...
...
dlls/shell32/tests/shelldispatch.c
View file @
d935fa69
...
...
@@ -594,6 +594,8 @@ static void test_items(void)
/* test the folder item corresponding to each file */
for
(
i
=
0
;
i
<
sizeof
(
file_defs
)
/
sizeof
(
file_defs
[
0
]);
i
++
)
{
VARIANT_BOOL
b
;
V_I4
(
&
int_index
)
=
i
;
variant_set_string
(
&
str_index
,
file_defs
[
i
].
name
);
...
...
@@ -629,6 +631,11 @@ static void test_items(void)
"file_defs[%d]: expected %s, got %s
\n
"
,
i
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
b
=
0xdead
;
r
=
FolderItem_get_IsFolder
(
item
,
&
b
);
ok
(
r
==
S_OK
,
"Failed to get IsFolder property, %#x.
\n
"
,
r
);
ok
(
file_defs
[
i
].
type
==
DIRECTORY
?
b
==
VARIANT_TRUE
:
b
==
VARIANT_FALSE
,
"Unexpected prop value %#x.
\n
"
,
b
);
FolderItem_Release
(
item
);
if
(
file_defs
[
i
].
type
==
DIRECTORY
)
...
...
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