app info: tweak default application algorithm
authorRyan Lortie <desrt@desrt.ca>
Thu, 2 Apr 2015 21:17:35 +0000 (17:17 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 22 Apr 2015 09:52:10 +0000 (10:52 +0100)
commit2bb898c60f43330f8bdf277e1931228031fe49b4
tree3e9ebad370c2921d468b87c9e8a0b71c3981badd
parentcf940b66bcea7835c2e01b9bfa051a2e826835c9
app info: tweak default application algorithm

Always run the full algorithm for a given mime type before considering
fallback types.

This includes considering installed applications capable of handling a
particular mimetype, even if such an app is not explicitly marked as
default, and there is a default app for a less-specific type.

Specifically, this often helps with cases of installing apps that can
handle a particular subtype of text/plain.  We want to take those apps
in preference to a generic text editor, even if that editor is listed as
the default for text/plain and there is no default listed for the more
specific type.

Because of the more holistic approach taken by the algorithm, it is now
more complicated, but it also means that we can do more work while
holding the lock.  In turn, that lets us avoid duplicating some strings,
which is nice.

https://bugzilla.gnome.org/show_bug.cgi?id=744282
gio/gdesktopappinfo.c