Determining application handlers for given mimetypes

What is the recommended way to get the application (and more specificallycommand) incharge of handling a particular mimetype?

I've had a look at Gnome2::ApplicationRegistry and Gnome2::VFS::ApplicationRegistry->get_applications() seems to be the only method remotely close capable of handling something like this - but it doesn't seem to reflect per-user defaults or the exact command used in launching the file (like in /etc/mailcap). Maybe I am looking at the wrong module for this task but it's the only one that seems to be logically apt for the task.

On furthter investigation on how gnome (or nautilus atleast) sets and uses per-user settings, mimetype to default applications are set in ~/.local/share/applications/defaults.list (falling back on /etc/gnome/defaults.list).

Is there an easier, recommended way from within a Gnome2/Gtk2 Module perhaps to determine the default application handler without having to parse these files and the various .desktop files manually?



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