How to create a new MIME type for a Sugar activity?
Yoshiki Ohshima
yoshiki at vpri.org
Tue Feb 5 19:57:59 EST 2008
Hello,
> 1). The Etoys activity does not try to open the file, at all, ever.
> EToys takes a long time to start up and shut down and it is really
> annoying when I open the file with EToys instead of my own activity.
For for the record, Etoys doesn't take a long time to start up. It
is the fastest activity to start up. The shut down time can be
optimized in a "lossy" way that we might take after all. (And, if you
hold the "stop" button for a second, you get a delayed menu. From
there you can say "quit without save".)
> 2). My Activity *does* open the file.
> 3). The Zip files containing images show up in the Journal with my own
> Activity's icon, which looks like a slide projector.
>
> To accomplish this I have created my Zip files with the extension
> ".slides" and I'd like to be able to use the MIME type
> "application/slides" for such files.
>
> I'm also interested in creating a reader program for Gutenberg etexts.
> I'd like these files to have their own MIME type too so they don't get
> opened by the Write activity by mistake. I was thinking of using a file
> suffix of ".book" and a MIME type of "text/book" for these.
>
> I tried using a mimetypes.xml file in the bundle but that didn't work.
> I couldn't find an example of an Activity that used such a file so I'm
> not certain I'm doing it correctly.
>
> I'd appreciate any information on MIME types or on alternative
> approaches that would solve problems 1-3. Thanks much,
Etoys is probably the good example^^;
Looking into the "tree" for Etoys
(http://dev.laptop.org/git?p=projects/etoys;a=summary), etoys.xml
which will be installed to /usr/share/mime/packages by Makefile(.in)
and activity.info(.in) that lists the accepted types.
Of course, if you write your slide show in Etoys, that would be a lot
faster (and easier for some people)...
Hope this helps,
-- Yoshiki
More information about the Devel
mailing list