https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d70e798977260ac74074de...
commit d70e798977260ac74074deb124eb87777cd88914 Author: Carl J. Bialorucki cbialo2@outlook.com AuthorDate: Fri Jul 28 13:20:00 2023 -0600 Commit: GitHub noreply@github.com CommitDate: Fri Jul 28 21:20:00 2023 +0200
[BROWSEUI] Use details view by default (#5452) CORE-18904
* Detail view by default, except in special folders * Added hack/fixme disclaimer --- dll/win32/browseui/shellbrowser.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index fb4c1ccc59b..0c808c29e25 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -804,14 +804,23 @@ HRESULT CShellBrowser::BrowseToPIDL(LPCITEMIDLIST pidl, long flags) CComPtr<IShellFolder> newFolder; FOLDERSETTINGS newFolderSettings; HRESULT hResult; + CLSID clsid; + BOOL HasIconViewType;
// called by shell view to browse to new folder // also called by explorer band to navigate to new folder hResult = SHBindToFolder(pidl, &newFolder); if (FAILED_UNEXPECTEDLY(hResult)) return hResult; + // HACK & FIXME: Get view mode from shellbag when fully implemented. + IUnknown_GetClassID(newFolder, &clsid); + HasIconViewType = clsid == CLSID_MyComputer || clsid == CLSID_ControlPanel || + clsid == CLSID_ShellDesktop;
- newFolderSettings.ViewMode = FVM_ICON; + if (HasIconViewType) + newFolderSettings.ViewMode = FVM_ICON; + else + newFolderSettings.ViewMode = FVM_DETAILS; newFolderSettings.fFlags = 0; hResult = BrowseToPath(newFolder, pidl, &newFolderSettings, flags); if (FAILED_UNEXPECTEDLY(hResult))