Have a way to dynamically change software associations at distribution level
Didier Roche
didrocks at ubuntu.com
Thu Aug 27 07:59:47 PDT 2009
2009/8/27 Stanislav Brabec <sbrabec at suse.cz>:
> Didier Roche wrote:
>
>> >> > About a better name than DesignedFor... UseByDefaultIn?
>> >>
>> >> or SuitedIn?
>> >
>> > SuitedFor seems like the more "correct" form of that, but I think
>> > UseByDefaultIn is better. Its less jugemental and talks only about what
>> > the effect of this is.
>
> Thinking about it a bit deeper, SuitedFor alone is not capable to cover
> all use cases.
>
> Example from real life:
>
> evince.desktop:
> SuitedFor=GNOME
> MimeTypes=...;image/tiff;...
>
> eog.desktop:
> SuitedFor=GNOME
> MimeTypes=...;image/tiff;...
>
> With the SuitedFor alone, you have no chance to improve the default
> application heuristic.
Exactly, but you still have the priorities (see the spec proposal in
previous mail) with InitialPreference and also priorities by MimeTypes
that make it launch the right application by default.
>
> That is why a keyword like DesignedForMimeTypes or SuitedForMimeTypes
> (with its possible negative form) in addition to SuitedFor would be able
> to create better heuristic:
>
> "Yes, evince is an application suited for GNOME desktop that is capable
> to open TIFF images, but it should not be a default for TIFF images."
>
> evince.desktop:
> SuitedFor=GNOME
> NotSuitedForMimeTypes=image/tiff;
> MimeTypes=...;image/tiff;...
>
> Another example:
>
> "GEdit is a good GNOME default for text/plain, but C sources should be
> edited in a dedicated program."
>
> gedit.desktop:
> SuitedFor=GNOME
> SuitedForMimeTypes=text/plain;
> MimeTypes=...;text/plain;text/x-csrc;...
Cf my previous remark which fix the case without adding a "SuitedForMimeTypes".
Concerning your proposal, the drawback is that defaults.list (if I
don't say anything wrong) is not implemented everywhere and we don't
wait to force it. Also, there is a backward compatibility as
defaults.list will still have a higher priority than the new
heuristic. So, we keep distribution which don't want to migrate to a
new behavior.
Didier
More information about the xdg
mailing list