-- v2: shell32: Implement IFolderView2::Items(&IID_IShellItemArray). shell32: Return S_OK from IFolderView2::SetViewModeAndIconSize() stub. shell32: Improve FolderView2::GetViewModeAndIconSize() stub.
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/shell32/shlview.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index d6b917496c2..83fb206af52 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -3038,8 +3038,13 @@ static HRESULT WINAPI FolderView2_GetViewModeAndIconSize(IFolderView2 *iface, FO int *size) { IShellViewImpl *This = impl_from_IFolderView2(iface); + FIXME("(%p)->(%p %p), stub\n", This, mode, size); - return E_NOTIMPL; + + *size = 16; /* FIXME */ + *mode = This->FolderSettings.ViewMode; + + return S_OK; }
static HRESULT WINAPI FolderView2_SetGroupSubsetCount(IFolderView2 *iface, UINT visible_rows)
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/shell32/shlview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 83fb206af52..71f60c2db89 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -3031,7 +3031,7 @@ static HRESULT WINAPI FolderView2_SetViewModeAndIconSize(IFolderView2 *iface, FO { IShellViewImpl *This = impl_from_IFolderView2(iface); FIXME("(%p)->(%d %d), stub\n", This, mode, size); - return E_NOTIMPL; + return S_OK; }
static HRESULT WINAPI FolderView2_GetViewModeAndIconSize(IFolderView2 *iface, FOLDERVIEWMODE *mode,
From: Dmitry Timoshkov dmitry@baikal.ru
v2: Fixed a typo.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/shell32/shlview.c | 45 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 71f60c2db89..bb1119355ab 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -2774,8 +2774,49 @@ static HRESULT WINAPI FolderView_ItemCount(IFolderView2 *iface, UINT flags, int static HRESULT WINAPI FolderView_Items(IFolderView2 *iface, UINT flags, REFIID riid, void **ppv) { IShellViewImpl *This = impl_from_IFolderView2(iface); - FIXME("(%p)->(%u %s %p), stub\n", This, flags, debugstr_guid(riid), ppv); - return E_NOTIMPL; + int count, i; + ITEMIDLIST **pidl; + LVITEMW item; + HRESULT hr; + + if (!IsEqualIID(riid, &IID_IShellItemArray)) + { + FIXME("%s is not supported\n", debugstr_guid(riid)); + return E_NOINTERFACE; + } + + if (flags != SVGIO_ALLVIEW) + FIXME("some flags unsupported, %x\n", flags & ~SVGIO_ALLVIEW); + + count = SendMessageW(This->hWndList, LVM_GETITEMCOUNT, 0, 0); + if (!count) + { + FIXME("Folder is empty\n"); + return E_FAIL; + } + + pidl = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*pidl)); + if (!pidl) return E_OUTOFMEMORY; + + for (i = 0; i < count; i++) + { + item.mask = LVIF_PARAM; + item.iItem = i; + if (!SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM)&item)) + { + FIXME("LVM_GETITEMW(%d) failed\n" ,i); + HeapFree(GetProcessHeap(), 0, pidl); + return E_FAIL; + } + + pidl[i] = (ITEMIDLIST *)item.lParam; + } + + hr = SHCreateShellItemArray(NULL, This->pSFParent, count, (LPCITEMIDLIST *)pidl, (IShellItemArray **)ppv); + + HeapFree(GetProcessHeap(), 0, pidl); + + return hr; }
static HRESULT WINAPI FolderView_GetSelectionMarkedItem(IFolderView2 *iface, int *item)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=139954
Your paranoid android.
=== debian11b (64 bit WoW report) ===
dinput: device8.c:2238: Test failed: 0x700: got key_state[0] 0