Bug #311527 --> Delaying software update by pressing "Later" doesn't give user proper feedback when dialog reappears

Port firefox changes back to thunderbird.
This commit is contained in:
scott%scott-macgregor.org 2005-10-12 21:32:51 +00:00
parent b39c05c921
commit f12fa97aa4

View File

@ -2529,8 +2529,19 @@ function OpenOrFocusWindow(args, windowType, chromeURL)
function checkForUpdates()
{
var prompter = Components.classes["@mozilla.org/updates/update-prompt;1"]
.createInstance(Components.interfaces.nsIUpdatePrompt);
var um =
Components.classes["@mozilla.org/updates/update-manager;1"].
getService(Components.interfaces.nsIUpdateManager);
var prompter =
Components.classes["@mozilla.org/updates/update-prompt;1"].
createInstance(Components.interfaces.nsIUpdatePrompt);
// If there's an update ready to be applied, show the "Update Downloaded"
// UI instead and let the user know they have to restart the application for
// the changes to be applied.
if (um.activeUpdate && um.activeUpdate.state == "pending")
prompter.showUpdateDownloaded(um.activeUpdate);
else
prompter.checkForUpdates();
}