Remove obsolete option

This commit is contained in:
Anton Thomasson 2021-03-21 17:10:40 +01:00
parent 0a5ba8006c
commit c932d54da1
12 changed files with 7 additions and 91 deletions

View file

@ -143,20 +143,6 @@ ApplicationWindow
defaultValue: true defaultValue: true
} }
ConfigurationValue
{
id: alwaysConvertSetting
key: "/apps/harbour-seaprint/settings/always-convert"
defaultValue: false
}
ConfigurationValue
{
id: forceIncluDeDocumentFormatSetting
key: "/apps/harbour-seaprint/settings/force-include-document-format"
defaultValue: false
}
ConfigurationValue ConfigurationValue
{ {
id: alwaysUseMediaColSetting id: alwaysUseMediaColSetting

View file

@ -64,7 +64,6 @@ Page {
pageStack.replace(Qt.resolvedUrl("BusyPage.qml"),{printer:printer}, pageStack.replace(Qt.resolvedUrl("BusyPage.qml"),{printer:printer},
PageStackAction.Immediate) PageStackAction.Immediate)
printer.print(jobParams, page.selectedFile, printer.print(jobParams, page.selectedFile,
alwaysConvertSetting.value,
alwaysUseMediaColSetting.value) alwaysUseMediaColSetting.value)
} }
} }

View file

