Comment 8 for bug 1551171

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

> As for finding the default app, wouldn't that be xdg-mime query default

xdg-mime postdates the creation of this code. Bug 296443 covers using it.

Again, we're not actually using mimeinfo.cache ourselves. It's your GNOME configuration that's using it.

> Besides, before upgrading from 9 to 10 I didn't have a problem with this behavior

That's quite odd. I don't think this code changed from 9 to 10. Would you be willing to use nightly builds to find when the behavior changed for you?

> 2. use the GNOME application order in the correct way (not via the cache file)

Again, we are not doing anything with the cache file ourselves. We're just calling the official "get the app for a MIME type" GNOME APIs. First g_app_info_get_default_for_type and then if GIO is not around gnome_vfs_mime_get_default_application. You can see the code for yourself right here:

  http://mxr.mozilla.org/mozilla-central/source/toolkit/system/gnome/nsGnomeVFSService.cpp#204
  http://mxr.mozilla.org/mozilla-central/source/toolkit/system/gnome/nsGIOService.cpp#352
  http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/unix/nsGNOMERegistry.cpp#172

I'd like to focus on figuring out why there was a behavior change from 9 to 10 on Dutch Kind's machine here, though. _Something_ weird is going on there.