]> Pileus Git - ~andy/gtk/commitdiff
fix 345038
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 16 Jun 2006 05:08:14 +0000 (05:08 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 16 Jun 2006 05:08:14 +0000 (05:08 +0000)
ChangeLog
ChangeLog.pre-2-10
modules/printbackends/cups/gtkprintbackendcups.c

index 0767a03389085f0fede81b35db5b4f0ee630e9f2..8f0414a4bbe287d3f1ded2a2c268a9e649f24ebc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+2006-06-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c: Include
+       gtkprinter-private.h  (#345038, Christian Persch)
 2006-06-15  Matthias Clasen  <mclasen@redhat.com>
 
-       * modules/printbackends/pdf/gtkprintbackendcups.c: Use the
+       * modules/printbackends/pdf/gtkprintbackendpdf.c: Use the
        stock floppy icon.
 
        * gtk/gtkprintoperation-unix.c: Set the GENERATE_PDF capability
index 0767a03389085f0fede81b35db5b4f0ee630e9f2..8f0414a4bbe287d3f1ded2a2c268a9e649f24ebc 100644 (file)
@@ -1,6 +1,11 @@
+2006-06-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c: Include
+       gtkprinter-private.h  (#345038, Christian Persch)
 2006-06-15  Matthias Clasen  <mclasen@redhat.com>
 
-       * modules/printbackends/pdf/gtkprintbackendcups.c: Use the
+       * modules/printbackends/pdf/gtkprintbackendpdf.c: Use the
        stock floppy icon.
 
        * gtk/gtkprintoperation-unix.c: Set the GENERATE_PDF capability
index 54434c23ce86f48dc7f4f60841da15e46eb64cc4..574b7dd76b4df0db0dc8c48b485a5e0ca58fc641 100644 (file)
@@ -41,6 +41,7 @@
 #include <gtk/gtkprintsettings.h>
 #include <gtk/gtkprintbackend.h>
 #include <gtk/gtkprinter.h>
+#include <gtk/gtkprinter-private.h>
 
 #include "gtkprintbackendcups.h"
 #include "gtkprintercups.h"
@@ -151,6 +152,7 @@ static void                 gtk_print_backend_cups_print_stream    (GtkPrintBack
                                                                    gpointer                           user_data,
                                                                    GDestroyNotify                     dnotify);
 static cairo_surface_t *    cups_printer_create_cairo_surface      (GtkPrinter                        *printer,
+                                                                   GtkPrintSettings                  *settings,
                                                                    gdouble                            width,
                                                                    gdouble                            height,
                                                                    gint                               cache_fd);
@@ -266,6 +268,7 @@ _cairo_write_to_cups (void *cache_fd_as_pointer,
 
 static cairo_surface_t *
 cups_printer_create_cairo_surface (GtkPrinter *printer,
+                                  GtkPrintSettings *settings,
                                   gdouble width, 
                                   gdouble height,
                                   gint cache_fd)
@@ -277,7 +280,7 @@ cups_printer_create_cairo_surface (GtkPrinter *printer,
   surface = cairo_ps_surface_create_for_stream  (_cairo_write_to_cups, GINT_TO_POINTER (cache_fd), width, height);
 
   /* TODO: DPI from settings object? */
-  cairo_ps_surface_set_dpi (surface, 300, 300);
+  cairo_surface_set_fallback_resolution (surface, 300, 300);
 
   return surface;
 }
@@ -1180,7 +1183,7 @@ cups_request_ppd (GtkPrinter      *printer)
   cups_printer = GTK_PRINTER_CUPS (printer);
 
   error = NULL;
-
+  /* FIXME this can return NULL! */
   http = httpConnectEncrypt(cups_printer->hostname, 
                             cups_printer->port,
                             cupsEncryption());
@@ -1219,7 +1222,7 @@ cups_request_ppd (GtkPrinter      *printer)
   cups_printer->reading_ppd = TRUE;
 
   print_backend = gtk_printer_get_backend (printer);
+
   cups_request_execute (GTK_PRINT_BACKEND_CUPS (print_backend),
                         request,
                         (GtkPrintCupsResponseCallbackFunc) cups_request_ppd_cb,