Re: How to create association in application now?



On Fri, 2005-11-25 at 11:15 -0700, paul.wu wrote:
> Many application need add associations to a certain file after it is
> installed. Before Gnome2.8, I can approach it by creating 2 files,
> *.keys and *.mime, in ~/.local/share/mime-info/.
> Now it is an unhappy trip to create an association in GNOME,
> first: I need add a mime-type in mime database by 3 steps,
> http://www.freebsd.org/gnome/docs/faq2.html#q22 ,especially it need
> re-login Gnome to make the changes take effect.
> second: I create an association to this mime-type.It seems need to
> modify several
> files,~/.local/share/applications/defaults.list,~/.local/share/applications/[application_name].desktop,~/.local/share/applications/mimeinfo.cache.
> Are there any other methods to do it?
> Does GNOME will support it in future? (I found some Api supported
> application-registry have been
> deprecated.http://developer.gnome.org/doc/API/2.0/gnome-vfs-2.0/gnome-vfs-20-gnome-vfs-application-registry.html ) 

There isn't any public API for this atm. Eel has some code to do it, but
you're not supposed to use that (its a nautilus internal lib for all
purposes, and not ABI stable over releases).

The original plan was to test things out in eel and eventually move the
API to some other, platform library when it had been "finished".
However, this has not yet been done. (And I'm not sure the current API
is nice enough to export as-is.)

There should be no need to log out of gnome for mimetype additions to
take affect though.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a time-tossed one-eyed hairdresser with nothing left to lose. She's a 
pregnant red-headed socialite who inherited a spooky stately manor from her 
late maiden aunt. They fight crime! 




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