Re: handling of mime-types

> I am writing an application which interprets some mime types.  I want to
> use the default and user-defined mime-types and handlers found in the
> gnome control center.  I am confused as to the layout of files in the
> ...share/mime-info and ~/.gnome/mime-info directories.  Should I be
> checking all of the .mime and .keys files (I plan on identifying and
> handling them)?  Why does mc.keys define handlers for types it does not
> "own"?  It seems that they should be in gnome.keys and used by gmc instead
> of split between gnome.mime and mc.keys.

mc.keys is there mostly for historical reasons.  The gnome-libs mime-handling
stuff will parse anything with a ".keys" extension, so you shouldn't need to
worry much about it.  You shouldn't be looking at the .mime and .keys files
at all, either -- gnome-mime (and gnome-mime-info) handles all that for you.

> What is the most correct and portable way to find the directories I should
> be searching in?

If you are really interested in doing your own parsing, there's a doc 
(gnome-libs/devel-docs/mime-type-handling.txt) that explains a lot.  However,
I'd stick to gnome-mime.h and gnome-mime-info.h if possible.


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