Hi Piotr,
Piotr Caban wrote:
> ---
> dlls/mshtml/mshtml_private.h | 1 +
> dlls/mshtml/nsevents.c | 25 ++++++-----
> dlls/mshtml/persist.c | 84 +++++++++++++++++++++++++++++-------
> dlls/mshtml/tests/htmldoc.c | 95
> ++++++++++++++++++++++++++++++++++++++++--
> 4 files changed, 173 insertions(+), 32 deletions(-)
hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
if(SUCCEEDED(hres)) {
- VARIANT state, progress;
-
- V_VT(&progress) = VT_I4;
- V_I4(&progress) = 0;
- IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER,
- &progress, NULL);
-
- V_VT(&state) = VT_I4;
- V_I4(&state) = 0;
- IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE, OLECMDEXECOPT_DONTPROMPTUSER,
- &state, NULL);
+ if(doc->download_state) {
+ VARIANT state, progress;
+
+ V_VT(&progress) = VT_I4;
+ V_I4(&progress) = 0;
+ IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS,
+ OLECMDEXECOPT_DONTPROMPTUSER, &progress, NULL);
+
+ V_VT(&state) = VT_I4;
+ V_I4(&state) = 0;
+ IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE,
+ OLECMDEXECOPT_DONTPROMPTUSER, &state, NULL);
+ }
+ doc->download_state = 0;
You should clear download_state if client doesn't implement
IOleCommandTarget interface too.
Thanks,
Jacek