diff options
author | Christian Persch <chpe@gnome.org> | 2008-02-06 23:58:47 +0100 |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2009-12-01 17:39:01 +0100 |
commit | efa90e418234f7773370f17e7f7bd47757b71d7b (patch) | |
tree | 6c60c3d0c690862b55a395698b8814a5ed3a2033 /modules | |
parent | e81dacb8e3cf4c16071ecb8a98964d0e06838f40 (diff) | |
download | gtk+-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 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 0bae98fac2..f98364aca9 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -158,11 +158,11 @@ static GtkPageSetup * cups_printer_get_default_page_size (GtkPrinter static void cups_printer_request_details (GtkPrinter *printer); static gboolean cups_request_default_printer (GtkPrintBackendCups *print_backend); static gboolean cups_request_ppd (GtkPrinter *printer); -static void cups_printer_get_hard_margins (GtkPrinter *printer, - double *top, - double *bottom, - double *left, - double *right); +static gboolean cups_printer_get_hard_margins (GtkPrinter *printer, + gdouble *top, + gdouble *bottom, + gdouble *left, + gdouble *right); static GtkPrintCapabilities cups_printer_get_capabilities (GtkPrinter *printer); static void set_option_from_settings (GtkPrinterOption *option, GtkPrintSettings *setting); @@ -4428,7 +4428,7 @@ cups_printer_get_default_page_size (GtkPrinter *printer) return create_page_setup (ppd_file, size); } -static void +static gboolean cups_printer_get_hard_margins (GtkPrinter *printer, gdouble *top, gdouble *bottom, @@ -4439,12 +4439,14 @@ cups_printer_get_hard_margins (GtkPrinter *printer, ppd_file = gtk_printer_cups_get_ppd (GTK_PRINTER_CUPS (printer)); if (ppd_file == NULL) - return; + return FALSE; *left = ppd_file->custom_margins[0]; *bottom = ppd_file->custom_margins[1]; *right = ppd_file->custom_margins[2]; *top = ppd_file->custom_margins[3]; + + return TRUE; } static GtkPrintCapabilities |