summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation-unix.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2009-11-21 20:07:14 +1030
committerChristian Persch <chpe@gnome.org>2009-12-01 17:39:26 +0100
commit826d800b7420d1030337f46a6a742537a85f13f1 (patch)
tree938d88684daa8e196ecb28773ea1ed6ea7561bbf /gtk/gtkprintoperation-unix.c
parentefa90e418234f7773370f17e7f7bd47757b71d7b (diff)
downloadgtk+-826d800b7420d1030337f46a6a742537a85f13f1.tar.gz
Set unix printer hard margins on print context
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r--gtk/gtkprintoperation-unix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index a36eced955..5940600b76 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -538,12 +538,16 @@ finish_print (PrintResponseData *rdata,
GtkPrintOperation *op = rdata->op;
GtkPrintOperationPrivate *priv = op->priv;
GtkPrintJob *job;
+ gdouble top, bottom, left, right;
if (rdata->do_print)
{
gtk_print_operation_set_print_settings (op, settings);
priv->print_context = _gtk_print_context_new (op);
+ if (gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right))
+ _gtk_print_context_set_hard_margins (priv->print_context, top, bottom, left, right);
+
if (page_setup != NULL &&
(gtk_print_operation_get_default_page_setup (op) == NULL ||
page_setup_set))