tor-browser

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

commit 33a9da90d282e6a2341acbd645dae9c81b734ce6
parent ecacb2f9a51c52952a3fe4717c1a1c0c7398228f
Author: Benjamin VanderSloot <bvandersloot@mozilla.com>
Date:   Tue,  7 Oct 2025 05:53:38 +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 | 28+++++++++++++++++++++++-----
2 files changed, 32 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: @@ -1499,6 +1504,23 @@ let SETTINGS_CONFIG = { }, ], }, + 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 +1638,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 +1744,6 @@ var gMainPane = { ); gMainPane.updateColorsButton(); setEventListener( - "connectionSettings", - "command", - gMainPane.showConnections - ); - setEventListener( "browserContainersCheckbox", "command", gMainPane.checkBrowserContainers