Bug 1457234 - Add link to about:preferences#home under startup prefs section
MozReview-Commit-ID: GUm72p2xWB7
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -400,16 +400,18 @@ var gMainPane = {
Preferences.get("layers.acceleration.disabled").on("change",
gMainPane.updateHardwareAcceleration.bind(gMainPane));
setEventListener("connectionSettings", "command",
gMainPane.showConnections);
setEventListener("browserContainersCheckbox", "command",
gMainPane.checkBrowserContainers);
setEventListener("browserContainersSettings", "command",
gMainPane.showContainerSettings);
+ setEventListener("openHomePagePreferences", "click",
+ gMainPane.showHomePageSettings);
// Initializes the fonts dropdowns displayed in this pane.
this._rebuildFonts();
this.updateOnScreenKeyboardVisibility();
// Show translation preferences if we may:
const prefName = "browser.translation.ui.show";
@@ -972,16 +974,24 @@ var gMainPane = {
/**
* Displays container panel for customising and adding containers.
*/
showContainerSettings() {
gotoPref("containers");
},
/**
+ * Opens up the home pane in preferences for changing what is displayed on homepage
+ * and new tabs.
+ */
+ showHomePageSettings() {
+ gotoPref("home");
+ },
+
+ /**
* ui.osk.enabled
* - when set to true, subject to other conditions, we may sometimes invoke
* an on-screen keyboard when a text input is focused.
* (Currently Windows-only, and depending on prefs, may be Windows-8-only)
*/
updateOnScreenKeyboardVisibility() {
if (AppConstants.platform == "win") {
let minVersion = Services.prefs.getBoolPref("ui.osk.require_win10") ? 10 : 6.2;
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -64,16 +64,18 @@
<hbox align="center" class="indent">
<image class="face-smile"/>
<label id="isDefaultLabel" flex="1" data-l10n-id="is-default"/>
</hbox>
</deck>
</vbox>
#endif
+ <label class="text-link" id="openHomePagePreferences" data-l10n-id="change-home-page-settings"/>
+
</groupbox>
<!-- Tab preferences -->
<groupbox data-category="paneGeneral"
hidden="true">
<caption><label data-l10n-id="tabs-group-header"/></caption>
<checkbox id="ctrlTabRecentlyUsedOrder" data-l10n-id="ctrl-tab-recently-used-order"
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -152,16 +152,18 @@ is-not-default = { -brand-short-name } i
set-as-my-default-browser =
.label = Make Default…
.accesskey = D
startup-restore-previous-session =
.label = Restore previous session
.accesskey = s
+change-home-page-settings = Change home page and new tab settings
+
disable-extension =
.label = Disable Extension
tabs-group-header = Tabs
ctrl-tab-recently-used-order =
.label = Ctrl+Tab cycles through tabs in recently used order
.accesskey = T