X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkcustompaperunixdialog.c;h=8d95a11f87678323e37a2c1aebf2bb2f4a444266;hb=cb115a65a6a086f13d14938b22cedd07c39a7f6d;hp=9006eaba230af4dc5970fbfa8f0f6449ca9bc718;hpb=c229306a18f6453c144397bfbbf2284afa9731eb;p=~andy%2Fgtk diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index 9006eaba2..8d95a11f8 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -39,7 +39,6 @@ #include "gtkcustompaperunixdialog.h" #include "gtkprintbackend.h" #include "gtkprintutils.h" -#include "gtkprinter-private.h" #include "gtkalias.h" #define CUSTOM_PAPER_FILENAME ".gtk-custom-papers" @@ -355,8 +354,8 @@ gtk_custom_paper_unix_dialog_finalize (GObject *object) /** * gtk_custom_paper_unix_dialog_new: - * @title: the title of the dialog, or %NULL - * @parent: transient parent of the dialog, or %NULL + * @title: (allow-none): the title of the dialog, or %NULL + * @parent: (allow-none): transient parent of the dialog, or %NULL * * Creates a new custom paper dialog. * @@ -802,7 +801,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));