Commit c4c96383 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

explorer: Set the window title to the current directory.

parent 9e339992
......@@ -259,10 +259,32 @@ static void update_path_box(explorer_info *info)
static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnNavigationComplete(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidl)
{
IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface);
IShellFolder *parent;
PCUITEMID_CHILD child_pidl;
HRESULT hres;
STRRET strret;
WCHAR *name;
ILFree(This->info->pidl);
This->info->pidl = ILClone(pidl);
update_path_box(This->info);
return S_OK;
hres = SHBindToParent(pidl, &IID_IShellFolder, (void **)&parent, &child_pidl);
if (SUCCEEDED(hres))
{
hres = IShellFolder_GetDisplayNameOf(parent, child_pidl, SHGDN_FORADDRESSBAR, &strret);
if (SUCCEEDED(hres))
hres = StrRetToStrW(&strret, child_pidl, &name);
if (SUCCEEDED(hres))
{
SetWindowTextW(This->info->main_window, name);
CoTaskMemFree(name);
}
IShellFolder_Release(parent);
}
return hres;
}
static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnNavigationFailed(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment