Remove Poppler instructions

This commit is contained in:
Anton Thomasson 2021-11-20 17:31:03 +01:00
parent 2d521dcbae
commit f0eba7b5cd
13 changed files with 14 additions and 125 deletions

View file

@ -107,11 +107,6 @@ Page {
SectionHeader { text: qsTr("Optional dependencies") } SectionHeader { text: qsTr("Optional dependencies") }
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
text: "poppler-utils - "+(ConvertChecker.pdf ? qsTr("Installed") : qsTr("Not installed"))
}
AboutLabel { AboutLabel {
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
text: "calligraconverter - "+(ConvertChecker.calligra ? qsTr("Installed") : qsTr("Not installed")) text: "calligraconverter - "+(ConvertChecker.calligra ? qsTr("Installed") : qsTr("Not installed"))

View file

@ -75,9 +75,8 @@ Page {
onStatusChanged: { onStatusChanged: {
if(status==PageStatus.Active && !nagged && nagScreenSetting.value != nagScreenSetting.expectedValue) if(status==PageStatus.Active && !nagged && nagScreenSetting.value != nagScreenSetting.expectedValue)
{ {
console.log("Can convert from PDF:", ConvertChecker.pdf)
console.log("Can convert from Office:", ConvertChecker.calligra) console.log("Can convert from Office:", ConvertChecker.calligra)
if(!ConvertChecker.pdf || (expectCalligra && !ConvertChecker.calligra)) if(expectCalligra && !ConvertChecker.calligra)
{ {
nagged=true nagged=true
pageStack.push(Qt.resolvedUrl("NagScreen.qml")) pageStack.push(Qt.resolvedUrl("NagScreen.qml"))

View file

@ -27,21 +27,12 @@ Page {
text: qsTr("Optional dependencies are not installed!") text: qsTr("Optional dependencies are not installed!")
} }
Label {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("In order to print PDF files with printers that do not support PDF natively,"
+" you need the package \"poppler-utils\"."
+" This enables SeaPrint to convert to formats that are more likely to be accepted.")
}
Label { Label {
visible: appWin.expectCalligra visible: appWin.expectCalligra
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("In order to print \"office\" documents like odt and doc(x) you <i>also</i> need "+ text: qsTr("In order to print \"office\" documents like odt and doc(x) you need "+
"\"calligraconverter\" from the \"calligra\" package (version 3.2.1+, Sailfish OS 4.2).") "\"calligraconverter\" from the \"calligra\" package (version 3.2.1+, Sailfish OS 4.2).")
} }
@ -69,22 +60,6 @@ Page {
} }
Label {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("Install poppler-utils:") + " " + (ConvertChecker.pdf ? qsTr("(done)") : "")
}
Label {
width: parent.width
wrapMode: Text.WordWrap
font.family: "monospace"
text: "pkcon install poppler-utils"
Clipper {}
}
Label { Label {
visible: appWin.expectCalligra visible: appWin.expectCalligra
width: parent.width width: parent.width

View file

@ -21,7 +21,7 @@ function supported_formats(printer, considerAdditionalFormats)
var plaintext = false; var plaintext = false;
if(has(formats, Mimer.Mimer.PDF) || if(has(formats, Mimer.Mimer.PDF) ||
(ConvertChecker.ConvertChecker.pdf && ( has(formats, Mimer.Mimer.Postscript) || raster ))) (has(formats, Mimer.Mimer.Postscript) || raster ))
{ {
pdf = true; pdf = true;
mimetypes.push(Mimer.Mimer.PDF); mimetypes.push(Mimer.Mimer.PDF);
@ -34,7 +34,7 @@ function supported_formats(printer, considerAdditionalFormats)
mimetypes.push(Mimer.Mimer.Postscript); mimetypes.push(Mimer.Mimer.Postscript);
} }
if((ConvertChecker.ConvertChecker.pdf && ConvertChecker.ConvertChecker.calligra) && if((ConvertChecker.ConvertChecker.calligra) &&
( has(formats, Mimer.Mimer.PDF) || has(formats, Mimer.Mimer.Postscript) || raster )) ( has(formats, Mimer.Mimer.PDF) || has(formats, Mimer.Mimer.Postscript) || raster ))
{ {
office = true; office = true;
@ -42,7 +42,7 @@ function supported_formats(printer, considerAdditionalFormats)
} }
if (raster || has(formats, Mimer.Mimer.JPEG) || has(formats, Mimer.Mimer.PNG) || if (raster || has(formats, Mimer.Mimer.JPEG) || has(formats, Mimer.Mimer.PNG) ||
has(formats, Mimer.Mimer.PDF) || (ConvertChecker.ConvertChecker.pdf && has(formats, Mimer.Mimer.Postscript))) has(formats, Mimer.Mimer.PDF) || has(formats, Mimer.Mimer.Postscript))
{ {
images = true; images = true;
mimetypes.push(Mimer.Mimer.JPEG); mimetypes.push(Mimer.Mimer.JPEG);
@ -373,12 +373,6 @@ function canConvertPdfTo(type)
return has(targets, type) return has(targets, type)
} }
function canTransferPdfAs(type)
{
var targets = [Mimer.Mimer.OctetStream, Mimer.Mimer.PDF];
return has(targets, type)
}
function canTransferPostscriptAs(type) function canTransferPostscriptAs(type)
{ {
var targets = [Mimer.Mimer.OctetStream, Mimer.Mimer.Postscript]; var targets = [Mimer.Mimer.OctetStream, Mimer.Mimer.Postscript];
@ -409,27 +403,12 @@ function fixupChoices(name, choices, mimeType)
case "document-format": case "document-format":
if(mimeType == Mimer.Mimer.PDF) if(mimeType == Mimer.Mimer.PDF)
{ {
if(ConvertChecker.ConvertChecker.pdf) return choices.filter(canConvertPdfTo)
{
return choices.filter(canConvertPdfTo)
}
else
{
return choices.filter(canTransferPdfAs)
}
} }
else if(mimeType == Mimer.Mimer.Plaintext) else if(mimeType == Mimer.Mimer.Plaintext)
{ {
// We convert plaintext to PDF internally // We convert plaintext to PDF internally
if(ConvertChecker.ConvertChecker.pdf) return choices.filter(canConvertPdfTo)
{
return choices.filter(canConvertPdfTo)
}
else
{
return choices.filter(canTransferPdfAs)
}
} }
else if(mimeType == Mimer.Mimer.Postscript) else if(mimeType == Mimer.Mimer.Postscript)
{ {

View file

@ -8,7 +8,6 @@
ConvertChecker::ConvertChecker() : poppler("libpoppler-glib.so.8") ConvertChecker::ConvertChecker() : poppler("libpoppler-glib.so.8")
{ {
_pdf = true;
_calligra = false; _calligra = false;
QProcess calligraconverter(this); QProcess calligraconverter(this);

View file

@ -9,7 +9,6 @@ class ConvertChecker : public QObject
Q_OBJECT Q_OBJECT
public: public:
static ConvertChecker* instance(); static ConvertChecker* instance();
Q_PROPERTY(bool pdf MEMBER _pdf CONSTANT)
Q_PROPERTY(bool calligra MEMBER _calligra CONSTANT) Q_PROPERTY(bool calligra MEMBER _calligra CONSTANT)
Q_INVOKABLE int pdfPages(QString pdf); Q_INVOKABLE int pdfPages(QString pdf);
@ -25,7 +24,6 @@ private:
ConvertChecker& operator=(const ConvertChecker &); ConvertChecker& operator=(const ConvertChecker &);
LibLoader poppler; LibLoader poppler;
bool _pdf;
bool _calligra; bool _calligra;
}; };

View file

@ -396,18 +396,10 @@
<source>Become root:</source> <source>Become root:</source>
<translation>Root werden:</translation> <translation>Root werden:</translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation>poppler-utils installieren:</translation>
</message>
<message> <message>
<source>To install, enable developer mode, and open a terminal.</source> <source>To install, enable developer mode, and open a terminal.</source>
<translation>Für die Installation muss der Entwickler Modus aktiviert und eine Konsole geöffnet werden.</translation> <translation>Für die Installation muss der Entwickler Modus aktiviert und eine Konsole geöffnet werden.</translation>
</message> </message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation>Um PDF Dateien zu drucken wird für Drucker ohne PDF Support das Software Paket &quot;poppler-utils&quot; benötigt. Diese ermöglicht es SeaPrint das PDF in besser unterstützte Formate zu konvertieren.</translation>
</message>
<message> <message>
<source>Install calligra:</source> <source>Install calligra:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -417,7 +409,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -396,18 +396,10 @@
<source>Become root:</source> <source>Become root:</source>
<translation>Acceder como root:</translation> <translation>Acceder como root:</translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation>Instalar poppler-utils:</translation>
</message>
<message> <message>
<source>To install, enable developer mode, and open a terminal.</source> <source>To install, enable developer mode, and open a terminal.</source>
<translation type="unfinished">Para instalar, habilita el modo de desarrollador y abre Terminal.</translation> <translation type="unfinished">Para instalar, habilita el modo de desarrollador y abre Terminal.</translation>
</message> </message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Install calligra:</source> <source>Install calligra:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -417,7 +409,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -396,18 +396,10 @@
<source>Become root:</source> <source>Become root:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>To install, enable developer mode, and open a terminal.</source> <source>To install, enable developer mode, and open a terminal.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Install calligra:</source> <source>Install calligra:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -417,7 +409,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -396,18 +396,10 @@
<source>Become root:</source> <source>Become root:</source>
<translation>Word root:</translation> <translation>Word root:</translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation>Poppler-utils installeren:</translation>
</message>
<message> <message>
<source>To install, enable developer mode, and open a terminal.</source> <source>To install, enable developer mode, and open a terminal.</source>
<translation>Schakel de ontwikkelaarsmodus in en open een terminal om te installeren.</translation> <translation>Schakel de ontwikkelaarsmodus in en open een terminal om te installeren.</translation>
</message> </message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation>Om PDF-bestanden af te drukken met printers die geen PDF ondersteunen, hebt u het pakket &quot;poppler-utils&quot; nodig. Hierdoor kan SeaPrint converteren naar formaten die waarschijnlijk wel worden geaccepteerd.</translation>
</message>
<message> <message>
<source>Install calligra:</source> <source>Install calligra:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -417,7 +409,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -384,10 +384,6 @@
<source>Optional dependencies are not installed!</source> <source>Optional dependencies are not installed!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>To install, enable developer mode, and open a terminal.</source> <source>To install, enable developer mode, and open a terminal.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -396,10 +392,6 @@
<source>Become root:</source> <source>Become root:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Dismiss</source> <source>Dismiss</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -417,7 +409,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -400,14 +400,6 @@
<source>Become root:</source> <source>Become root:</source>
<translation> root </translation> <translation> root </translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation> poppler-utils</translation>
</message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation>PDF文件 poppler-utils SeaPrint </translation>
</message>
<message> <message>
<source>Install calligra:</source> <source>Install calligra:</source>
<translation> calligra:</translation> <translation> calligra:</translation>
@ -417,7 +409,7 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -396,18 +396,10 @@
<source>Become root:</source> <source>Become root:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Install poppler-utils:</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>To install, enable developer mode, and open a terminal.</source> <source>To install, enable developer mode, and open a terminal.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>In order to print PDF files with printers that do not support PDF natively, you need the package &quot;poppler-utils&quot;. This enables SeaPrint to convert to formats that are more likely to be accepted.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Install calligra:</source> <source>Install calligra:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -417,7 +409,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>In order to print &quot;office&quot; documents like odt and doc(x) you &lt;i&gt;also&lt;/i&gt; need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source> <source>In order to print &quot;office&quot; documents like odt and doc(x) you need &quot;calligraconverter&quot; from the &quot;calligra&quot; package (version 3.2.1+, Sailfish OS 4.2).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>