More alert suppression changes
This commit is contained in:
parent
a7ac4b5b1a
commit
d5ddde3e41
29 changed files with 662 additions and 635 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -680,8 +680,7 @@ class Computer extends Component {
|
|||
*/
|
||||
if (!component.powerUp(data, fRepower) && data) {
|
||||
|
||||
component.notice("Unable to restore hardware state");
|
||||
|
||||
if (component.notice("Unable to restore hardware state")) {
|
||||
/*
|
||||
* If this is a resume error for a machine that also has a predefined state
|
||||
* AND we're not restoring from that state, then throw away the current state,
|
||||
|
|
@ -702,6 +701,8 @@ class Computer extends Component {
|
|||
*/
|
||||
this.fRestoreError = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Any failure triggers an automatic to call powerUp() again, without any state,
|
||||
* in the hopes that the component can recover by performing a reset.
|
||||
|
|
|
|||
|
|
@ -937,9 +937,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -1060,6 +1062,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -1070,10 +1073,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -3006,9 +3006,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -3129,6 +3131,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -3139,10 +3142,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -3296,9 +3296,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -3419,6 +3421,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -3429,10 +3432,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -3524,9 +3524,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -3647,6 +3649,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -3657,10 +3660,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -74352,8 +74356,7 @@ class Computer extends Component {
|
|||
*/
|
||||
if (!component.powerUp(data, fRepower) && data) {
|
||||
|
||||
component.notice("Unable to restore hardware state");
|
||||
|
||||
if (component.notice("Unable to restore hardware state")) {
|
||||
/*
|
||||
* If this is a resume error for a machine that also has a predefined state
|
||||
* AND we're not restoring from that state, then throw away the current state,
|
||||
|
|
@ -74374,6 +74377,8 @@ class Computer extends Component {
|
|||
*/
|
||||
this.fRestoreError = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Any failure triggers an automatic to call powerUp() again, without any state,
|
||||
* in the hopes that the component can recover by performing a reset.
|
||||
|
|
@ -75032,7 +75037,7 @@ class Computer extends Component {
|
|||
* I used to bypass the prompt if this.resume == Computer.RESUME_AUTO, setting fSave to true automatically,
|
||||
* but that gives the user no means of resetting a resumable machine that contains errors in its resume state.
|
||||
*/
|
||||
var fSave = (/* this.resume == Computer.RESUME_AUTO || */ Component.confirmUser("Click OK to save changes to this " + PCX86.APPNAME + " machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded."));
|
||||
var fSave = (/* this.resume == Computer.RESUME_AUTO || */ this.flags.unloading || Component.confirmUser("Click OK to save changes to this " + PCX86.APPNAME + " machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded."));
|
||||
this.powerOff(fSave, true);
|
||||
/*
|
||||
* Forcing the page to reload is an expedient option, but ugly. It's preferable to call powerOn()
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -3296,9 +3296,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -3419,6 +3421,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -3429,10 +3432,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -3524,9 +3524,11 @@ class Component {
|
|||
* @param {string} s
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id]
|
||||
* @return {boolean}
|
||||
*/
|
||||
this.notice = function noticePanel(s, fPrintOnly, id) {
|
||||
this.println(s, this.idComponent);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
|
|
@ -3647,6 +3649,7 @@ class Component {
|
|||
* @param {string} s is the message text
|
||||
* @param {boolean} [fPrintOnly]
|
||||
* @param {string} [id] is the caller's ID, if any
|
||||
* @return {boolean}
|
||||
*/
|
||||
notice(s, fPrintOnly, id)
|
||||
{
|
||||
|
|
@ -3657,10 +3660,11 @@ class Component {
|
|||
var computer = Component.getComponentByType("Computer", this.id);
|
||||
if (computer && computer.flags.unloading) {
|
||||
console.log("ignoring notice during unload: " + s);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Component.notice(s, fPrintOnly, id || this.type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue