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:53:27 +0000 (10:53 +0100)
commit16c8a34aa2707366287424131db9dc51362095bb
treec900216473ab7ab36f6a9ce51dccc078efe59a91
parentc2c67fc91cfb6add00fee354c3a15b54d4ecc813
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