[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gcmd-dev] mimetype - first steps ?
From: |
Michael |
Subject: |
[gcmd-dev] mimetype - first steps ? |
Date: |
Wed, 30 Sep 2009 11:05:45 +0200 |
User-agent: |
claws-mail.org |
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.
- [gcmd-dev] mimetype - first steps ?,
Michael <=