@ -44,15 +44,6 @@ Page {
} }
} }
TextSwitch {
text: qsTr("Always convert to raster format")
description: qsTr("Force conversion to PWG/URF raster format. This is mainly intended for testing.")
checked: alwaysConvertSetting.value
onCheckedChanged: {
alwaysConvertSetting.value = checked
}
}
TextSwitch { TextSwitch {
text: qsTr("Always use media-col") text: qsTr("Always use media-col")
description: qsTr("Use the attribute media-col instead of media for paper sizes. I.e. do parametric selection of print media rather than by name. If you use zero print margins, parametric selection will be used regardless of this setting.") description: qsTr("Use the attribute media-col instead of media for paper sizes. I.e. do parametric selection of print media rather than by name. If you use zero print margins, parametric selection will be used regardless of this setting.")

View file

@ -302,13 +302,9 @@ QString firstMatch(QJsonArray supported, QStringList wanted)
return ""; return "";
} }
QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray supportedMimeTypes, bool forceRaster) QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray supportedMimeTypes)
{ {
if(forceRaster) if(documentFormat == Mimer::OctetStream)
{
return firstMatch(supportedMimeTypes, {Mimer::PWG, Mimer::URF});
}
else if(documentFormat == Mimer::OctetStream)
{ {
if(mimeType == Mimer::PDF) if(mimeType == Mimer::PDF)
{ {
@ -338,9 +334,9 @@ QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray
return documentFormat; return documentFormat;
} }
void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysConvert, bool alwaysUseMediaCol) void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysUseMediaCol)
{ {
qDebug() << "printing" << filename << attrs << alwaysConvert; qDebug() << "printing" << filename << attrs;
_progress = ""; _progress = "";
emit progressChanged(); emit progressChanged();
@ -402,13 +398,13 @@ void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysConvert,
} }
QString documentFormat = getAttrOrDefault(attrs, "document-format").toString(); QString documentFormat = getAttrOrDefault(attrs, "document-format").toString();
qDebug() << "target format:" << documentFormat << "alwaysConvert:" << alwaysConvert; qDebug() << "target format:" << documentFormat;
// document-format goes in the op-attrs and not the job-attrs // document-format goes in the op-attrs and not the job-attrs
o.insert("document-format", QJsonObject {{"tag", IppMsg::MimeMediaType}, {"value", documentFormat}}); o.insert("document-format", QJsonObject {{"tag", IppMsg::MimeMediaType}, {"value", documentFormat}});
attrs.remove("document-format"); attrs.remove("document-format");
documentFormat = targetFormatIfAuto(documentFormat, mimeType, supportedMimeTypes, alwaysConvert); documentFormat = targetFormatIfAuto(documentFormat, mimeType, supportedMimeTypes);
qDebug() << "adjusted target format:" << documentFormat; qDebug() << "adjusted target format:" << documentFormat;
if(documentFormat == "" || documentFormat == Mimer::OctetStream) if(documentFormat == "" || documentFormat == Mimer::OctetStream)

View file

@ -59,7 +59,7 @@ signals:
void progressChanged(); void progressChanged();
public slots: public slots:
void print(QJsonObject attrs, QString file, bool alwaysConvert, bool alwaysUseMediaCol); void print(QJsonObject attrs, QString file, bool alwaysUseMediaCol);
void onUrlChanged(); void onUrlChanged();

View file

@ -483,14 +483,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation>Einige Drucker ünterstützen mehr Formate als sie bekannt geben. Zusätliche Formate können aus anderen Attributen geschlussffolgert werden. Das ist hauptsächlich relevant für Postscript kompatible Drucker die auch PDF unterstützen.</translation> <translation>Einige Drucker ünterstützen mehr Formate als sie bekannt geben. Zusätliche Formate können aus anderen Attributen geschlussffolgert werden. Das ist hauptsächlich relevant für Postscript kompatible Drucker die auch PDF unterstützen.</translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation>Immer ins Raster Format konvertieren</translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation>Konvertierung in das PWG/URF Rasterformat erzwingen. Die ist hauptsächlich für Testzwecke vorgesehen.</translation>
</message>
<message> <message>
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source> <source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation>Warnseite über nicht installierte optionalen Abhängigkeiten anzeigen, wenn diese nicht installiert sind.</translation> <translation>Warnseite über nicht installierte optionalen Abhängigkeiten anzeigen, wenn diese nicht installiert sind.</translation>

View file

@ -483,14 +483,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation>Algunas impresoras admiten más formatos de los que anuncian. Sin embargo, es posible deducir formatos adicionales a partir de otros atributos. Principalmente es relevante para impresoras compatibles con Postscript que también admiten PDF.</translation> <translation>Algunas impresoras admiten más formatos de los que anuncian. Sin embargo, es posible deducir formatos adicionales a partir de otros atributos. Principalmente es relevante para impresoras compatibles con Postscript que también admiten PDF.</translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation>Convertir siempre a formato ráster</translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation>Forzar conversión a formato ráster PWG/URF. Esto es para hacer pruebas principalmente.</translation>
</message>
<message> <message>
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source> <source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation>Mostrar página de advertencia sobre las dependencias opcionales no instaladas cuando no están instaladas.</translation> <translation>Mostrar página de advertencia sobre las dependencias opcionales no instaladas cuando no están instaladas.</translation>

View file

@ -483,14 +483,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source> <source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View file

@ -483,14 +483,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation>Sommige printers ondersteunen meer formaten dan ze correct adverteren. Er kunnen echter aanvullende formaten worden afgeleid uit andere attributen. Vooral relevant voor Postscript ondersteunende printers die ook PDF ondersteunen.</translation> <translation>Sommige printers ondersteunen meer formaten dan ze correct adverteren. Er kunnen echter aanvullende formaten worden afgeleid uit andere attributen. Vooral relevant voor Postscript ondersteunende printers die ook PDF ondersteunen.</translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation>Altijd naar rasterformaat omzetten</translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation>Omzetting naar PWG/URF-rasterformaat forceren. Dit is voornamelijk bedoeld om te testen.</translation>
</message>
<message> <message>
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source> <source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation>Waarschuwingspagina weergeven over optionele afhankelijkheden die niet worden geïnstalleerd, als ze niet zijn geïnstalleerd.</translation> <translation>Waarschuwingspagina weergeven over optionele afhankelijkheden die niet worden geïnstalleerd, als ze niet zijn geïnstalleerd.</translation>

View file

@ -491,14 +491,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Always use media-col</source> <source>Always use media-col</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View file

@ -483,14 +483,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation> PDF的Postscript</translation> <translation> PDF的Postscript</translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation></translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation>PWG或URF光栅格式</translation>
</message>
<message> <message>
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source> <source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation></translation> <translation></translation>

View file

@ -483,14 +483,6 @@
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source> <source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Always convert to raster format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source> <source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>