core icon indicating copy to clipboard operation
core copied to clipboard

Add preference to Make Midori the default browser

Open kalikiana opened this issue 6 years ago • 1 comments

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).

kalikiana avatar Oct 14 '18 18:10 kalikiana

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]);
}

kalikiana avatar Feb 06 '19 21:02 kalikiana