GNOME Bugzilla – Bug 642797
g_app_info_get_default_for_type() broken for subtypes
Last modified: 2011-02-20 15:07:12 UTC
Here's my mimeapps.list (well, the relevant part): [Added Associations] text/x-patch=gvim.desktop; text/plain=gvim.desktop; [Default Applications] application/xml=gvim.desktop text/plain=gvim.desktop Now, if I double-click an opendocument file, it will open in vim instead of libreoffice. That's obviously wrong. I believe this got introduced in 678bcad92c2a6350cd5dbf4ea3a567d99cf4c29d. Here's a patch to fix this.
Created attachment 181387 [details] [review] appinfo: Do not override system default handler with less specific one We were considering explicitly configured defaults for parent types after we already got results for the specific type we're interested in. This resulted in the explicit default for text/plain to override all system defaults for subtypes of text/plain, for example. The explicit default should not apply to subtypes that have a system default.
Makes sense to me; if the mime system had a spec somewhere, this should be documented...
Review of attachment 181387 [details] [review]: ::: gio/gdesktopappinfo.c @@ +3061,3 @@ + /* Pick the explicit default application if we got no result earlier + * (ie, for more specific mime types) */ Pet peeve of mine: for multiline comments, move the closing */ to the beginning of the next line to line up the stars...
I guess I should ask cosimo to write up a description of the defaults.list / mimeapps.list system we are using...
Pushed with the fix for the comment.