Sorted Re: How to avoid nsProgressDialog appearing with nsIDownload

Geraint Edwards <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpcom
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
The answer was to use nsIProgressDialog with no dialog set as opposed to 
nsIDownload :-).

Geraint Edwards wrote:
> I am writing an xul/xpcom application (under Moz 1.0 API) that requires 
> the download and saving of documents/images to be subsequently accessed 
> via a local RDF file/xul template.  A 'reference library' of sorts.
> 
> It all works very nicely apart from one stumbling block.  During the 
> save process, using nsIDownload and nsIWebBrowserPersist, I give the 
> file a unique name and succeed in saving it but I cannot intercept the 
> appearance of the "download complete" nsProgressDialog :-(.
> 
> I have set the nsIWebBrowserPersist progressListener and nsIDownload 
> listener and am being informed, before the nsProgressDialog dialog 
> appears, that the download is complete (via onstatechange) but can't 
> figure out how to stop the dialog appearing.
> 
> Any suggestions would be very welcome.  My one thought is to set an 
> observer on nsIDownload but I am not sure what event to observe and 
> whether I could prevent bubbling/propogation of this event.
> 
> Geraint Edwards
> 



-- 

Vizimarks - the Internet Scrapbook!
Visual Bookmarks, Online Favorites, and an Online Scrapbook.
Visit  http://www.vizimarks.com  today.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.