Bug 1621913 Don't show the defaultBrowserBox in settings under flatpak; r=settings-reviewers,Gijs
Under Flatpak we cannot determine if the application is set as default handler for http/https protocols and also the application cannot set the system defaults. In order to avoid user confusion we hide the defaultBrowserBox which under flatpak shows always: "Firefox is not your default browser" and the "Make Default..." button does not make any change to the system. Differential Revision: https://phabricator.services.mozilla.com/D170590
This commit is contained in:
@@ -1269,7 +1269,9 @@ var gMainPane = {
|
||||
if (AppConstants.HAVE_SHELL_SERVICE) {
|
||||
let shellSvc = getShellService();
|
||||
let defaultBrowserBox = document.getElementById("defaultBrowserBox");
|
||||
if (!shellSvc) {
|
||||
let isInFlatpak = gGIOService?.isRunningUnderFlatpak;
|
||||
// Flatpak does not support setting nor detection of default browser
|
||||
if (!shellSvc || isInFlatpak) {
|
||||
defaultBrowserBox.hidden = true;
|
||||
return;
|
||||
}
|
||||
@@ -2454,11 +2456,8 @@ var gMainPane = {
|
||||
possibleAppMenuItems.push(menuItem);
|
||||
}
|
||||
// Add gio handlers
|
||||
if (Cc["@mozilla.org/gio-service;1"]) {
|
||||
let gIOSvc = Cc["@mozilla.org/gio-service;1"].getService(
|
||||
Ci.nsIGIOService
|
||||
);
|
||||
var gioApps = gIOSvc.getAppsForURIScheme(handlerInfo.type);
|
||||
if (gGIOService) {
|
||||
var gioApps = gGIOService.getAppsForURIScheme(handlerInfo.type);
|
||||
let possibleHandlers = handlerInfo.possibleApplicationHandlers;
|
||||
for (let handler of gioApps.enumerate(Ci.nsIHandlerApp)) {
|
||||
// OS handler share the same name, it's most likely the same app, skipping...
|
||||
|
||||
Reference in New Issue
Block a user