Jacek Caban wrote: > I've attached a hack from Picasa tree that > causes links opening in new window to be opened in winebrowser.
I forgot to attach the patch. Here it is. Jacek
diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index 161c138..bdd0fdb 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -612,6 +612,32 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, return navigate(This, mon, bindctx); } +static HRESULT open_in_new_window(IMoniker *mon) +{ + SHELLEXECUTEINFOW exec_info; + LPWSTR url; + HRESULT hres; + + static const WCHAR wszHtmlFile[] = {'.','h','t','m','l',0}; + + hres = IMoniker_GetDisplayName(mon, NULL, NULL, &url); + if(FAILED(hres)) + return hres; + + memset(&exec_info, 0, sizeof(exec_info)); + exec_info.cbSize = sizeof(exec_info); + exec_info.fMask = SEE_MASK_CLASSNAME; + exec_info.lpFile = url; + exec_info.nShow = SW_SHOW; + exec_info.lpClass = wszHtmlFile; + + ShellExecuteExW(&exec_info); + + CoTaskMemFree(url); + + return S_OK; +} + #define HLINKFRAME_THIS(iface) DEFINE_THIS(WebBrowser, HlinkFrame, iface) static HRESULT WINAPI HlinkFrame_QueryInterface(IHlinkFrame *iface, REFIID riid, void **ppv) @@ -673,7 +699,7 @@ static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPB if(grfHLNF & HLNF_OPENINNEWWINDOW) { FIXME("Not supported HLNF_OPENINNEWWINDOW\n"); - return E_NOTIMPL; + return open_in_new_window(mon); } return navigate_hlink(&This->doc_host, mon, pbc, pibsc);