Add port 9100 warning

This commit is contained in:
Anton Thomasson 2021-02-15 17:57:52 +01:00
parent c745d6121b
commit 2d766345fe
8 changed files with 97 additions and 12 deletions

View file

@ -11,7 +11,28 @@ Dialog {
property var printerName: false property var printerName: false
canAccept: printerName != false canAccept: printerName != false
Component.onCompleted: {
valueField.forceActiveFocus()
}
IppPrinter {
id: printer
url: valueField.text
onAttrsChanged: {
if(printer.attrs["printer-name"]) {
printerName = printer.attrs["printer-name"].value == "" ? qsTr("Unknown") : printer.attrs["printer-name"].value
}
else
{
printerName = false
}
}
}
Column { Column {
id: col
width: parent.width width: parent.width
DialogHeader { DialogHeader {
@ -53,21 +74,29 @@ Dialog {
text: printerName ? printerName : "" text: printerName ? printerName : ""
} }
} }
IppPrinter {
id: printer
url: valueField.text
onAttrsChanged: {
if(printer.attrs["printer-name"]) {
printerName = printer.attrs["printer-name"].value == "" ? qsTr("Unknown") : printer.attrs["printer-name"].value
}
else
{
printerName = false
} }
} Row {
visible: valueField.text.indexOf(":9100") != -1
anchors.top: col.bottom
anchors.topMargin: Theme.paddingLarge*2
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width-2*Theme.paddingLarge
spacing: Theme.paddingMedium
Icon {
id: warningIcon
source: "image://theme/icon-m-warning"
anchors.verticalCenter: parent.verticalCenter
} }
Label {
width: parent.width-warningIcon.width-Theme.paddingMedium
color: Theme.highlightColor
wrapMode: Text.WordWrap
text: qsTr("Port 9100 is not used for IPP.")+"\n"+qsTr("It is used for raw PCL/PDL, which is not supported.")
}
} }
onDone: { onDone: {

View file

@ -110,6 +110,14 @@
<source>Unknown</source> <source>Unknown</source>
<translation>Unbekannt</translation> <translation>Unbekannt</translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>

View file

@ -110,6 +110,14 @@
<source>Unknown</source> <source>Unknown</source>
<translation>Desconocida</translation> <translation>Desconocida</translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>

View file

@ -110,6 +110,14 @@
<source>Unknown</source> <source>Unknown</source>
<translation>Inconnu</translation> <translation>Inconnu</translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>

View file

@ -110,6 +110,14 @@
<source>On WiFi:</source> <source>On WiFi:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>

View file

@ -110,6 +110,14 @@
<source>Unknown</source> <source>Unknown</source>
<translation>Nieznana drukarka</translation> <translation>Nieznana drukarka</translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>

View file

@ -110,6 +110,14 @@
<source>Unknown</source> <source>Unknown</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>

View file

@ -110,6 +110,14 @@
<source>On WiFi:</source> <source>On WiFi:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Port 9100 is not used for IPP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is used for raw PCL/PDL, which is not supported.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>BusyPage</name> <name>BusyPage</name>