update to new mimeapps.list specification

David Faure faure at kde.org
Tue Apr 15 12:59:42 PDT 2014


On Monday 14 April 2014 10:42:35 Vladimir Kudrya wrote:
> Please clarify this:
> "add to the blacklist the names of any desktop files found in the same
> directory as the mimeapps.list file"

You find foo.desktop (associated with the given mimetype), you add foo.desktop 
to the result list, but then you add foo.desktop to the blacklist too, so that 
you don't add foo.desktop again.

> How "temporary" the blackist is in this algorithm?

Temporary until the end of the algorithm :-)

> If we are dealing with actions (add/remove), then why not to reduce
> complexity of the algoritm and just compose *one* list of associations
> from global to local by taking described actions?
>
> 1. go to the most global dir
> 2. Add from .desktop's
> 3. Add according to mimeapps.list
> 4. Remove according to mimeapps.list
> 5. move to next more local dir
> 6. goto 2

Yes, that should be equivalent, and is the whole point of how added/removed 
works. However, if you only need the first N apps to show in a list, then 
better start from the other side (most-local first).

And if you only need to find the default application, then better start from 
the most-local dir too (since you can stop as soon as you find one that is 
installed).

So overall, it's simpler to only have algorithms that start from most-local, 
than to have both kinds depending on the use case.

But of course you are free to implement it starting from most-global and going 
up. An algorithm in a spec is just a suggestion, and helps understanding, it's 
not the only way to implement it.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list