From be8f3c72ea1ae469f7f1fa29be40f9e750f9f1ee Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 21 Jun 2006 18:16:58 +0000 Subject: Apply a patch by John Palmieri to use buffered io using GIOChannels, clean 2006-06-21 Matthias Clasen Apply a patch by John Palmieri to use buffered io using GIOChannels, clean up error handling and support Cups 1.2 api in the printing code. * acconfig.h: * configure.in: Detect Cups 1.2 * gtk/gtkdebug.h: * gtk/gtkmain.c: Add a printing debug key. * gtk/gtkprintbackend.[hc]: Remove the GError parameter from gtk_print_backend_print_stream, and take a GIOChannel instead of an fd. * gtk/gtkprinter-private.h: * gtk/gtkprinter.c: Replace the fd parameter of _gtk_printer_create_cairo_surface by a GIOChannel. * gtk/gtkprintjob.[hc]: Remove the GError parameter from gtk_print_job_send and make it return void. * gtk/gtkprintoperation-unix.c: * gtk/gtkprintjob.c: Adjust callers, add some debugging support. * modules/printbackends/Makefile.am: Fix DIST_SUBDIRS. * modules/printbackends/cups/Makefile.am: * modules/printbackends/lpr/Makefile.am: Add debug CFLAGS. * modules/printbackends/cups/gtkcupsutils.[hc]: * modules/printbackends/cups/gtkprintbackendcups.c: * modules/printbackends/file/gtkprintbackendfile.c: * modules/printbackends/lpr/gtkprintbackendfile.c: Adapt to the GIOChannel and GError changes, add debug output --- gtk/gtkprintbackend.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gtk/gtkprintbackend.c') diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c index 137312f499..14d6aedcd2 100644 --- a/gtk/gtkprintbackend.c +++ b/gtk/gtkprintbackend.c @@ -576,21 +576,19 @@ gtk_print_backend_find_printer (GtkPrintBackend *backend, void gtk_print_backend_print_stream (GtkPrintBackend *backend, GtkPrintJob *job, - gint data_fd, + GIOChannel *data_io, GtkPrintJobCompleteFunc callback, gpointer user_data, - GDestroyNotify dnotify, - GError **error) + GDestroyNotify dnotify) { g_return_if_fail (GTK_IS_PRINT_BACKEND (backend)); GTK_PRINT_BACKEND_GET_CLASS (backend)->print_stream (backend, job, - data_fd, + data_io, callback, user_data, - dnotify, - error); + dnotify); } void -- cgit v1.2.1