Add Postscript to supported formats

This commit is contained in:
Anton Thomasson 2020-02-17 20:06:39 +01:00
parent 4526aedcc8
commit 6180c3733d
4 changed files with 17 additions and 3 deletions

View file

@ -51,6 +51,10 @@ Page {
{
selectedFileType = "application/pdf"
}
else if(Utils.endsWith(".ps", selectedFile))
{
selectedFileType = "application/postscript"
}
else if(Utils.endsWith(".jpg", selectedFile) || Utils.endsWith(".jpeg", selectedFile))
{
selectedFileType = "image/jpeg"
@ -280,7 +284,7 @@ Page {
FilePickerPage {
title: fileButton.label
showSystemFiles: false
nameFilters: ["*.pdf", "*.jpg", "*.jpeg", "*.pwg", "*.urf"]
nameFilters: ["*.pdf", "*.jpg", "*.jpeg", "*.ps"]
onSelectedContentPropertiesChanged: {
page.selectedFile = selectedContentProperties.filePath

View file

@ -8,6 +8,11 @@ function supported_formats(printer)
mimetypes.push("application/pdf");
supported.push("PDF");
}
if(has(formats, "application/postscript"))
{
mimetypes.push("application/postscript");
supported.push("Postscript");
}
if(has(formats, "image/jpeg"))
{
mimetypes.push("image/jpeg");
@ -27,6 +32,11 @@ function supported_formats(printer)
mimetypes.push("application/pdf");
maybe.push("PDF");
}
if(!has(supported, "Postscript") && has(info[i].split(":")[1].split(","), "POSTSCRIPT"))
{
mimetypes.push("application/postscript");
maybe.push("Postscript");
}
break;
}
}

View file

@ -10,7 +10,7 @@ Name: harbour-seaprint
Summary: SeaPrint
Version: 0.4.2
Release: 1
Release: 2
Group: Qt/Qt
License: LICENSE
URL: http://example.org/

View file

@ -1,7 +1,7 @@
Name: harbour-seaprint
Summary: SeaPrint
Version: 0.4.2
Release: 1
Release: 2
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Qt/Qt