mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[SHELL32]
- CDesktopBrowser: The flags that SHOpenNewFrame takes are the same that SHExplorerParseCmdLine returns, not the SBSP_ ones. [BROWSEUI] - Move the hack to fill the parsed pidl if none was found to SHCreateFromDesktop. - Convert the SH_EXPLORER_CMDLINE_FLAG_E flag to a SBSP_EXPLOREMODE and pass it to the CShellBrowser. svn path=/trunk/; revision=73157
This commit is contained in:
parent
ce0d9e3727
commit
3c58a339dc
2 changed files with 12 additions and 7 deletions
|
@ -357,13 +357,11 @@ static HRESULT ExplorerMessageLoop(IEThreadParamBlock * parameters)
|
|||
if (parameters && parameters->offsetF8)
|
||||
parameters->offsetF8->AddRef();
|
||||
|
||||
// HACK! This shouldn't happen! SHExplorerParseCmdLine needs fixing.
|
||||
if (!parameters->directoryPIDL)
|
||||
{
|
||||
SHGetFolderLocation(NULL, CSIDL_PERSONAL, NULL, NULL, ¶meters->directoryPIDL);
|
||||
}
|
||||
UINT wFlags = 0;
|
||||
if ((parameters->dwFlags & SH_EXPLORER_CMDLINE_FLAG_E))
|
||||
wFlags |= SBSP_EXPLOREMODE;
|
||||
|
||||
hResult = CShellBrowser_CreateInstance(parameters->directoryPIDL, parameters->dwFlags, IID_PPV_ARG(IBrowserService2, &browser));
|
||||
hResult = CShellBrowser_CreateInstance(parameters->directoryPIDL, wFlags, IID_PPV_ARG(IBrowserService2, &browser));
|
||||
if (FAILED_UNEXPECTEDLY(hResult))
|
||||
return hResult;
|
||||
|
||||
|
@ -609,6 +607,12 @@ BOOL WINAPI SHCreateFromDesktop(ExplorerCommandLineParseResults * parseResults)
|
|||
}
|
||||
}
|
||||
|
||||
// HACK! This shouldn't happen! SHExplorerParseCmdLine needs fixing.
|
||||
if (!pidl)
|
||||
{
|
||||
SHGetFolderLocation(NULL, CSIDL_PERSONAL, NULL, NULL, &pidl);
|
||||
}
|
||||
|
||||
parameters->directoryPIDL = pidl;
|
||||
|
||||
// Try to find the owner of the idlist, if we aren't running /SEPARATE
|
||||
|
|
|
@ -284,7 +284,8 @@ HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT
|
|||
* find an open shell window that shows the requested pidl and activate it
|
||||
*/
|
||||
|
||||
return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, wFlags);
|
||||
DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0;
|
||||
return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, dwFlags);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm)
|
||||
|
|
Loading…
Reference in a new issue