mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[BROWSEUI] Make the view->go to menu items reflect the toolbar buttons status. By Barrett Karish with some slight changes by me. CORE-9800
svn path=/trunk/; revision=68204
This commit is contained in:
parent
cf07db224f
commit
1c1e79e557
1 changed files with 30 additions and 0 deletions
|
@ -1520,6 +1520,7 @@ HRESULT CShellBrowser::UpdateUpState()
|
||||||
void CShellBrowser::UpdateGotoMenu(HMENU theMenu)
|
void CShellBrowser::UpdateGotoMenu(HMENU theMenu)
|
||||||
{
|
{
|
||||||
CComPtr<ITravelLog> travelLog;
|
CComPtr<ITravelLog> travelLog;
|
||||||
|
CComPtr<ITravelEntry> unusedEntry;
|
||||||
int position;
|
int position;
|
||||||
MENUITEMINFO menuItemInfo;
|
MENUITEMINFO menuItemInfo;
|
||||||
HRESULT hResult;
|
HRESULT hResult;
|
||||||
|
@ -1530,6 +1531,35 @@ void CShellBrowser::UpdateGotoMenu(HMENU theMenu)
|
||||||
hResult = GetTravelLog(&travelLog);
|
hResult = GetTravelLog(&travelLog);
|
||||||
if (FAILED_UNEXPECTEDLY(hResult))
|
if (FAILED_UNEXPECTEDLY(hResult))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
hResult = travelLog->GetTravelEntry(static_cast<IDropTarget *>(this),
|
||||||
|
TLOG_BACK,
|
||||||
|
&unusedEntry);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hResult))
|
||||||
|
{
|
||||||
|
SHEnableMenuItem(theMenu, IDM_GOTO_BACK, TRUE);
|
||||||
|
unusedEntry.Release();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SHEnableMenuItem(theMenu, IDM_GOTO_BACK, FALSE);
|
||||||
|
|
||||||
|
hResult = travelLog->GetTravelEntry(static_cast<IDropTarget *>(this),
|
||||||
|
TLOG_FORE,
|
||||||
|
&unusedEntry);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hResult))
|
||||||
|
{
|
||||||
|
SHEnableMenuItem(theMenu, IDM_GOTO_FORWARD, TRUE);
|
||||||
|
unusedEntry.Release();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SHEnableMenuItem(theMenu, IDM_GOTO_FORWARD, FALSE);
|
||||||
|
|
||||||
|
SHEnableMenuItem(theMenu,
|
||||||
|
IDM_GOTO_UPONELEVEL,
|
||||||
|
!_ILIsDesktop(fCurrentDirectoryPIDL));
|
||||||
|
|
||||||
hResult = travelLog->InsertMenuEntries(static_cast<IDropTarget *>(this), theMenu, position,
|
hResult = travelLog->InsertMenuEntries(static_cast<IDropTarget *>(this), theMenu, position,
|
||||||
IDM_GOTO_TRAVEL_FIRSTTARGET, IDM_GOTO_TRAVEL_LASTTARGET, TLMENUF_BACKANDFORTH | TLMENUF_CHECKCURRENT);
|
IDM_GOTO_TRAVEL_FIRSTTARGET, IDM_GOTO_TRAVEL_LASTTARGET, TLMENUF_BACKANDFORTH | TLMENUF_CHECKCURRENT);
|
||||||
if (SUCCEEDED(hResult))
|
if (SUCCEEDED(hResult))
|
||||||
|
|
Loading…
Reference in a new issue