core
core copied to clipboard
Add preference to Make Midori the default browser
There should be an easily discoverable option to make Midori the default web browser.
And, too, it'd be nice to show an infobar suggesting to do this automatically if Midori isn't already the default (which could be closed and won't show again).
Some pointers to how that could be done:
public const string[] CONTENT_TYPES = {
"text/html",
"application/x-extension-htm",
"application/x-extension-html",
"application/x-extension-shtml",
"application/xhtml+xml",
"application/x-extension-xht",
"x-scheme-handler/http",
"x-scheme-handler/https"
};
var default = AppInfo.get_default_for_type ("x-scheme-handler/http", false);
var info = new DesktopAppInfo (Application.get_default ().application_id + ".desktop");
for (int i = 0; i < CONTENT_TYPES.length; i++) {
app_info.set_as_default_for_type (CONTENT_TYPES[i]);
}