mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 12:39:35 +00:00
Merge 6b11778a36
into c5325f5016
This commit is contained in:
commit
fe3cb5cb28
1 changed files with 23 additions and 3 deletions
|
@ -340,6 +340,7 @@ public:
|
|||
BOOL IsBandLoaded(const CLSID clsidBand, bool vertical, DWORD *pdwBandID);
|
||||
HRESULT ShowBand(const CLSID &classID, bool vertical);
|
||||
HRESULT NavigateToParent();
|
||||
HRESULT GoBackOrForward();
|
||||
HRESULT DoFolderOptions();
|
||||
HRESULT ApplyBrowserDefaultFolderSettings(IShellView *pvs);
|
||||
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
@ -1405,6 +1406,26 @@ HRESULT CShellBrowser::NavigateToParent()
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CShellBrowser::GoBackOrForward()
|
||||
{
|
||||
CComPtr<ITravelLog> travelLog;
|
||||
HRESULT hResult = GetTravelLog(&travelLog);
|
||||
if (FAILED_UNEXPECTEDLY(hResult))
|
||||
return hResult;
|
||||
|
||||
CComPtr<ITravelEntry> backEntry;
|
||||
hResult = travelLog->GetTravelEntry(static_cast<IDropTarget*>(this), TLOG_BACK, &backEntry);
|
||||
if (SUCCEEDED(hResult) && backEntry)
|
||||
return travelLog->Travel(static_cast<IDropTarget *>(this), TLOG_BACK);
|
||||
|
||||
CComPtr<ITravelEntry> forwardEntry;
|
||||
hResult = travelLog->GetTravelEntry(static_cast<IDropTarget*>(this), TLOG_FORE, &forwardEntry);
|
||||
if (SUCCEEDED(hResult) && forwardEntry)
|
||||
return travelLog->Travel(static_cast<IDropTarget *>(this), TLOG_FORE);
|
||||
|
||||
return hResult;
|
||||
}
|
||||
|
||||
BOOL CALLBACK AddFolderOptionsPage(HPROPSHEETPAGE thePage, LPARAM lParam)
|
||||
{
|
||||
PROPSHEETHEADER* sheetInfo = reinterpret_cast<PROPSHEETHEADER*>(lParam);
|
||||
|
@ -3865,10 +3886,9 @@ LRESULT CShellBrowser::OnGoHome(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &
|
|||
|
||||
LRESULT CShellBrowser::OnBackspace(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
|
||||
{
|
||||
// FIXME: This does not appear to be what windows does.
|
||||
HRESULT hResult = NavigateToParent();
|
||||
HRESULT hResult = LOBYTE(GetVersion()) >= 6 ? GoBackOrForward() : NavigateToParent();
|
||||
if (FAILED(hResult))
|
||||
TRACE("NavigateToParent failed with hResult=%08lx\n", hResult);
|
||||
TRACE("Backspace navigation failed with hResult=%08lx\n", hResult);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue