Merge remote-tracking branch 'origin/4.0' into CL-1154_monitor_empty_states

This commit is contained in:
Ian Paschal 2019-01-28 16:54:21 +01:00
commit d495e80959
13 changed files with 176 additions and 84 deletions

View file

@ -53,7 +53,7 @@ Item
}
text: catalog.i18nc("@label", "Move to top");
visible: {
if (printJob && printJob.state == "queued" && !isAssigned(printJob)) {
if (printJob && (printJob.state == "queued" || printJob.state == "error") && !isAssigned(printJob)) {
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
}
@ -72,7 +72,7 @@ Item
if (!printJob) {
return false;
}
var states = ["queued", "sent_to_printer"];
var states = ["queued", "error", "sent_to_printer"];
return states.indexOf(printJob.state) !== -1;
}
}

View file

@ -225,7 +225,7 @@ Item
if (!printJob) {
return false
}
var states = ["queued", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
var states = ["queued", "error", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
return states.indexOf(printJob.state) !== -1
}
}

View file

@ -179,7 +179,7 @@ Item
if (!printer || !printer.activePrintJob) {
return false
}
var states = ["queued", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
var states = ["queued", "error", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
return states.indexOf(printer.activePrintJob.state) !== -1
}
}
@ -306,7 +306,7 @@ Item
}
if (printer && printer.state == "unreachable")
{
return catalog.i18nc("@label:status", "Unavailable")
return catalog.i18nc("@label:status", "Unreachable")
}
if (printer && !printer.activePrintJob && printer.state == "idle")
{
@ -398,6 +398,7 @@ Item
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label:status", "Requires configuration changes")
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
color: UM.Theme.getColor("monitor_text_primary")
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!