[BROWSEUI] Use details view by default (#5452) CORE-18904

* Detail view by default, except in special folders
* Added hack/fixme disclaimer
This commit is contained in:
Carl J. Bialorucki 2023-07-28 13:20:00 -06:00 committed by GitHub
parent 02b65773a3
commit d70e798977
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))