Bug 405078 - "When an update is ready "Apply Downloaded Update Now" menu does nothing" [p=dao@mozilla.com (Dão Gottwald) r=mconnor a=blocking-firefox3+]

This commit is contained in:
reed@reedloden.com 2007-11-23 22:14:08 -08:00
Родитель 86ef918d90
Коммит 1c3415ee03
2 изменённых файлов: 13 добавлений и 7 удалений

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

@ -439,7 +439,7 @@ interface nsIUpdateManager : nsISupports
* An interface describing an object that can show various kinds of Update
* notification UI to the user.
*/
[scriptable, uuid(22b00276-ec23-4034-a764-395da539b4be)]
[scriptable, uuid(13520e54-9a17-11dc-8314-0800200c9a66)]
interface nsIUpdatePrompt : nsISupports
{
/**
@ -450,7 +450,7 @@ interface nsIUpdatePrompt : nsISupports
/**
* Show a message advising that an update is available for download and
* install.
* install. The message will be held back until the user is idle.
* @param update
* The update to be downloaded and installed
*/
@ -462,8 +462,10 @@ interface nsIUpdatePrompt : nsISupports
* update can be installed.
* @param update
* The update that was downloaded
* @param whenIdle
* Holds the message back until the user is idle
*/
void showUpdateDownloaded(in nsIUpdate update);
void showUpdateDownloaded(in nsIUpdate update, in boolean whenIdle);
/**
* Shows a message detailing the update which was installed.

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

@ -2646,7 +2646,7 @@ Downloader.prototype = {
var prompter =
Components.classes["@mozilla.org/updates/update-prompt;1"].
createInstance(Components.interfaces.nsIUpdatePrompt);
prompter.showUpdateDownloaded(this._update);
prompter.showUpdateDownloaded(this._update, true);
}
},
@ -2811,10 +2811,14 @@ UpdatePrompt.prototype = {
/**
* See nsIUpdateService.idl
*/
showUpdateDownloaded: function(update) {
showUpdateDownloaded: function(update, whenIdle) {
if (this._enabled) {
if (whenIdle)
this._showUIWhenIdle(null, URI_UPDATE_PROMPT_DIALOG, null,
"Update:Wizard", "finishedBackground", update);
else
this._showUI(null, URI_UPDATE_PROMPT_DIALOG, null,
"Update:Wizard", "finishedBackground", update);
}
},