Author: gadamopoulos
Date: Sun Nov 6 20:47:21 2016
New Revision: 73158
URL:
http://svn.reactos.org/svn/reactos?rev=73158&view=rev
Log:
[SHELL32]
- CDefView: Correct the check for SVSI_EDIT because SVSI_EDIT implies SVSI_SELECT. This
actualyl fixes SVSI_SELECT to not cause a rename.
[BROWSEUI]
- ExplorerMessageLoop: Implement the /select parameter for explorer.
Modified:
trunk/reactos/dll/win32/browseui/desktopipc.cpp
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/browseui/desktopipc.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/desktop…
==============================================================================
--- trunk/reactos/dll/win32/browseui/desktopipc.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/desktopipc.cpp [iso-8859-1] Sun Nov 6 20:47:21 2016
@@ -357,13 +357,39 @@
if (parameters && parameters->offsetF8)
parameters->offsetF8->AddRef();
+ /* Handle /e parameter */
UINT wFlags = 0;
if ((parameters->dwFlags & SH_EXPLORER_CMDLINE_FLAG_E))
wFlags |= SBSP_EXPLOREMODE;
+ /* Handle /select parameter */
+ PUITEMID_CHILD pidlSelect = NULL;
+ if ((parameters->dwFlags & SH_EXPLORER_CMDLINE_FLAG_SELECT) &&
+ (ILGetNext(parameters->directoryPIDL) != NULL))
+ {
+ pidlSelect = ILClone(ILFindLastID(parameters->directoryPIDL));
+ ILRemoveLastID(parameters->directoryPIDL);
+ }
+
hResult = CShellBrowser_CreateInstance(parameters->directoryPIDL, wFlags,
IID_PPV_ARG(IBrowserService2, &browser));
if (FAILED_UNEXPECTEDLY(hResult))
return hResult;
+
+ if (pidlSelect != NULL)
+ {
+ CComPtr<IShellBrowser> pisb;
+ hResult = browser->QueryInterface(IID_PPV_ARG(IShellBrowser, &pisb));
+ if (SUCCEEDED(hResult))
+ {
+ CComPtr<IShellView> shellView;
+ hResult = pisb->QueryActiveShellView(&shellView);
+ if (SUCCEEDED(hResult))
+ {
+ shellView->SelectItem(pidlSelect, SVSI_SELECT|SVSI_ENSUREVISIBLE);
+ }
+ }
+ ILFree(pidlSelect);
+ }
while ((Ret = GetMessage(&Msg, NULL, 0, 0)) != 0)
{
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sun Nov 6 20:47:21 2016
@@ -2203,7 +2203,7 @@
lvItem.iItem++;
}
- if(uFlags & SVSI_EDIT)
+ if((uFlags & SVSI_EDIT) == SVSI_EDIT)
m_ListView.EditLabel(i);
return S_OK;