moz-bonobo-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [moz-bonobo-list] a new mozbonobo plugin


From: Christian Glodt
Subject: Re: [moz-bonobo-list] a new mozbonobo plugin
Date: Thu, 31 Jul 2003 22:34:37 +0100

On 31 Jul 2003 22:19:05 +0200, Luca Padovani wrote
> Hi Christian,
> 
> thanks for the quick answer
> 
> On Thu, 2003-07-31 at 21:07, Christian Glodt wrote:
> > There's a few catches though... Mozilla caches the information about
> > which plugin supports which mime type pretty aggressively.
> 
> I've deleted the pluginreg.dat file and now the MathML mime type 
> shows up in the list!

Good

> >  It will
> > also only work if the MathML content is included in a web page
> > using an <object> or an <embed> tag.
> 
> OK, I've set the MIME type attribute to application/mathml+xml, the same
> that is listed in the .server file

ok, that's fine - problem is though that the current release those
not honor the mime type attribute. CVS Head version does.

> >  The web server also has to know
> > about the MathML mime type...
> 
> does this mean that I won't be able to load resources from my harddisk?
> I've just tried and mozilla says:
> 
> "Couldn't load viewer for content of type "text/plain".

The situation is kind of complicated. It would be great if you could
try the latest CVS version of mozilla-bonobo. Its only problem is
that it leaves viewer processes running even after you stopped using
the plugin - that's also why it's not released yet.

The current release does this to load a component to view a file:

- The browser downloads the file into its cache, and mangles its
  file name in the process. Thus, xyz.mml becomes a file named
  something like ~/.mozilla/cache/GsjhgdSJhs.
- mozilla-bonobo tries to load a component that can display the
  ~/.mozilla/cache/GsjhgdSJhs file. Inside Bonobo, the following
  happens then:
  - Gnome-vfs is queried for the mime type of the file. Ofcourse,
    it has no idea about the mime type, because a) the extension
    is lost, and b) it's an XML file, so it could be anything.
    Not knowing any better, gnome-vfs says it's text/plain.
  - From there on it goes further downhill - no component can be
    loaded for some reason, etc...

So in the end there's a lot of confusion, and even the error message
is not correct as it displays the mime type that gnome-vfs thinks is
correct.

Well, how does the CVS version differ from that? It's a bit cleverer,
as it does the following:

- It picks up the mime type from the browser.
- It makes a bonobo-activation query ("find me a component that can
  display the application/foo mime type") to find a component.
- It feeds the data directly to the component using PersistFile or
  PersistStream.

This approach has a much higher success rate.
 
> A test container application is able to use my bonobo component, so I
> assume the problem is not there. Do I have to list text/plain in the
> .server file as well? Do I have to register the .mml suffix 
> somewhere in order for it to be associated with my component? [I 
> noticed from mozilla-bonobo-viewer.c that the only string that is 
> used to instantiate the proper control is the filename.] Did I miss 
> anything else? Sorry if these questions sound silly, I'm still a bit 
> confused about all this bonobo stuff ;-)

So am I sometimes :)
 
> > You're welcome, and in fact, thanks for your interest!
> 
> the mozilla-bonobo plugin is indeed pretty cool. I'd like to see the
> MathML plugin up and running so that I'd be able to make some comparison
> with mozilla's native MathML support.
> 
> Thanks for any help you can give,
> -- luca

As I said, it would be worth trying the CVS version. It should at least
honor the "type" attribute of the <object> tag.

Cheers,

Christian Glodt






reply via email to

[Prev in Thread] Current Thread [Next in Thread]