mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 760290 - The update UI needs to be aware of the possibility that the update cannot be staged in the background; r=rstrong
This commit is contained in:
parent
d98ade3af7
commit
3cb1fce0b2
@ -194,7 +194,7 @@ appUpdater.prototype =
|
||||
// true when updating in background is enabled.
|
||||
get backgroundUpdateEnabled() {
|
||||
return this.updateEnabled &&
|
||||
Services.prefs.getBoolPref("app.update.stage.enabled");
|
||||
gAppUpdater.aus.canStageUpdates;
|
||||
},
|
||||
|
||||
// true when updating is automatic.
|
||||
|
@ -15,7 +15,6 @@ const CoR = Components.results;
|
||||
|
||||
const XMLNS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
const PREF_APP_UPDATE_BACKGROUND = "app.update.stage.enabled";
|
||||
const PREF_APP_UPDATE_BACKGROUNDERRORS = "app.update.backgroundErrors";
|
||||
const PREF_APP_UPDATE_BILLBOARD_TEST_URL = "app.update.billboard.test_url";
|
||||
const PREF_APP_UPDATE_CERT_ERRORS = "app.update.cert.errors";
|
||||
@ -1581,7 +1580,9 @@ var gDownloadingPage = {
|
||||
LOG("gDownloadingPage", "onStopRequest - patch verification succeeded");
|
||||
// If the background update pref is set, we should wait until the update
|
||||
// is actually staged in the background.
|
||||
if (getPref("getBoolPref", PREF_APP_UPDATE_BACKGROUND, false)) {
|
||||
var aus = CoC["@mozilla.org/updates/update-service;1"].
|
||||
getService(CoI.nsIApplicationUpdateService);
|
||||
if (aus.canStageUpdates) {
|
||||
this._setUpdateApplying();
|
||||
} else {
|
||||
this.cleanUp();
|
||||
|
@ -352,7 +352,7 @@ interface nsIUpdateChecker : nsISupports
|
||||
* background update checks and provides utilities for selecting and
|
||||
* downloading update patches.
|
||||
*/
|
||||
[scriptable, uuid(7bd62f69-f604-484b-b97c-e7229d7a3ee8)]
|
||||
[scriptable, uuid(900b4a18-3bef-4f3e-bcf5-84dce0021c6d)]
|
||||
interface nsIApplicationUpdateService : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -422,6 +422,11 @@ interface nsIApplicationUpdateService : nsISupports
|
||||
* privileges to the install directory.
|
||||
*/
|
||||
readonly attribute boolean canApplyUpdates;
|
||||
|
||||
/**
|
||||
* Whether the Update Service is able to stage updates.
|
||||
*/
|
||||
readonly attribute boolean canStageUpdates;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2046,6 +2046,13 @@ UpdateService.prototype = {
|
||||
return gCanApplyUpdates;
|
||||
},
|
||||
|
||||
/**
|
||||
* See nsIUpdateService.idl
|
||||
*/
|
||||
get canStageUpdates() {
|
||||
return gCanStageUpdates;
|
||||
},
|
||||
|
||||
/**
|
||||
* See nsIUpdateService.idl
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user