Commit 7f363820 authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

shell32: Implement IFolderView2_{Get, Set}CurrentFolderFlags().

parent c8209830
......@@ -2945,16 +2945,23 @@ static HRESULT WINAPI FolderView2_SetText(IFolderView2 *iface, FVTEXTTYPE type,
static HRESULT WINAPI FolderView2_SetCurrentFolderFlags(IFolderView2 *iface, DWORD mask, DWORD flags)
{
IShellViewImpl *This = impl_from_IFolderView2(iface);
FIXME("(%p)->(0x%08lx 0x%08lx), stub\n", This, mask, flags);
return E_NOTIMPL;
IShellViewImpl *shellview = impl_from_IFolderView2(iface);
TRACE("folder view %p, mask %#lx, flags %#lx.\n", iface, mask, flags);
shellview->FolderSettings.fFlags = (shellview->FolderSettings.fFlags & ~mask) | (flags & mask);
return S_OK;
}
static HRESULT WINAPI FolderView2_GetCurrentFolderFlags(IFolderView2 *iface, DWORD *flags)
{
IShellViewImpl *This = impl_from_IFolderView2(iface);
FIXME("(%p)->(%p), stub\n", This, flags);
return E_NOTIMPL;
IShellViewImpl *shellview = impl_from_IFolderView2(iface);
TRACE("folder view %p, flags %p.\n", iface, flags);
if (flags)
*flags = shellview->FolderSettings.fFlags;
return S_OK;
}
static HRESULT WINAPI FolderView2_GetSortColumnCount(IFolderView2 *iface, int *columns)
......
......@@ -1533,24 +1533,24 @@ static void test_folder_flags(void)
}
hr = IFolderView2_GetCurrentFolderFlags(folderview, NULL);
todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
flags = 0xdeadbeef;
hr = IFolderView2_GetCurrentFolderFlags(folderview, &flags);
todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
todo_wine ok(flags == FWF_USESEARCHFOLDER, "Got flags %#lx.\n", flags);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(flags == FWF_USESEARCHFOLDER, "Got flags %#lx.\n", flags);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IFolderView2_SetCurrentFolderFlags(folderview, tests[i].mask, tests[i].flags);
todo_wine ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
flags = 0xdeadbeef;
hr = IFolderView2_GetCurrentFolderFlags(folderview, &flags);
todo_wine ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
todo_wine ok(flags == tests[i].expected, "Test %u: Got flags %#lx.\n", i, flags);
ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
ok(flags == tests[i].expected, "Test %u: Got flags %#lx.\n", i, flags);
hr = IFolderView2_SetCurrentFolderFlags(folderview, ~FWF_NONE, FWF_NONE);
todo_wine ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
}
IFolderView2_Release(folderview);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment