gcmd-devel
[Top][All Lists]
Advanced

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

Re: [gcmd-dev] mimetype - first steps ?


From: Piotr Eljasiak
Subject: Re: [gcmd-dev] mimetype - first steps ?
Date: Thu, 01 Oct 2009 00:40:53 +0200

> Piotr, can we possible figure out a plan what - realistically - could be done 
> about user configurations in ~/.local/share/applications ?
> 
> The file 'defaults.list' will only work if it contains a section header 
> '[Default Applications]', in other words, only that sections will be 
> recognized by gcmd. Nautilus, OTOH, reads the file mimeapps.list and works 
> with the section 'Added Associations'.
> 
> Since the files syntax is exactly the same (i hope) i hoped it would be 
> possible to just symlink them. However, it's not possible, because the 
> headers are mandatory - each applications seems to read only it's own one. 
> This can be demonstrated by two use cases:
> 
> (1) Put same content in two redundant sections with the given 2 headers: When 
> you use Nautilus to modify an association, the new setting will not get 
> updated for gcmd in the 'Default Applications' section.
> 
> (2) Experimentally cut away any header from either file: With no section 
> header, the file will not be evaluated at all. And worse: If you update a 
> association via Nautilus, it will just delete the whole list, replacing it by 
> a freshly created 'Added Associations' section.
> 
> So, until anything better is in place, it would be wise if gcmd would copy 
> the mimeapps.list file to defaults.list (modifying the header) at some 
> arbitrary occasion.
> 
> However if you would touch that code, then why not just find and replace the 
> (hardcoded?) path to 'defaults.list' and replace it by 'mimeapps.list' (and 
> also replace the headers).
> 
> Then, gcmd could also just launch the nautilus mime-type module in the same 
> way as Nautilus (accessible via Alt+Edit 'Properties' in Nautilus).
> 
> What about Settings -> Mimetypes then ? Magnus once hacked the script 
> 'gnome-file-types-properties' which plugged into that menu, and it should be 
> possible to modify it to work with that gnome module, or alternatively a 
> Python wrapper could come into place.
> 

Agreed, mimetype support for gcmd is requested very often now and
anything will be better than now.

Just after having tabs done, I'll port some code for MIME from previous
versions of Nautilus (2.16 ?). The newer ones uses new gio/gvfs API, so
we can't reuse it for gcmd.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]