diff options
author | Allison Ryan Lortie <desrt@desrt.ca> | 2016-04-28 10:05:45 +0200 |
---|---|---|
committer | Allison Ryan Lortie <desrt@desrt.ca> | 2016-04-28 10:05:45 +0200 |
commit | 01c809e1e571bac3fa24b24b8f0cde635cfbcdb9 (patch) | |
tree | af36ec01ece55038e23d8d44f9b5148fbda30183 | |
parent | a27043c14e8e1c1ba90cbd20c72ad8904a0314c4 (diff) |
mime apps: clarify precedence vs. subtypes
Clarify that we always prefer specific subtypes (like text/html) to the
more generic types (like text/plain) when deciding on associations and
default apps.
This avoids some strange cases where applications that operate on
text/plain are being taken in preference to more-specific applications,
just because they are present in 'higher' directories, or explicitly
listed in defaults files.
https://bugs.freedesktop.org/show_bug.cgi?id=89877
-rw-r--r-- | mime-apps/mime-apps-spec.xml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mime-apps/mime-apps-spec.xml b/mime-apps/mime-apps-spec.xml index d61214b..b1cd543 100644 --- a/mime-apps/mime-apps-spec.xml +++ b/mime-apps/mime-apps-spec.xml @@ -96,6 +96,7 @@ mimetype1=foo5.desktop;</programlisting> <listitem><para>add to the blacklist the names of any desktop files found in the same directory as the mimeapps.list file (which for directories based on XDG_CONFIG_HOME and XDG_CONFIG_DIRS, is none)</para></listitem> <listitem><para>repeat the last four steps for each subsequent directory</para></listitem> </itemizedlist> + <para>The above process is repeated for each mimetype from the most specific to the least specific. Note in particular that an application "Added" with a more specific mime type will keep that association, even if it is "Removed" in a higher-precedence directory, using a less specific type.</para> </sect1> <sect1 id="default"> <title>Default Application</title> @@ -117,6 +118,7 @@ mimetype1=default1.desktop;default2.desktop;</programlisting> <listitem><para>if after all list items are handled, we have not yet found a default application, proceed to the next mimeapps.list file in the search order and repeat</para></listitem> <listitem><para>if after all files are handled, we have not yet found a default application, select the most-preferred application (according to associations) that supports the type</para></listitem> </itemizedlist> + <para>The above process is repeated for each mimetype from the most specific to the least specific. Note in particular that an application that can handle a more specific type will be used in preference to an application explicitly marked as the default for a less-specific type.</para> <para>Note that, unlike adding and removing associations, a desktop ID set as the default for an application can refer to a desktop file of the same name found in a directory of higher precedence.</para> <para>Note as well that the default application for a given type must be an application that is associated with the type. This means that implementations should either ensure that such an association exists or add one explicitly when setting an application as the default for a type.</para> </sect1> |