howto alias a mimetype

Koos Vriezen koos.vriezen at xs4all.nl
Thu Oct 28 18:07:34 BST 2004


On Thu, Oct 28, 2004 at 06:41:03PM +0200, David Faure wrote:
> On Thursday 28 October 2004 18:34, Koos Vriezen wrote:
> > On Thu, Oct 28, 2004 at 04:19:30PM +0200, Stephan Kulow wrote:
> > > Am Thursday 28 October 2004 13:35 schrieb Koos Vriezen:
> > > 
> > > > Yes or no would be sufficient :-) and only if you know it, trial and
> > > > error can I do myself but I wouldn't trust it then.
> > > Do the same as we did with application/xml - add a desktop file with
> > > X-Is-Also=application/java and then use KService instead of string
> > > compare. You don't need to change the Mimetype line then.
> > 
> > Sounds promising, but I can't find what you mean.
> >  grep -r 'application/xml' $KDEDIR/share/
> Update kdelibs first :)

Ah, why didn't I think of that :-)

> >  grep -ir x-is-also $KDEDIR/share/
> > come with nothing :-(. More clues? ie where/when was it added? 
> > 
> > OT, anyone that has a tip how to use google with words like x-is-also?
> 
> It's X-KDE-IsAlso, and here's an example:
> 
> [Desktop Entry]
> Encoding=UTF-8
> Comment=XML Document
> Icon=html
> Type=MimeType
> MimeType=application/xml
> # This mimetype is an alias for text/xml.
> X-KDE-IsAlso=text/xml

Great info (what was the keyword again to mark this as such).
Anyway, I do then

[Desktop Entry]
Encoding=UTF-8
Type=MimeType
MimeType=application/java
Icon=source_java
Comment=Java Class
X-KDE-IsAlso=application/x-java

and add application/x-java to kjavaappletviewer.desktop file (makes more
sense than aliasing it to application/x-java-applet)

Koos
> 
> -- 
> David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
> Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list