tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 81522951ca3821988c3c443ac0dc62ae7a6dc7a5
parent eb842169586f87c6bd28a48b39143164eed9d009
Author: Benjamin VanderSloot <bvandersloot@mozilla.com>
Date:   Mon,  6 Oct 2025 18:35:47 +0000

Bug 1971213 - Convert Network settings to config-based prefs - r=emz,mkennedy

Differential Revision: https://phabricator.services.mozilla.com/D266001

Diffstat:
Mbrowser/components/preferences/main.inc.xhtml | 46+++++++++-------------------------------------
Mbrowser/components/preferences/main.js | 25++++++++++++++++++++-----
2 files changed, 29 insertions(+), 42 deletions(-)

diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml @@ -654,42 +654,14 @@ <!-- Network Settings--> <groupbox id="connectionGroup" data-category="paneGeneral" hidden="true"> <label class="search-header" hidden="true"><html:h2 data-l10n-id="network-settings-title"/></label> - - <hbox align="center" - data-subcategory="netsettings"> - <description flex="1" control="connectionSettings"> - <html:span id="connectionSettingsDescription"/> - <html:a is="moz-support-link" - data-l10n-id="network-proxy-connection-learn-more" - support-page="prefs-connection-settings" - /> - </description> - <separator orient="vertical"/> - <button id="connectionSettings" - is="highlightable-button" - class="accessory-button" - data-l10n-id="network-proxy-connection-settings" - search-l10n-ids=" - connection-window2.title, - connection-proxy-option-no.label, - connection-proxy-option-auto.label, - connection-proxy-option-system.label, - connection-proxy-option-wpad.label, - connection-proxy-option-manual.label, - connection-proxy-http, - connection-proxy-https, - connection-proxy-http-port, - connection-proxy-socks, - connection-proxy-socks4, - connection-proxy-socks5, - connection-proxy-noproxy, - connection-proxy-noproxy-desc, - connection-proxy-https-sharing.label, - connection-proxy-autotype.label, - connection-proxy-reload.label, - connection-proxy-autologin-checkbox.label, - connection-proxy-socks-remote-dns.label, - " /> - </hbox> + <description flex="1" control="connectionSettings" data-subcategory="netsettings" + class="section-description"> + <html:span id="connectionSettingsDescription"/> + <html:a is="moz-support-link" + data-l10n-id="network-proxy-connection-learn-more" + support-page="prefs-connection-settings" + /> + </description> + <html:setting-group groupid="networkProxy" /> </groupbox> </html:template> diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js @@ -569,6 +569,11 @@ Preferences.addSetting({ }); Preferences.addSetting({ id: "containersPlaceholder" }); +Preferences.addSetting({ + id: "connectionSettings", + onUserClick: () => gMainPane.showConnections(), +}); + // Downloads /* * Preferences: @@ -1496,6 +1501,20 @@ let SETTINGS_CONFIG = { { id: "deleteOnClose", l10nId: "sitedata-delete-on-close", + networkProxy: { + items: [ + { + id: "connectionSettings", + l10nId: "network-proxy-connection-settings", + control: "moz-box-button", + controlAttrs: { + "search-l10n-ids": + "connection-window2.title,connection-proxy-option-no.label,connection-proxy-option-auto.label,connection-proxy-option-system.label,connection-proxy-option-wpad.label,connection-proxy-option-manual.label,connection-proxy-http,connection-proxy-https,connection-proxy-http-port,connection-proxy-socks,connection-proxy-socks4,connection-proxy-socks5,connection-proxy-noproxy,connection-proxy-noproxy-desc,connection-proxy-https-sharing.label,connection-proxy-autotype.label,connection-proxy-reload.label,connection-proxy-autologin-checkbox.label,connection-proxy-socks-remote-dns.label", + }, + // Bug 1990552: due to how this lays out in the legacy page, we do not include a + // controllingExtensionInfo attribute here. We will want one in the redesigned page, + // using storeId: "proxy.settings". + controllingExtensionInfo: undefined, }, ], }, @@ -1616,6 +1635,7 @@ var gMainPane = { initSettingGroup("zoom"); initSettingGroup("performance"); initSettingGroup("startup"); + initSettingGroup("networkProxy"); if (AppConstants.platform == "win") { // Functionality for "Show tabs in taskbar" on Windows 7 and up. @@ -1721,11 +1741,6 @@ var gMainPane = { ); gMainPane.updateColorsButton(); setEventListener( - "connectionSettings", - "command", - gMainPane.showConnections - ); - setEventListener( "browserContainersCheckbox", "command", gMainPane.checkBrowserContainers