From 84eed025f076e3da58075eb7cfd6a4c37131c107 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 14 Jan 2008 16:26:47 +0100 Subject: [PATCH] shdocvw: Call StatusTextChange in set_status_text. --- dlls/shdocvw/navigate.c | 13 +++++++++++-- dlls/shdocvw/tests/webbrowser.c | 6 ++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index 71c3ea597a4..ad9fc0b21fd 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -94,10 +94,19 @@ static void dump_BINDINFO(BINDINFO *bi) static void set_status_text(BindStatusCallback *This, LPCWSTR str) { - if(!This->doc_host || !This->doc_host->frame) + VARIANTARG arg; + DISPPARAMS dispparams = {&arg, NULL, 1, 0}; + + if(!This->doc_host) return; - IOleInPlaceFrame_SetStatusText(This->doc_host->frame, str); + V_VT(&arg) = VT_BSTR; + V_BSTR(&arg) = str ? SysAllocString(str) : NULL; + call_sink(This->doc_host->cps.wbe2, DISPID_STATUSTEXTCHANGE, &dispparams); + VariantClear(&arg); + + if(This->doc_host->frame) + IOleInPlaceFrame_SetStatusText(This->doc_host->frame, str); } #define BINDSC_THIS(iface) DEFINE_THIS(BindStatusCallback, BindStatusCallback, iface) diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 0929f03f12c..80c09f297e1 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -513,7 +513,9 @@ static HRESULT WINAPI WebBrowserEvents2_Invoke(IDispatch *iface, DISPID dispIdMe ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); ok(pDispParams->cArgs == 1, "cArgs=%d, expected 1\n", pDispParams->cArgs); - /* TODO: Check args */ + ok(V_VT(pDispParams->rgvarg) == VT_BSTR, "V_VT(pDispParams->rgvarg)=%d, expected VT_BSTR\n", + V_VT(pDispParams->rgvarg)); + /* TODO: Check text */ break; case DISPID_PROPERTYCHANGE: @@ -1878,7 +1880,7 @@ static void test_Navigate2(IUnknown *unk) todo_wine CHECK_CALLED(Invoke_DOWNLOADBEGIN); todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); CHECK_CALLED(EnableModeless_FALSE); - todo_wine CHECK_CALLED(Invoke_STATUSTEXTCHANGE); + CHECK_CALLED(Invoke_STATUSTEXTCHANGE); CHECK_CALLED(SetStatusText); CHECK_CALLED(GetHostInfo); CHECK_CALLED(Invoke_AMBIENT_DLCONTROL);