Menu

#5 ShellView Contextmenu Open

open
nobody
None
5
2010-12-19
2010-12-19
No

There is a bug in the context menu when you use the open to try and navigate to a folder, it is assuming absolute paths and failing due to using desktop instead of current folder, i fixed it by changing ShellBrowser.cs:
HResult IShellBrowser.BrowseObject(IntPtr pidl, SBSP wFlags)
{
IntPtr result = IntPtr.Zero;

if ((wFlags & SBSP.SBSP_RELATIVE) != 0)
{
ShellItem child = new ShellItem(m_ShellView.CurrentFolder, pidl);
}
else if ((wFlags & SBSP.SBSP_PARENT) != 0)
{
m_ShellView.NavigateParent();
}
else if ((wFlags & SBSP.SBSP_NAVIGATEBACK) != 0)
{
m_ShellView.NavigateBack();
}
else if ((wFlags & SBSP.SBSP_NAVIGATEFORWARD) != 0)
{
m_ShellView.NavigateForward();
}
else if ((wFlags & SBSP.SBSP_ABSOLUTE) != 0)
{
m_ShellView.Navigate(new ShellItem(ShellItem.Desktop, pidl));
}
else
{
m_ShellView.Navigate(new ShellItem(m_ShellView.CurrentFolder, pidl));
}
return HResult.S_OK;
}

i added a check for absoulte, and made the default current folder, it fixed it but it may not be the proper way

Discussion


Log in to post a comment.