mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 01:10:22 +00:00
followup to Bug 407875 - prevent multiple update prompts for manual update notification. r=dtownsend, a=beltzner
This commit is contained in:
parent
522ab49ac7
commit
7ccda2884f
@ -223,7 +223,7 @@ var gUpdates = {
|
||||
//
|
||||
// Encode version since it could be a non-ascii string (bug 359093)
|
||||
var neverPrefName = PREF_UPDATE_NEVER_BRANCH +
|
||||
encodeURIComponent(gUpdates.update.version);
|
||||
encodeURIComponent(gUpdates.update.version);
|
||||
gPref.setBoolPref(neverPrefName, true);
|
||||
this.wiz.cancel();
|
||||
},
|
||||
@ -762,6 +762,13 @@ var gManualUpdatePage = {
|
||||
manualUpdateLinkLabel.value = manualURL;
|
||||
manualUpdateLinkLabel.setAttribute("url", manualURL);
|
||||
|
||||
// Prevent multiple notifications for the same update when the user is
|
||||
// unable to apply updates.
|
||||
// Encode version since it could be a non-ascii string (bug 359093)
|
||||
var neverPrefName = PREF_UPDATE_NEVER_BRANCH +
|
||||
encodeURIComponent(gUpdates.update.version);
|
||||
gPref.setBoolPref(neverPrefName, true);
|
||||
|
||||
gUpdates.setButtons(null, null, "okButton", true);
|
||||
gUpdates.wiz.getButton("finish").focus();
|
||||
}
|
||||
|
@ -1325,6 +1325,21 @@ UpdateService.prototype = {
|
||||
// Encode version since it could be a non-ascii string (bug 359093)
|
||||
var neverPrefName = PREF_UPDATE_NEVER_BRANCH +
|
||||
encodeURIComponent(update.version);
|
||||
|
||||
if (!gCanApplyUpdates) {
|
||||
if (getPref("getBoolPref", neverPrefName, false)) {
|
||||
LOG("Checker:_selectAndInstallUpdate - the user is unable to apply " +
|
||||
"updates. Not prompting because the preference " + neverPrefName +
|
||||
" is true");
|
||||
}
|
||||
else {
|
||||
LOG("Checker:_selectAndInstallUpdate - the user is unable to apply " +
|
||||
"updates... prompting");
|
||||
this._showPrompt(update);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (update.type == "major" &&
|
||||
getPref("getBoolPref", neverPrefName, false)) {
|
||||
LOG("Checker:_selectAndInstallUpdate - not prompting because this is a " +
|
||||
@ -1357,13 +1372,6 @@ UpdateService.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gCanApplyUpdates) {
|
||||
LOG("Checker:_selectAndInstallUpdate - prompting because the user is " +
|
||||
"unable to apply updates");
|
||||
this._showPrompt(update);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!getPref("getBoolPref", PREF_APP_UPDATE_AUTO, true)) {
|
||||
LOG("Checker:_selectAndInstallUpdate - prompting because silent " +
|
||||
"install is disabled");
|
||||
|
Loading…
x
Reference in New Issue
Block a user