Show different state when printer is disabled

CL-896
This commit is contained in:
Jaime van Kessel 2018-09-04 13:45:16 +02:00
parent 132366fa61
commit be4357c635

View file

@ -192,7 +192,18 @@ Component
Label Label
{ {
id: activeJobLabel id: activeJobLabel
text: modelData.activePrintJob != null ? modelData.activePrintJob.name : "waiting" text:
{
if (modelData.state == "disabled")
{
return catalog.i18nc("@label", "Not available")
}
if (modelData.activePrintJob != null)
{
return modelData.activePrintJob.name
}
return catalog.i18nc("@label", "Waiting")
}
anchors.top: machineNameLabel.bottom anchors.top: machineNameLabel.bottom
width: parent.width width: parent.width
elide: Text.ElideRight elide: Text.ElideRight