Author: dquintana
Date: Mon May 19 16:08:30 2014
New Revision: 63371
URL:
http://svn.reactos.org/svn/reactos?rev=63371&view=rev
Log:
[BROWSEUI]
* Implement ParseNow to allow navigating to the current address in the editbox.
[SHELL32]
* Set the focus to the listview if the browser is requesting it.
CORE-7330
Modified:
branches/shell-experiments/dll/win32/browseui/addresseditbox.cpp
branches/shell-experiments/dll/win32/browseui/addresseditbox.h
branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp
branches/shell-experiments/dll/win32/shell32/shlview.cpp
Modified: branches/shell-experiments/dll/win32/browseui/addresseditbox.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/addresseditbox.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/addresseditbox.cpp [iso-8859-1] Mon May
19 16:08:30 2014
@@ -41,7 +41,8 @@
CAddressEditBox::CAddressEditBox() :
fCombobox(NULL, this, 1),
- fEditWindow(NULL, this, 1)
+ fEditWindow(NULL, this, 1),
+ fSite(NULL)
{
}
@@ -69,6 +70,7 @@
{
fCombobox.SubclassWindow(comboboxEx);
fEditWindow.SubclassWindow(editControl);
+ fSite = param18;
return S_OK;
}
@@ -82,7 +84,28 @@
HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
{
- return E_NOTIMPL;
+ WCHAR address[4096];
+ ULONG eaten;
+ LPITEMIDLIST pidl;
+ ULONG attributes;
+ HRESULT hr;
+ HWND topLevelWindow;
+
+ CComPtr<IShellBrowser> pisb;
+ hr = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IShellBrowser,
&pisb));
+
+ IUnknown_GetWindow(pisb, &topLevelWindow);
+
+ GetWindowText(fCombobox.m_hWnd, address, 4095);
+
+ CComPtr<IShellFolder> psfDesktop;
+ hr = SHGetDesktopFolder(&psfDesktop);
+ hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten,
&pidl, &attributes);
+ if (SUCCEEDED(hr))
+ {
+ hr = pisb->BrowseObject(pidl, 0);
+ }
+ return hr;
}
HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute(long paramC)
Modified: branches/shell-experiments/dll/win32/browseui/addresseditbox.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/addresseditbox.h [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/addresseditbox.h [iso-8859-1] Mon May 19
16:08:30 2014
@@ -35,6 +35,7 @@
private:
CContainedWindow fCombobox;
CContainedWindow fEditWindow;
+ CComPtr<IUnknown> fSite;
public:
CAddressEditBox();
~CAddressEditBox();
Modified: branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] Mon May
19 16:08:30 2014
@@ -860,6 +860,8 @@
hResult = menuOleWindow->GetWindow(&fMenuBandWindow);
fMenuBar.Attach(menuBar.Detach()); // transfer the ref count
+ // FIXME: The ros Rebar does not properly support fixed-size items such as the
brandband,
+ // and it will put them in their own row, sized to take up the whole row.
#if 0
/* Create and attach the brand/logo to the rebar */
hResult = CreateBrandBand(&logoBar);
Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Mon May 19
16:08:30 2014
@@ -1419,6 +1419,8 @@
{
MergeFileMenu(mii.hSubMenu);
}
+
+ ::SetFocus(m_hWndList);
}
TRACE("-- before fnSetMenuSB\n");