OK, maybe this is a good time to talk about some of that "dialog posing" 
stuff, then.

Daniel Matejka wrote:

>> In an embeded mozilla browser,
>> is there a way I can replace the default action which takes place
>> when no registered content handlers are available ?
> 
> At the moment, the unknown content type handler is a component, which
> you could replace with your own implementation. I'll propose something
> better in a moment, but conceptually you could just copy the whole
> component and change the three points where it brings up a dialog to do
> what you want. It's been done. We're not planning to ship with this
> requirement, though.
> 
> The plan for Mozilla 0.9 is to break out that component's dialog-posing
> code into a new interface (actually, for this component, I believe we
> just need to add three new methods to its extant UI-posing interface,
> nsIHelperAppLauncherDialog.idl) and alter the internal code to use the
> interface, rather than posing the dialogs directly. This needs to happen
> to the ucth component and several others.
 >

> An embedding application (or a Mozilla installation with unique UI
> requirements) wanting to override that UI would still need to write its
> own component, but now it need only implement the
> nsIHelperAppLauncherDialog interface (requirements documentation is
> going to be kind of important and no doubt done last), and register its
> version of that interface with the component manager at startup, to
> override the default implementation.

I *think* that it already works this way. As I replied in another post, you can
implement the nsIHelperAppLauncherDialog interface and thereby block or replace the 
dialog.

Maybe there's more to this "dialog posing" thing?  What are the "three 
methods" that need to be added?  Do these replace to the business about 
being able to control the display so that it uses one's choice of the 
default implementation, an alternative, or none (the "Preferential 
Dialog Overriding")?

 
> This is described in a little more detail at
> http://www.mozilla.org/xpfe/embedding-dialogs.html#posedialog , though
> there's nothing like sample code there.


Reply via email to