Bug 1279805 - Use app.releaseNotesURL to control release notes in the about dialog. r=florian

MozReview-Commit-ID: 7sqDACxFfJQ

--HG--
extra : rebase_source : ec87655250dc1899213c5073112ceff270d0395d
This commit is contained in:
Matthew Noorenberghe 2017-04-10 18:26:23 -04:00
Родитель aa02b52d5f
Коммит 7a5289d1ca
4 изменённых файлов: 17 добавлений и 4 удалений

Просмотреть файл

@ -52,6 +52,17 @@ function init(aEvent) {
let arch = bundle.GetStringFromName(archResource);
versionField.textContent += ` (${arch})`;
// Show a release notes link if we have a URL.
let relNotesLink = document.getElementById("releasenotes");
let relNotesPrefType = Services.prefs.getPrefType("app.releaseNotesURL");
if (relNotesPrefType != Services.prefs.PREF_INVALID) {
let relNotesURL = Services.urlFormatter.formatURLPref("app.releaseNotesURL");
if (relNotesURL != "about:blank") {
relNotesLink.href = relNotesURL;
relNotesLink.hidden = false;
}
}
if (AppConstants.MOZ_UPDATER) {
gAppUpdater = new appUpdater();

Просмотреть файл

@ -45,10 +45,8 @@
<vbox id="leftBox" flex="1"/>
<vbox id="rightBox" flex="1">
<hbox align="baseline">
#expand <label id="version">__MOZ_APP_VERSION_DISPLAY__</label>
#ifndef NIGHTLY_BUILD
#expand <label id="releasenotes" class="text-link" href="https://www.mozilla.org/firefox/__MOZ_APP_VERSION__/releasenotes/">&releaseNotes.link;</label>
#endif
#expand <label id="version">__MOZ_APP_VERSION_DISPLAY__</label>
<label id="releasenotes" class="text-link" hidden="true">&releaseNotes.link;</label>
</hbox>
<label id="distribution" class="text-blurb"/>

Просмотреть файл

@ -22,6 +22,8 @@ pref("app.update.url.manual", "https://www.mozilla.org/firefox/aurora/");
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "https://www.mozilla.org/firefox/aurora/");
pref("app.releaseNotesURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/releasenotes/");
// The number of days a binary is permitted to be old
// without checking for an update. This assumes that
// app.update.checkInstallTime is true.

Просмотреть файл

@ -20,6 +20,8 @@ pref("app.update.url.manual", "https://www.mozilla.org/firefox/");
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "https://www.mozilla.org/%LOCALE%/firefox/notes");
pref("app.releaseNotesURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/releasenotes/");
// The number of days a binary is permitted to be old
// without checking for an update. This assumes that
// app.update.checkInstallTime is true.