[BROWSEUI] Implement toggling the folders and search band with the toolbar and make their buttons appear pressed when they are shown.

CBaseBarSite: Ask the CBaseBar to close itself when the x button is pressed.
CBaseBar: Hide the bar and inform its site that it is closing when it gets the close command.
CShellBrowser: Cache the guid of the current vertical bar and use it to report correct command status to the toolbar.
Also implement toggling the Folders, Favorites, History and search commands.
CInternetToolbar: Query the Folders and Search command status from the site so that they can be properly be shown as pressed.
This commit is contained in:
Giannis Adamopoulos
2018-10-27 11:52:04 +03:00
parent 84ae36c78d
commit a0c5cafce5
5 changed files with 103 additions and 14 deletions

View File

@@ -692,17 +692,10 @@ LRESULT CBaseBarSite::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bH
LRESULT CBaseBarSite::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
HRESULT hResult;
CComPtr<IDockingWindow> parentSite;
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDM_BASEBAR_CLOSE)
{
hResult = fDeskBarSite->QueryInterface(IID_PPV_ARG(IDockingWindow, &parentSite));
if (!SUCCEEDED(hResult))
{
return E_FAIL;
}
parentSite->ShowDW(FALSE);
/* Tell the base bar to hide */
IUnknown_Exec(fDeskBarSite, IID_IDeskBarClient, 0, 0, NULL, NULL);
bHandled = TRUE;
}
return 0;