GNOME Bugzilla – Bug 750275
application mode opens url using text/html handler instead of x-scheme-handler
Last modified: 2015-10-07 13:20:18 UTC
Hi, if, in Nautilus, i change the association of ".html" files to another application (say gedit) epiphany 3.16 in application mode opens gedit when i click on a link. That means it's using the text/html mime type to find which app should open the link. Instead, epiphany should use the x-scheme-handler/http (or https, ftp, and so on) mime type.
Proposing a patch, since nautilus 3.18 makes it harder to open a file using an alternate application. --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -830,7 +830,7 @@ gdk_app_launch_context_set_timestamp (context, timestamp); /* We assume the default application that supports HTML and URIs is the default browser */ - appinfo = g_app_info_get_default_for_type ("text/html", TRUE); + appinfo = g_app_info_get_default_for_type ("x-scheme-handler/http", TRUE); uris.data = (gpointer)uri; uris.next = uris.prev = NULL;
Thanks for your patch. It seems harmless. Please remove that comment as well, since it's no longer accurate after your change. I encourage you to follow the steps at https://wiki.gnome.org/Newcomers/SubmittingPatches to submit your patch formally, so you get your name in the commit history and to ensure it doesn't get lost in this bug. But I can commit it for you if you prefer.
Will do that in a moment. Who knows, i might submit more patches eventually.
Created attachment 312800 [details] git formatted patch with comment removed
Created attachment 312801 [details] [review] git formatted patch with comment removed and link to bugzilla