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
0a32123d
Commit
0a32123d
authored
Mar 23, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add IShellFolderView::RemoveObject for IShellView.
parent
1f6c759e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
34 deletions
+45
-34
shlview.c
dlls/shell32/shlview.c
+39
-34
shlview.c
dlls/shell32/tests/shlview.c
+6
-0
No files found.
dlls/shell32/shlview.c
View file @
0a32123d
...
...
@@ -585,19 +585,6 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
}
/**********************************************************
* LV_DeleteItem()
*/
static
BOOLEAN
LV_DeleteItem
(
IShellViewImpl
*
This
,
LPCITEMIDLIST
pidl
)
{
int
nIndex
;
TRACE
(
"(%p)(pidl=%p)
\n
"
,
This
,
pidl
);
nIndex
=
LV_FindItemByPidl
(
This
,
ILFindLastID
(
pidl
));
return
(
-
1
==
SendMessageW
(
This
->
hWndList
,
LVM_DELETEITEM
,
nIndex
,
0
))
?
FALSE
:
TRUE
;
}
/**********************************************************
* LV_RenameItem()
*/
static
BOOLEAN
LV_RenameItem
(
IShellViewImpl
*
This
,
LPCITEMIDLIST
pidlOld
,
LPCITEMIDLIST
pidlNew
)
...
...
@@ -1608,28 +1595,33 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
* ShellView_OnChange()
*/
static
LRESULT
ShellView_OnChange
(
IShellViewImpl
*
This
,
const
LPCITEMIDLIST
*
Pidls
,
LONG
wEventId
)
static
LRESULT
ShellView_OnChange
(
IShellViewImpl
*
This
,
const
LPCITEMIDLIST
*
pidls
,
LONG
event
)
{
BOOL
ret
=
TRUE
;
TRACE
(
"(%p)(%p,%p,0x%08x)
\n
"
,
This
,
Pidls
[
0
],
Pidls
[
1
],
wEventId
);
switch
(
wEventId
)
{
case
SHCNE_MKDIR
:
case
SHCNE_CREATE
:
LV_AddItem
(
This
,
Pidls
[
0
]);
break
;
case
SHCNE_RMDIR
:
case
SHCNE_DELETE
:
LV_DeleteItem
(
This
,
Pidls
[
0
]);
break
;
case
SHCNE_RENAMEFOLDER
:
case
SHCNE_RENAMEITEM
:
LV_RenameItem
(
This
,
Pidls
[
0
],
Pidls
[
1
]);
break
;
case
SHCNE_UPDATEITEM
:
TRACE
(
"(%p)->(%p, %p, 0x%08x)
\n
"
,
This
,
pidls
[
0
],
pidls
[
1
],
event
);
switch
(
event
)
{
case
SHCNE_MKDIR
:
case
SHCNE_CREATE
:
LV_AddItem
(
This
,
pidls
[
0
]);
break
;
case
SHCNE_RMDIR
:
case
SHCNE_DELETE
:
{
INT
i
=
LV_FindItemByPidl
(
This
,
ILFindLastID
(
pidls
[
0
]));
ret
=
SendMessageW
(
This
->
hWndList
,
LVM_DELETEITEM
,
i
,
0
);
break
;
}
case
SHCNE_RENAMEFOLDER
:
case
SHCNE_RENAMEITEM
:
LV_RenameItem
(
This
,
pidls
[
0
],
pidls
[
1
]);
break
;
case
SHCNE_UPDATEITEM
:
break
;
}
return
TRUE
;
}
return
ret
;
}
/**********************************************************
* ShellView_WndProc
...
...
@@ -2989,8 +2981,21 @@ static HRESULT WINAPI IShellFolderView_fnRemoveObject(
UINT
*
item
)
{
IShellViewImpl
*
This
=
impl_from_IShellFolderView
(
iface
);
FIXME
(
"(%p)->(%p %p) stub
\n
"
,
This
,
pidl
,
item
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pidl
,
item
);
if
(
pidl
)
{
*
item
=
LV_FindItemByPidl
(
This
,
ILFindLastID
(
pidl
));
SendMessageW
(
This
->
hWndList
,
LVM_DELETEITEM
,
*
item
,
0
);
}
else
{
*
item
=
0
;
SendMessageW
(
This
->
hWndList
,
LVM_DELETEALLITEMS
,
0
,
0
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
IShellFolderView_fnGetObjectCount
(
...
...
dlls/shell32/tests/shlview.c
View file @
0a32123d
...
...
@@ -581,6 +581,12 @@ static void test_IShellFolderView(void)
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
ok
(
i
==
0xdeadbeef
,
"got %d
\n
"
,
i
);
/* ::RemoveObject */
i
=
0xdeadbeef
;
hr
=
IShellFolderView_RemoveObject
(
folderview
,
NULL
,
&
i
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
ok
(
i
==
0
,
"got %d
\n
"
,
i
);
IShellFolderView_Release
(
folderview
);
IShellView_Release
(
view
);
...
...
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