From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../suite/components/pref/content/pref-advanced.js | 90 ++ .../components/pref/content/pref-advanced.xul | 174 +++ .../components/pref/content/pref-appearance.js | 102 ++ .../components/pref/content/pref-appearance.xul | 103 ++ .../pref/content/pref-applicationManager.js | 100 ++ .../pref/content/pref-applicationManager.xul | 56 + .../components/pref/content/pref-applications.js | 1606 ++++++++++++++++++++ .../components/pref/content/pref-applications.xul | 113 ++ comm/suite/components/pref/content/pref-cache.js | 113 ++ comm/suite/components/pref/content/pref-cache.xul | 142 ++ comm/suite/components/pref/content/pref-colors.js | 26 + comm/suite/components/pref/content/pref-colors.xul | 131 ++ comm/suite/components/pref/content/pref-content.js | 141 ++ .../suite/components/pref/content/pref-content.xul | 131 ++ comm/suite/components/pref/content/pref-cookies.js | 34 + .../suite/components/pref/content/pref-cookies.xul | 89 ++ .../components/pref/content/pref-debugging.js | 15 + .../components/pref/content/pref-debugging.xul | 120 ++ .../suite/components/pref/content/pref-download.js | 197 +++ .../components/pref/content/pref-download.xul | 120 ++ .../components/pref/content/pref-findasyoutype.js | 15 + .../components/pref/content/pref-findasyoutype.xul | 70 + comm/suite/components/pref/content/pref-fonts.js | 220 +++ comm/suite/components/pref/content/pref-fonts.xul | 260 ++++ comm/suite/components/pref/content/pref-history.js | 55 + .../suite/components/pref/content/pref-history.xul | 99 ++ comm/suite/components/pref/content/pref-http.js | 42 + comm/suite/components/pref/content/pref-http.xul | 82 + comm/suite/components/pref/content/pref-images.xul | 47 + comm/suite/components/pref/content/pref-keynav.js | 54 + comm/suite/components/pref/content/pref-keynav.xul | 104 ++ .../components/pref/content/pref-languages-add.js | 147 ++ .../components/pref/content/pref-languages-add.xul | 54 + .../components/pref/content/pref-languages.js | 200 +++ .../components/pref/content/pref-languages.xul | 124 ++ comm/suite/components/pref/content/pref-links.js | 15 + comm/suite/components/pref/content/pref-links.xul | 78 + .../components/pref/content/pref-locationbar.js | 42 + .../components/pref/content/pref-locationbar.xul | 127 ++ comm/suite/components/pref/content/pref-media.xul | 60 + .../components/pref/content/pref-mousewheel.js | 45 + .../components/pref/content/pref-mousewheel.xul | 298 ++++ .../components/pref/content/pref-navigator.js | 262 ++++ .../components/pref/content/pref-navigator.xul | 188 +++ .../components/pref/content/pref-offlineapps.js | 178 +++ .../components/pref/content/pref-offlineapps.xul | 81 + comm/suite/components/pref/content/pref-popups.js | 95 ++ comm/suite/components/pref/content/pref-popups.xul | 132 ++ .../components/pref/content/pref-privatedata.js | 30 + .../components/pref/content/pref-privatedata.xul | 181 +++ .../pref/content/pref-proxies-advanced.xul | 194 +++ comm/suite/components/pref/content/pref-proxies.js | 188 +++ .../suite/components/pref/content/pref-proxies.xul | 156 ++ comm/suite/components/pref/content/pref-scripts.js | 29 + .../suite/components/pref/content/pref-scripts.xul | 92 ++ comm/suite/components/pref/content/pref-search.js | 60 + comm/suite/components/pref/content/pref-search.xul | 50 + .../suite/components/pref/content/pref-security.js | 15 + .../components/pref/content/pref-security.xul | 108 ++ .../components/pref/content/pref-smartupdate.js | 87 ++ .../components/pref/content/pref-smartupdate.xul | 139 ++ .../suite/components/pref/content/pref-spelling.js | 119 ++ .../components/pref/content/pref-spelling.xul | 80 + comm/suite/components/pref/content/pref-sync.js | 143 ++ comm/suite/components/pref/content/pref-sync.xul | 158 ++ comm/suite/components/pref/content/pref-tabs.xul | 113 ++ comm/suite/components/pref/content/preferences.js | 99 ++ comm/suite/components/pref/content/preferences.xul | 264 ++++ comm/suite/components/pref/content/prefpanels.css | 33 + comm/suite/components/pref/content/prefpanels.xml | 59 + comm/suite/components/pref/jar.mn | 73 + comm/suite/components/pref/moz.build | 11 + .../components/pref/tests/browser/browser.ini | 3 + .../pref/tests/browser/browser_bug410900.js | 55 + 74 files changed, 9316 insertions(+) create mode 100644 comm/suite/components/pref/content/pref-advanced.js create mode 100644 comm/suite/components/pref/content/pref-advanced.xul create mode 100644 comm/suite/components/pref/content/pref-appearance.js create mode 100644 comm/suite/components/pref/content/pref-appearance.xul create mode 100644 comm/suite/components/pref/content/pref-applicationManager.js create mode 100644 comm/suite/components/pref/content/pref-applicationManager.xul create mode 100644 comm/suite/components/pref/content/pref-applications.js create mode 100644 comm/suite/components/pref/content/pref-applications.xul create mode 100644 comm/suite/components/pref/content/pref-cache.js create mode 100644 comm/suite/components/pref/content/pref-cache.xul create mode 100644 comm/suite/components/pref/content/pref-colors.js create mode 100644 comm/suite/components/pref/content/pref-colors.xul create mode 100644 comm/suite/components/pref/content/pref-content.js create mode 100644 comm/suite/components/pref/content/pref-content.xul create mode 100644 comm/suite/components/pref/content/pref-cookies.js create mode 100644 comm/suite/components/pref/content/pref-cookies.xul create mode 100644 comm/suite/components/pref/content/pref-debugging.js create mode 100644 comm/suite/components/pref/content/pref-debugging.xul create mode 100644 comm/suite/components/pref/content/pref-download.js create mode 100644 comm/suite/components/pref/content/pref-download.xul create mode 100644 comm/suite/components/pref/content/pref-findasyoutype.js create mode 100644 comm/suite/components/pref/content/pref-findasyoutype.xul create mode 100644 comm/suite/components/pref/content/pref-fonts.js create mode 100644 comm/suite/components/pref/content/pref-fonts.xul create mode 100644 comm/suite/components/pref/content/pref-history.js create mode 100644 comm/suite/components/pref/content/pref-history.xul create mode 100644 comm/suite/components/pref/content/pref-http.js create mode 100644 comm/suite/components/pref/content/pref-http.xul create mode 100644 comm/suite/components/pref/content/pref-images.xul create mode 100644 comm/suite/components/pref/content/pref-keynav.js create mode 100644 comm/suite/components/pref/content/pref-keynav.xul create mode 100644 comm/suite/components/pref/content/pref-languages-add.js create mode 100644 comm/suite/components/pref/content/pref-languages-add.xul create mode 100644 comm/suite/components/pref/content/pref-languages.js create mode 100644 comm/suite/components/pref/content/pref-languages.xul create mode 100644 comm/suite/components/pref/content/pref-links.js create mode 100644 comm/suite/components/pref/content/pref-links.xul create mode 100644 comm/suite/components/pref/content/pref-locationbar.js create mode 100644 comm/suite/components/pref/content/pref-locationbar.xul create mode 100644 comm/suite/components/pref/content/pref-media.xul create mode 100644 comm/suite/components/pref/content/pref-mousewheel.js create mode 100644 comm/suite/components/pref/content/pref-mousewheel.xul create mode 100644 comm/suite/components/pref/content/pref-navigator.js create mode 100644 comm/suite/components/pref/content/pref-navigator.xul create mode 100644 comm/suite/components/pref/content/pref-offlineapps.js create mode 100644 comm/suite/components/pref/content/pref-offlineapps.xul create mode 100644 comm/suite/components/pref/content/pref-popups.js create mode 100644 comm/suite/components/pref/content/pref-popups.xul create mode 100644 comm/suite/components/pref/content/pref-privatedata.js create mode 100644 comm/suite/components/pref/content/pref-privatedata.xul create mode 100644 comm/suite/components/pref/content/pref-proxies-advanced.xul create mode 100644 comm/suite/components/pref/content/pref-proxies.js create mode 100644 comm/suite/components/pref/content/pref-proxies.xul create mode 100644 comm/suite/components/pref/content/pref-scripts.js create mode 100644 comm/suite/components/pref/content/pref-scripts.xul create mode 100755 comm/suite/components/pref/content/pref-search.js create mode 100755 comm/suite/components/pref/content/pref-search.xul create mode 100644 comm/suite/components/pref/content/pref-security.js create mode 100644 comm/suite/components/pref/content/pref-security.xul create mode 100644 comm/suite/components/pref/content/pref-smartupdate.js create mode 100644 comm/suite/components/pref/content/pref-smartupdate.xul create mode 100644 comm/suite/components/pref/content/pref-spelling.js create mode 100644 comm/suite/components/pref/content/pref-spelling.xul create mode 100644 comm/suite/components/pref/content/pref-sync.js create mode 100644 comm/suite/components/pref/content/pref-sync.xul create mode 100644 comm/suite/components/pref/content/pref-tabs.xul create mode 100644 comm/suite/components/pref/content/preferences.js create mode 100644 comm/suite/components/pref/content/preferences.xul create mode 100755 comm/suite/components/pref/content/prefpanels.css create mode 100644 comm/suite/components/pref/content/prefpanels.xml create mode 100644 comm/suite/components/pref/jar.mn create mode 100644 comm/suite/components/pref/moz.build create mode 100644 comm/suite/components/pref/tests/browser/browser.ini create mode 100644 comm/suite/components/pref/tests/browser/browser_bug410900.js (limited to 'comm/suite/components/pref') diff --git a/comm/suite/components/pref/content/pref-advanced.js b/comm/suite/components/pref/content/pref-advanced.js new file mode 100644 index 0000000000..1f1c290329 --- /dev/null +++ b/comm/suite/components/pref/content/pref-advanced.js @@ -0,0 +1,90 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); +const {ShellService} = ChromeUtils.import("resource:///modules/ShellService.jsm"); + +var defaultClient = 0; +var defaultApps = 0; + +function Startup() +{ + InitPlatformIntegration(); + CrashReportsCheck(); +} + +/** + * System preferences + */ + +function InitPlatformIntegration() { + if (ShellService) { + try { + this.defaultApps = ShellService.shouldBeDefaultClientFor; + ["Browser", "Mail", "News", "Rss"].forEach(function(aType) { + let button = document.getElementById("setDefault" + aType); + try { + let client = Ci.nsIShellService[aType.toUpperCase()]; + let isDefault = ShellService.isDefaultClient(false, client); + if (isDefault) { + this.defaultClient |= client; + } + button.disabled = isDefault; + document.getElementById("defaultClientGroup").hidden = false; + } catch (e) { + button.hidden = true; + } + }); + } catch (e) { + } + } +} + +function ApplySetAsDefaultClient() { + let pane = document.getElementById("advanced_pane"); + ShellService.setDefaultClient(false, false, pane.defaultClient); + ShellService.shouldBeDefaultClientFor = pane.defaultApps; +} + +function onSetDefault(aButton, aType) { + if (document.documentElement.instantApply) { + ShellService.setDefaultClient(false, false, Ci.nsIShellService[aType]); + ShellService.shouldBeDefaultClientFor |= Ci.nsIShellService[aType]; + } else { + this.defaultClient |= Ci.nsIShellService[aType]; + this.defaultApps |= Ci.nsIShellService[aType]; + window.addEventListener("dialogaccept", this.ApplySetAsDefaultClient, true); + } + + aButton.disabled = true; +} + +function onNewsChange(aChecked) { + let snws = document.getElementById("network.protocol-handler.external.snews"); + let nntp = document.getElementById("network.protocol-handler.external.nntp"); + + if (!snws.locked) + snws.value = aChecked; + + if (!nntp.locked) + nntp.value = aChecked; +} + +function CrashReportsCheck() +{ + if (AppConstants.MOZ_CRASHREPORTER) { + var cr = Cc["@mozilla.org/toolkit/crash-reporter;1"] + .getService(Ci.nsICrashReporter); + document.getElementById("crashReports").hidden = !cr.enabled; + document.getElementById("submitCrashes").checked = cr.submitReports; + } +} + +function updateSubmitCrashes(aChecked) +{ + Cc["@mozilla.org/toolkit/crash-reporter;1"] + .getService(Ci.nsICrashReporter) + .submitReports = aChecked; +} diff --git a/comm/suite/components/pref/content/pref-advanced.xul b/comm/suite/components/pref/content/pref-advanced.xul new file mode 100644 index 0000000000..6b77581e4c --- /dev/null +++ b/comm/suite/components/pref/content/pref-advanced.xul @@ -0,0 +1,174 @@ + + + + + %brandDTD; + %prefAdvancedDTD; +]> + + + + + + + + + + + + + + + + + + + + + + +