Really fix printer URI construction
svn path=/trunk/; revision=20360
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
2008-06-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
RH bug 248245 and 449379: cups client printing from gnome
|
||||
applications fail
|
||||
|
||||
* modules/printbackends/cups/gtkprintbackendcups.c: Really fix
|
||||
printer URI construction. Patch by Marek Kasik
|
||||
|
||||
2008-06-12 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
|
||||
|
@ -433,6 +433,7 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend,
|
||||
GtkCupsRequest *request;
|
||||
GtkPrintSettings *settings;
|
||||
const gchar *title;
|
||||
char printer_absolute_uri[HTTP_MAX_URI];
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("CUPS Backend: %s\n", G_STRFUNC));
|
||||
@ -444,12 +445,30 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend,
|
||||
GTK_CUPS_POST,
|
||||
IPP_PRINT_JOB,
|
||||
data_io,
|
||||
cups_printer->hostname,
|
||||
NULL,
|
||||
cups_printer->device_uri);
|
||||
|
||||
#if (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2) || CUPS_VERSION_MAJOR > 1
|
||||
httpAssembleURIf (HTTP_URI_CODING_ALL,
|
||||
printer_absolute_uri,
|
||||
sizeof (printer_absolute_uri),
|
||||
"ipp",
|
||||
NULL,
|
||||
"localhost",
|
||||
ippPort (),
|
||||
"/printers/%s",
|
||||
gtk_printer_get_name (gtk_print_job_get_printer (job)));
|
||||
#else
|
||||
g_snprintf (printer_absolute_uri,
|
||||
sizeof (printer_absolute_uri),
|
||||
"ipp://localhost:%d/printers/%s",
|
||||
ippPort (),
|
||||
gtk_printer_get_name (gtk_print_job_get_printer (job)));
|
||||
#endif
|
||||
|
||||
gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION,
|
||||
IPP_TAG_URI, "printer-uri",
|
||||
NULL, cups_printer->printer_uri);
|
||||
NULL, printer_absolute_uri);
|
||||
|
||||
title = gtk_print_job_get_title (job);
|
||||
if (title)
|
||||
|
Reference in New Issue
Block a user