shell32/shellview: Implement IFolderView::ItemCount for SVGIO_ALLVIEW flag.
This commit is contained in:
parent
b8220e727c
commit
78c909fb08
|
@ -2736,8 +2736,15 @@ static HRESULT WINAPI IFView_Item(IFolderView *iface, int index, PITEMID_CHILD *
|
||||||
static HRESULT WINAPI IFView_ItemCount(IFolderView *iface, UINT flags, int *items)
|
static HRESULT WINAPI IFView_ItemCount(IFolderView *iface, UINT flags, int *items)
|
||||||
{
|
{
|
||||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||||
FIXME("(%p)->(%u %p), stub\n", This, flags, items);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%u %p)\n", This, flags, items);
|
||||||
|
|
||||||
|
if (flags != SVGIO_ALLVIEW)
|
||||||
|
FIXME("some flags unsupported, %x\n", flags & ~SVGIO_ALLVIEW);
|
||||||
|
|
||||||
|
*items = SendMessageW(This->hWndList, LVM_GETITEMCOUNT, 0, 0);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid, void **ppv)
|
static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid, void **ppv)
|
||||||
|
|
|
@ -308,6 +308,11 @@ static const struct message folderview_getfocused_seq[] = {
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct message folderview_itemcount_seq[] = {
|
||||||
|
{ LVM_GETITEMCOUNT, sent },
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
||||||
static void test_IShellView_CreateViewWindow(void)
|
static void test_IShellView_CreateViewWindow(void)
|
||||||
{
|
{
|
||||||
IShellFolder *desktop;
|
IShellFolder *desktop;
|
||||||
|
@ -469,6 +474,19 @@ if (0)
|
||||||
ok(ref1 == ref2, "expected same refcount, got %d\n", ref2);
|
ok(ref1 == ref2, "expected same refcount, got %d\n", ref2);
|
||||||
ok(desktop == folder, "\n");
|
ok(desktop == folder, "\n");
|
||||||
|
|
||||||
|
/* IFolderView::ItemCount */
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
|
/* crashes on XP */
|
||||||
|
hr = IFolderView_ItemCount(fv, SVGIO_ALLVIEW, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
|
hr = IFolderView_ItemCount(fv, SVGIO_ALLVIEW, &ret);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_itemcount_seq,
|
||||||
|
"IFolderView::ItemCount", FALSE);
|
||||||
|
|
||||||
IShellBrowser_Release(browser);
|
IShellBrowser_Release(browser);
|
||||||
IFolderView_Release(fv);
|
IFolderView_Release(fv);
|
||||||
IShellView_Release(view);
|
IShellView_Release(view);
|
||||||
|
|
Loading…
Reference in New Issue