summaryrefslogtreecommitdiff
path: root/gtk/gtkcustompaperunixdialog.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2008-02-06 23:58:47 +0100
committerChristian Persch <chpe@gnome.org>2009-12-01 17:39:01 +0100
commitefa90e418234f7773370f17e7f7bd47757b71d7b (patch)
tree6c60c3d0c690862b55a395698b8814a5ed3a2033 /gtk/gtkcustompaperunixdialog.c
parente81dacb8e3cf4c16071ecb8a98964d0e06838f40 (diff)
downloadgtk+-efa90e418234f7773370f17e7f7bd47757b71d7b.tar.gz
Allow getting the printer's hard margins
Adds a way to get the unprintable area of the printer. Bug #468989.
Diffstat (limited to 'gtk/gtkcustompaperunixdialog.c')
-rw-r--r--gtk/gtkcustompaperunixdialog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c
index 9006eaba23..a5c9bc9152 100644
--- a/gtk/gtkcustompaperunixdialog.c
+++ b/gtk/gtkcustompaperunixdialog.c
@@ -802,7 +802,8 @@ set_margins_from_printer (GtkCustomPaperUnixDialog *dialog,
gdouble top, bottom, left, right;
top = bottom = left = right = 0;
- _gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right);
+ if (!gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right))
+ return;
priv->non_user_change = TRUE;
unit_widget_set (priv->top_widget, _gtk_print_convert_to_mm (top, GTK_UNIT_POINTS));