From dd5db6597d5a128458b6b9b1874f5f58d3748fce Mon Sep 17 00:00:00 2001 From: mkasik Date: Jun 12 2008 10:07:53 +0000 Subject: - Reworked correction of hostname of printer which is the - print job sent to. - Resolves: #248245, #449379 --- diff --git a/gtk2.spec b/gtk2.spec index cf39176..31fb9f0 100644 --- a/gtk2.spec +++ b/gtk2.spec @@ -16,7 +16,7 @@ Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X Name: gtk2 Version: %{base_version} -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/gtk+/2.13/gtk+-%{version}.tar.bz2 @@ -34,6 +34,10 @@ Patch2: workaround.patch # http://bugzilla.gnome.org/show_bug.cgi?id=488119 Patch3: system-log-crash.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=248245 +# https://bugzilla.redhat.com/show_bug.cgi?id=449379 +Patch4: printer-hostname.patch + BuildRequires: atk-devel >= %{atk_version} BuildRequires: pango-devel >= %{pango_version} BuildRequires: glib2-devel >= %{glib2_version} @@ -119,6 +123,7 @@ docs for the GTK+ widget toolkit. %patch1 -p1 -b .set-invisible-char-to-bullet %patch2 -p1 -b .workaround %patch3 -p1 -b .system-log-crash +%patch4 -p0 -b .printer-hostname for i in config.guess config.sub ; do test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . @@ -302,6 +307,11 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-2.0 %changelog +* Wed Jun 11 2008 - Marek Kasik - 2.13.2-2 +- Reworked correction of hostname of printer which is the +- print job sent to. +- Resolves: #248245, #449379 + * Tue Jun 3 2008 Matthias Clasen - 2.13.2-1 - Update to 2.13.2, drop upstreamed patches diff --git a/printer-hostname.patch b/printer-hostname.patch new file mode 100644 index 0000000..ce645a2 --- /dev/null +++ b/printer-hostname.patch @@ -0,0 +1,43 @@ +--- modules/printbackends/cups/gtkprintbackendcups.c 2008-06-03 23:23:22.000000000 +0200 ++++ modules/printbackends/cups/gtkprintbackendcups.c 2008-06-11 13:15:34.000000000 +0200 +@@ -433,6 +433,7 @@ gtk_print_backend_cups_print_stream (Gtk + 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 (Gtk + 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)