summaryrefslogtreecommitdiff
path: root/src/main/print-papers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/print-papers.c')
-rw-r--r--src/main/print-papers.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/print-papers.c b/src/main/print-papers.c
index 1164c27..79dd59a 100644
--- a/src/main/print-papers.c
+++ b/src/main/print-papers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-papers.c,v 1.35 2004/09/17 18:38:25 rleigh Exp $"
+ * "$Id: print-papers.c,v 1.38 2008/01/15 03:48:46 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -270,6 +270,7 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
"bottom",
"top",
"unit",
+ "type",
NULL
};*/
stp_papersize_t *outpaper; /* Generated paper */
@@ -300,6 +301,7 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
outpaper->left = 0;
outpaper->bottom = 0;
outpaper->right = 0;
+ outpaper->paper_size_type = PAPERSIZE_TYPE_STANDARD;
if (outpaper->name)
id = 1;
@@ -378,10 +380,21 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
unit = 1;
}
}
+ if (!strcmp(prop_name, "type"))
+ {
+ stmp = stp_mxmlElementGetAttr(prop, "value");
+ if (stmp)
+ {
+ if (!strcmp(stmp, "envelope"))
+ outpaper->paper_size_type = PAPERSIZE_TYPE_ENVELOPE;
+ else
+ outpaper->paper_size_type = PAPERSIZE_TYPE_STANDARD;
+ }
+ }
}
prop = prop->next;
}
- if (id && name && width && height && unit) /* Margins are optional */
+ if (id && name && width && height && unit) /* Margins and type are optional */
return outpaper;
stp_free(outpaper);
outpaper = NULL;