Remove always use media-col setting

This commit is contained in:
Anton Thomasson 2021-07-31 12:59:51 +02:00
parent ebdfa9e4ee
commit a4168ef74f
12 changed files with 2 additions and 94 deletions

View file

@ -145,13 +145,6 @@ ApplicationWindow
defaultValue: true
}
ConfigurationValue
{
id: alwaysUseMediaColSetting
key: SeaPrintSettings.alwaysUseMediaColPath
defaultValue: SeaPrintSettings.alwaysUseMediaColDefault
}
ConfigurationValue
{
id: ignoreSslErrorsSetting

View file

@ -44,15 +44,6 @@ Page {
}
}
TextSwitch {
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.")
checked: alwaysUseMediaColSetting.value
onCheckedChanged: {
alwaysUseMediaColSetting.value = checked
}
}
TextSwitch {
text: qsTr("Ignore SSL errors")
description: qsTr("In order to work with self-signed certificates of printers and CUPS instances, SSL errors needs to be ignored.")

View file

@ -510,9 +510,8 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
o.insert("job-name", QJsonObject {{"tag", IppMsg::NameWithoutLanguage}, {"value", fileinfo.fileName()}});
QString PaperSize = getAttrOrDefault(jobAttrs, "media").toString();
bool alwaysUseMediaCol = Settings::instance()->alwaysUseMediaCol();
if((jobAttrs.contains("media-col") || alwaysUseMediaCol) && jobAttrs.contains("media"))
if(jobAttrs.contains("media-col") && jobAttrs.contains("media"))
{
qDebug() << "moving media to media-col" << PaperSize;
if(!PaperSizes.contains(PaperSize))

View file

@ -2,8 +2,7 @@
#include <QMutex>
Settings::Settings() : _alwaysUseMediaColSetting("/apps/harbour-seaprint/settings/always-use-media-col", this),
_ignoreSslErrorsSetting("/apps/harbour-seaprint/settings/ignore-ssl-errors", this)
Settings::Settings() : _ignoreSslErrorsSetting("/apps/harbour-seaprint/settings/ignore-ssl-errors", this)
{
}
@ -29,23 +28,11 @@ Settings* Settings::instance()
return m_Instance;
}
bool Settings::alwaysUseMediaCol()
{
return _alwaysUseMediaColSetting.value(_alwaysUseMediaColDefault).toBool();
}
bool Settings::ignoreSslErrors()
{
return _ignoreSslErrorsSetting.value(_ignoreSslErrorsDefault).toBool();
}
QString Settings::alwaysUseMediaColPath()
{
return _alwaysUseMediaColSetting.key();
}
QString Settings::ignoreSslErrorsPath()
{
return _ignoreSslErrorsSetting.key();

View file

@ -7,8 +7,6 @@ class Settings : public QObject
{
Q_OBJECT
public:
Q_PROPERTY(QString alwaysUseMediaColPath READ alwaysUseMediaColPath CONSTANT)
Q_PROPERTY(bool alwaysUseMediaColDefault MEMBER _alwaysUseMediaColDefault CONSTANT)
Q_PROPERTY(QString ignoreSslErrorsPath READ ignoreSslErrorsPath CONSTANT)
Q_PROPERTY(bool ignoreSslErrorsDefault MEMBER _ignoreSslErrorsDefault CONSTANT)
@ -16,7 +14,6 @@ public:
public:
static Settings* instance();
bool alwaysUseMediaCol();
bool ignoreSslErrors();
private:
@ -27,13 +24,10 @@ private:
static Settings* m_Instance;
MGConfItem _alwaysUseMediaColSetting;
MGConfItem _ignoreSslErrorsSetting;
QString alwaysUseMediaColPath();
QString ignoreSslErrorsPath();
bool _alwaysUseMediaColDefault = false;
bool _ignoreSslErrorsDefault = true;
};

View file

@ -548,14 +548,6 @@
<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>
</message>
<message>
<source>Always use media-col</source>
<translation>Immer media-col nutzen</translation>
</message>
<message>
<source>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.</source>
<translation>Das Attribut media-col anstelle des Papierformats benutzen. Das bedeutet, dass eine Auswahl über Parameter anstatt eines Namens erfolgt. Wenn keine Seitenränder aktiviert sind, wird unabhängig von der Einstellung die Parameter Auswahl benutzt.</translation>
</message>
<message>
<source>Settings</source>
<translation>Einstellungen</translation>

View file

@ -548,14 +548,6 @@
<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>
</message>
<message>
<source>Always use media-col</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>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.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished">Ajustes</translation>

View file

@ -548,14 +548,6 @@
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Always use media-col</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>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.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation>Paramètres</translation>

View file

@ -548,14 +548,6 @@
<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>
</message>
<message>
<source>Always use media-col</source>
<translation>Altijd media-col gebruiken</translation>
</message>
<message>
<source>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.</source>
<translation>Het kenmerk media-col gebruiken in plaats van media voor papierformaten. D.w.z. parametrische selectie maken van gedrukte media in plaats van op naam. Als u geen afdrukmarges gebruikt, wordt parametrische selectie gebruikt, ongeacht deze instelling.</translation>
</message>
<message>
<source>Settings</source>
<translation>Instellingen</translation>

View file

@ -552,14 +552,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>
<translation type="unfinished"></translation>
</message>
<message>
<source>Always use media-col</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>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.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ignore SSL errors</source>
<translation type="unfinished"></translation>

View file

@ -548,14 +548,6 @@
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation></translation>
</message>
<message>
<source>Always use media-col</source>
<translation>使media-col</translation>
</message>
<message>
<source>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.</source>
<translation>使 media-col media 使使</translation>
</message>
<message>
<source>Settings</source>
<translation></translation>

View file

@ -548,14 +548,6 @@
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Always use media-col</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>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.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Settings</source>
<translation type="unfinished"></translation>