[arch-commits] Commit in gtk2/repos (14 files)

Jan Steffens heftig at archlinux.org
Sat Jan 28 16:25:30 UTC 2012


    Date: Saturday, January 28, 2012 @ 11:25:29
  Author: heftig
Revision: 147944

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  gtk2/repos/extra-i686/PKGBUILD
    (from rev 147943, gtk2/trunk/PKGBUILD)
  gtk2/repos/extra-i686/cups-custom-print.patch
    (from rev 147943, gtk2/trunk/cups-custom-print.patch)
  gtk2/repos/extra-i686/gtk2.install
    (from rev 147943, gtk2/trunk/gtk2.install)
  gtk2/repos/extra-i686/xid-collision-debug.patch
    (from rev 147943, gtk2/trunk/xid-collision-debug.patch)
  gtk2/repos/extra-x86_64/PKGBUILD
    (from rev 147943, gtk2/trunk/PKGBUILD)
  gtk2/repos/extra-x86_64/cups-custom-print.patch
    (from rev 147943, gtk2/trunk/cups-custom-print.patch)
  gtk2/repos/extra-x86_64/gtk2.install
    (from rev 147943, gtk2/trunk/gtk2.install)
  gtk2/repos/extra-x86_64/xid-collision-debug.patch
    (from rev 147943, gtk2/trunk/xid-collision-debug.patch)
Deleted:
  gtk2/repos/extra-i686/PKGBUILD
  gtk2/repos/extra-i686/gtk2.install
  gtk2/repos/extra-i686/xid-collision-debug.patch
  gtk2/repos/extra-x86_64/PKGBUILD
  gtk2/repos/extra-x86_64/gtk2.install
  gtk2/repos/extra-x86_64/xid-collision-debug.patch

----------------------------------------+
 extra-i686/PKGBUILD                    |  114 ++++++++++++++++---------------
 extra-i686/cups-custom-print.patch     |  104 ++++++++++++++++++++++++++++
 extra-i686/gtk2.install                |   32 ++++----
 extra-i686/xid-collision-debug.patch   |   30 ++++----
 extra-x86_64/PKGBUILD                  |  114 ++++++++++++++++---------------
 extra-x86_64/cups-custom-print.patch   |  104 ++++++++++++++++++++++++++++
 extra-x86_64/gtk2.install              |   32 ++++----
 extra-x86_64/xid-collision-debug.patch |   30 ++++----
 8 files changed, 388 insertions(+), 172 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2012-01-28 16:21:35 UTC (rev 147943)
+++ extra-i686/PKGBUILD	2012-01-28 16:25:29 UTC (rev 147944)
@@ -1,55 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgbase=gtk2
-pkgname=('gtk2' 'gtk-update-icon-cache')
-pkgver=2.24.9
-pkgrel=1
-arch=('i686' 'x86_64')
-url="http://www.gtk.org/"
-makedepends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage'
-             'shared-mime-info' 'cairo' 'libcups' 'gdk-pixbuf2' 'gobject-introspection')
-options=('!libtool' '!docs')
-license=('LGPL')
-source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-$pkgver.tar.xz
-        xid-collision-debug.patch)
-sha256sums=('84204bf24cac739fd979943127e7b29cb46b1017684aa24dce630faa01bcb61d'
-            'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558')
-
-build() {
-    cd "$srcdir/gtk+-$pkgver"
-    patch -Np1 -i "$srcdir/xid-collision-debug.patch"
-
-    CXX=/bin/false ./configure --prefix=/usr \
-        --sysconfdir=/etc \
-        --localstatedir=/var \
-        --with-xinput=yes
-
-    #https://bugzilla.gnome.org/show_bug.cgi?id=655517
-    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
-
-    make
-}
-
-package_gtk2() {
-    pkgdesc="GTK+ is a multi-platform toolkit (v2)"
-    install=gtk2.install
-    depends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage' 'shared-mime-info' 'cairo' 'libcups' 'gtk-update-icon-cache')
-    backup=(etc/gtk-2.0/gtkrc)
-
-    cd "$srcdir/gtk+-$pkgver"
-
-    make DESTDIR="$pkgdir" install
-    sed -i "s#env python#env python2#" $pkgdir/usr/bin/gtk-builder-convert
-    echo 'gtk-fallback-icon-theme = "gnome"' > "$pkgdir/etc/gtk-2.0/gtkrc"
-    #split this out to use with gtk3 too
-    rm $pkgdir/usr/bin/gtk-update-icon-cache
-}
-package_gtk-update-icon-cache() {
-    pkgdesc="The GTK+ update icon cache tool"
-    depends=('gdk-pixbuf2')
-
-    cd "$srcdir/gtk+-$pkgver/gtk"
-
-    install -D -m755 gtk-update-icon-cache $pkgdir/usr/bin/gtk-update-icon-cache
-}

Copied: gtk2/repos/extra-i686/PKGBUILD (from rev 147943, gtk2/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgbase=gtk2
+pkgname=('gtk2' 'gtk-update-icon-cache')
+pkgver=2.24.9
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.gtk.org/"
+makedepends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage'
+             'shared-mime-info' 'cairo' 'libcups' 'gdk-pixbuf2' 'gobject-introspection')
+options=('!libtool' '!docs')
+license=('LGPL')
+source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-$pkgver.tar.xz
+        xid-collision-debug.patch cups-custom-print.patch)
+sha256sums=('84204bf24cac739fd979943127e7b29cb46b1017684aa24dce630faa01bcb61d'
+            'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558'
+            '9535c9df19338cbea98ec4b2b5c8e4cef718455938f05c9cf8a08a3805d6b85d')
+
+build() {
+    cd "$srcdir/gtk+-$pkgver"
+    patch -Np1 -i "$srcdir/xid-collision-debug.patch"
+
+    # https://bugzilla.gnome.org/show_bug.cgi?id=543520
+    patch -Rp1 -i "$srcdir/cups-custom-print.patch"
+
+    CXX=/bin/false ./configure --prefix=/usr \
+        --sysconfdir=/etc \
+        --localstatedir=/var \
+        --with-xinput=yes
+
+    # https://bugzilla.gnome.org/show_bug.cgi?id=655517
+    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
+    make
+}
+
+package_gtk2() {
+    pkgdesc="GTK+ is a multi-platform toolkit (v2)"
+    install=gtk2.install
+    depends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage' 'shared-mime-info' 'cairo' 'libcups' 'gtk-update-icon-cache')
+    backup=(etc/gtk-2.0/gtkrc)
+
+    cd "$srcdir/gtk+-$pkgver"
+
+    make DESTDIR="$pkgdir" install
+    sed -i "s#env python#env python2#" $pkgdir/usr/bin/gtk-builder-convert
+    echo 'gtk-fallback-icon-theme = "gnome"' > "$pkgdir/etc/gtk-2.0/gtkrc"
+    #split this out to use with gtk3 too
+    rm $pkgdir/usr/bin/gtk-update-icon-cache
+}
+package_gtk-update-icon-cache() {
+    pkgdesc="The GTK+ update icon cache tool"
+    depends=('gdk-pixbuf2')
+
+    cd "$srcdir/gtk+-$pkgver/gtk"
+
+    install -D -m755 gtk-update-icon-cache $pkgdir/usr/bin/gtk-update-icon-cache
+}

Copied: gtk2/repos/extra-i686/cups-custom-print.patch (from rev 147943, gtk2/trunk/cups-custom-print.patch)
===================================================================
--- extra-i686/cups-custom-print.patch	                        (rev 0)
+++ extra-i686/cups-custom-print.patch	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,104 @@
+From 8170436e61ea68c713d75ad374d22c3261be9203 Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <benjamin at sipsolutions.net>
+Date: Sat, 24 Dec 2011 16:26:32 +0000
+Subject: Set cups Custom print options correctly (bug #543520, patch by Marek Kašík)
+
+This patch fixes the cups print backend to pass Custom options with
+the "Custom." prefix to cups if neccessary.
+---
+diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
+index 14a1b5d..2751ee4 100644
+--- a/modules/printbackends/cups/gtkprintbackendcups.c
++++ b/modules/printbackends/cups/gtkprintbackendcups.c
+@@ -483,22 +483,44 @@ cups_print_cb (GtkPrintBackendCups *print_backend,
+   GDK_THREADS_LEAVE ();  
+ }
+ 
++typedef struct {
++  GtkCupsRequest *request;
++  GtkPrinterOptionSet *options;
++} CupsOptionsData;
++
+ static void
+ add_cups_options (const gchar *key,
+ 		  const gchar *value,
+ 		  gpointer     user_data)
+ {
+-  GtkCupsRequest *request = user_data;
++  CupsOptionsData *data = (CupsOptionsData *) user_data;
++  GtkCupsRequest *request = data->request;
++  GtkPrinterOptionSet *options = data->options;
++  GtkPrinterOption *option = NULL;
++  gchar *new_value = NULL;
+ 
+   if (!g_str_has_prefix (key, "cups-"))
+     return;
+ 
+   if (strcmp (value, "gtk-ignore-value") == 0)
+     return;
++
++  option = gtk_printer_option_set_lookup (options, key);
+   
+   key = key + strlen ("cups-");
+ 
+-  gtk_cups_request_encode_option (request, key, value);
++  /* Add "Custom." prefix to custom values */
++  if (value && option &&
++      !gtk_printer_option_has_choice (option, value))
++    new_value = g_strdup_printf ("Custom.%s", value);
++
++  if (new_value)
++    {
++      gtk_cups_request_encode_option (request, key, new_value);
++      g_free (new_value);
++    }
++  else
++    gtk_cups_request_encode_option (request, key, value);
+ }
+ 
+ static void
+@@ -511,8 +533,12 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend         *print_backend,
+ {
+   GtkPrinterCups *cups_printer;
+   CupsPrintStreamData *ps;
++  CupsOptionsData *options_data;
+   GtkCupsRequest *request;
+   GtkPrintSettings *settings;
++  GtkPrinterOptionSet *options;
++  GtkPrintCapabilities capabilities;
++  GtkPageSetup *page_setup;
+   const gchar *title;
+   char  printer_absolute_uri[HTTP_MAX_URI];
+ 
+@@ -521,6 +547,8 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend         *print_backend,
+ 
+   cups_printer = GTK_PRINTER_CUPS (gtk_print_job_get_printer (job));
+   settings = gtk_print_job_get_settings (job);
++  capabilities = cups_printer_get_capabilities (GTK_PRINTER (cups_printer));
++  page_setup = gtk_printer_get_default_page_size (GTK_PRINTER (cups_printer));
+ 
+   request = gtk_cups_request_new_with_username (NULL,
+                                                 GTK_CUPS_POST,
+@@ -558,8 +586,18 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend         *print_backend,
+                                      IPP_TAG_NAME, "job-name", 
+                                      NULL, title);
+ 
+-  gtk_print_settings_foreach (settings, add_cups_options, request);
+-  
++  options = cups_printer_get_options (GTK_PRINTER (cups_printer), settings, page_setup, capabilities);
++
++  options_data = g_new0 (CupsOptionsData, 1);
++  options_data->request = request;
++  options_data->options = options;
++
++  gtk_print_settings_foreach (settings, add_cups_options, options_data);
++
++  g_object_unref (page_setup);
++  g_object_unref (options);
++  g_free (options_data);
++
+   ps = g_new0 (CupsPrintStreamData, 1);
+   ps->callback = callback;
+   ps->user_data = user_data;
+--
+cgit v0.9.0.2

Deleted: extra-i686/gtk2.install
===================================================================
--- extra-i686/gtk2.install	2012-01-28 16:21:35 UTC (rev 147943)
+++ extra-i686/gtk2.install	2012-01-28 16:25:29 UTC (rev 147944)
@@ -1,16 +0,0 @@
-post_install() {
-  usr/bin/gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules
-}
-
-pre_upgrade() {
-  pre_remove
-}
-
-post_upgrade() {
-  post_install
-}
-
-pre_remove() {
-  rm -f etc/gtk-2.0/gtk.immodules &>/dev/null
-  rm -f etc/gtk-2.0/gdk-pixbuf.loaders &>/dev/null
-}

Copied: gtk2/repos/extra-i686/gtk2.install (from rev 147943, gtk2/trunk/gtk2.install)
===================================================================
--- extra-i686/gtk2.install	                        (rev 0)
+++ extra-i686/gtk2.install	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,16 @@
+post_install() {
+  usr/bin/gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules
+}
+
+pre_upgrade() {
+  pre_remove
+}
+
+post_upgrade() {
+  post_install
+}
+
+pre_remove() {
+  rm -f etc/gtk-2.0/gtk.immodules &>/dev/null
+  rm -f etc/gtk-2.0/gdk-pixbuf.loaders &>/dev/null
+}

Deleted: extra-i686/xid-collision-debug.patch
===================================================================
--- extra-i686/xid-collision-debug.patch	2012-01-28 16:21:35 UTC (rev 147943)
+++ extra-i686/xid-collision-debug.patch	2012-01-28 16:25:29 UTC (rev 147944)
@@ -1,15 +0,0 @@
---- gtk+-2.18.3/gdk/x11/gdkxid.c	2009-06-19 04:59:18.000000000 +0200
-+++ gtk+-2.18.3/gdk/x11/gdkxid.c.new	2009-07-22 11:30:12.000000000 +0200
-@@ -56,10 +56,10 @@
-   if (!display_x11->xid_ht)
-     display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
- 					    (GEqualFunc) gdk_xid_equal);
--
-+/*
-   if (g_hash_table_lookup (display_x11->xid_ht, xid))
-     g_warning ("XID collision, trouble ahead");
--
-+*/
-   g_hash_table_insert (display_x11->xid_ht, xid, data);
- }
- 

Copied: gtk2/repos/extra-i686/xid-collision-debug.patch (from rev 147943, gtk2/trunk/xid-collision-debug.patch)
===================================================================
--- extra-i686/xid-collision-debug.patch	                        (rev 0)
+++ extra-i686/xid-collision-debug.patch	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,15 @@
+--- gtk+-2.18.3/gdk/x11/gdkxid.c	2009-06-19 04:59:18.000000000 +0200
++++ gtk+-2.18.3/gdk/x11/gdkxid.c.new	2009-07-22 11:30:12.000000000 +0200
+@@ -56,10 +56,10 @@
+   if (!display_x11->xid_ht)
+     display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
+ 					    (GEqualFunc) gdk_xid_equal);
+-
++/*
+   if (g_hash_table_lookup (display_x11->xid_ht, xid))
+     g_warning ("XID collision, trouble ahead");
+-
++*/
+   g_hash_table_insert (display_x11->xid_ht, xid, data);
+ }
+ 

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2012-01-28 16:21:35 UTC (rev 147943)
+++ extra-x86_64/PKGBUILD	2012-01-28 16:25:29 UTC (rev 147944)
@@ -1,55 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgbase=gtk2
-pkgname=('gtk2' 'gtk-update-icon-cache')
-pkgver=2.24.9
-pkgrel=1
-arch=('i686' 'x86_64')
-url="http://www.gtk.org/"
-makedepends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage'
-             'shared-mime-info' 'cairo' 'libcups' 'gdk-pixbuf2' 'gobject-introspection')
-options=('!libtool' '!docs')
-license=('LGPL')
-source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-$pkgver.tar.xz
-        xid-collision-debug.patch)
-sha256sums=('84204bf24cac739fd979943127e7b29cb46b1017684aa24dce630faa01bcb61d'
-            'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558')
-
-build() {
-    cd "$srcdir/gtk+-$pkgver"
-    patch -Np1 -i "$srcdir/xid-collision-debug.patch"
-
-    CXX=/bin/false ./configure --prefix=/usr \
-        --sysconfdir=/etc \
-        --localstatedir=/var \
-        --with-xinput=yes
-
-    #https://bugzilla.gnome.org/show_bug.cgi?id=655517
-    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
-
-    make
-}
-
-package_gtk2() {
-    pkgdesc="GTK+ is a multi-platform toolkit (v2)"
-    install=gtk2.install
-    depends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage' 'shared-mime-info' 'cairo' 'libcups' 'gtk-update-icon-cache')
-    backup=(etc/gtk-2.0/gtkrc)
-
-    cd "$srcdir/gtk+-$pkgver"
-
-    make DESTDIR="$pkgdir" install
-    sed -i "s#env python#env python2#" $pkgdir/usr/bin/gtk-builder-convert
-    echo 'gtk-fallback-icon-theme = "gnome"' > "$pkgdir/etc/gtk-2.0/gtkrc"
-    #split this out to use with gtk3 too
-    rm $pkgdir/usr/bin/gtk-update-icon-cache
-}
-package_gtk-update-icon-cache() {
-    pkgdesc="The GTK+ update icon cache tool"
-    depends=('gdk-pixbuf2')
-
-    cd "$srcdir/gtk+-$pkgver/gtk"
-
-    install -D -m755 gtk-update-icon-cache $pkgdir/usr/bin/gtk-update-icon-cache
-}

Copied: gtk2/repos/extra-x86_64/PKGBUILD (from rev 147943, gtk2/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgbase=gtk2
+pkgname=('gtk2' 'gtk-update-icon-cache')
+pkgver=2.24.9
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.gtk.org/"
+makedepends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage'
+             'shared-mime-info' 'cairo' 'libcups' 'gdk-pixbuf2' 'gobject-introspection')
+options=('!libtool' '!docs')
+license=('LGPL')
+source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-$pkgver.tar.xz
+        xid-collision-debug.patch cups-custom-print.patch)
+sha256sums=('84204bf24cac739fd979943127e7b29cb46b1017684aa24dce630faa01bcb61d'
+            'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558'
+            '9535c9df19338cbea98ec4b2b5c8e4cef718455938f05c9cf8a08a3805d6b85d')
+
+build() {
+    cd "$srcdir/gtk+-$pkgver"
+    patch -Np1 -i "$srcdir/xid-collision-debug.patch"
+
+    # https://bugzilla.gnome.org/show_bug.cgi?id=543520
+    patch -Rp1 -i "$srcdir/cups-custom-print.patch"
+
+    CXX=/bin/false ./configure --prefix=/usr \
+        --sysconfdir=/etc \
+        --localstatedir=/var \
+        --with-xinput=yes
+
+    # https://bugzilla.gnome.org/show_bug.cgi?id=655517
+    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
+    make
+}
+
+package_gtk2() {
+    pkgdesc="GTK+ is a multi-platform toolkit (v2)"
+    install=gtk2.install
+    depends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage' 'shared-mime-info' 'cairo' 'libcups' 'gtk-update-icon-cache')
+    backup=(etc/gtk-2.0/gtkrc)
+
+    cd "$srcdir/gtk+-$pkgver"
+
+    make DESTDIR="$pkgdir" install
+    sed -i "s#env python#env python2#" $pkgdir/usr/bin/gtk-builder-convert
+    echo 'gtk-fallback-icon-theme = "gnome"' > "$pkgdir/etc/gtk-2.0/gtkrc"
+    #split this out to use with gtk3 too
+    rm $pkgdir/usr/bin/gtk-update-icon-cache
+}
+package_gtk-update-icon-cache() {
+    pkgdesc="The GTK+ update icon cache tool"
+    depends=('gdk-pixbuf2')
+
+    cd "$srcdir/gtk+-$pkgver/gtk"
+
+    install -D -m755 gtk-update-icon-cache $pkgdir/usr/bin/gtk-update-icon-cache
+}

Copied: gtk2/repos/extra-x86_64/cups-custom-print.patch (from rev 147943, gtk2/trunk/cups-custom-print.patch)
===================================================================
--- extra-x86_64/cups-custom-print.patch	                        (rev 0)
+++ extra-x86_64/cups-custom-print.patch	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,104 @@
+From 8170436e61ea68c713d75ad374d22c3261be9203 Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <benjamin at sipsolutions.net>
+Date: Sat, 24 Dec 2011 16:26:32 +0000
+Subject: Set cups Custom print options correctly (bug #543520, patch by Marek Kašík)
+
+This patch fixes the cups print backend to pass Custom options with
+the "Custom." prefix to cups if neccessary.
+---
+diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
+index 14a1b5d..2751ee4 100644
+--- a/modules/printbackends/cups/gtkprintbackendcups.c
++++ b/modules/printbackends/cups/gtkprintbackendcups.c
+@@ -483,22 +483,44 @@ cups_print_cb (GtkPrintBackendCups *print_backend,
+   GDK_THREADS_LEAVE ();  
+ }
+ 
++typedef struct {
++  GtkCupsRequest *request;
++  GtkPrinterOptionSet *options;
++} CupsOptionsData;
++
+ static void
+ add_cups_options (const gchar *key,
+ 		  const gchar *value,
+ 		  gpointer     user_data)
+ {
+-  GtkCupsRequest *request = user_data;
++  CupsOptionsData *data = (CupsOptionsData *) user_data;
++  GtkCupsRequest *request = data->request;
++  GtkPrinterOptionSet *options = data->options;
++  GtkPrinterOption *option = NULL;
++  gchar *new_value = NULL;
+ 
+   if (!g_str_has_prefix (key, "cups-"))
+     return;
+ 
+   if (strcmp (value, "gtk-ignore-value") == 0)
+     return;
++
++  option = gtk_printer_option_set_lookup (options, key);
+   
+   key = key + strlen ("cups-");
+ 
+-  gtk_cups_request_encode_option (request, key, value);
++  /* Add "Custom." prefix to custom values */
++  if (value && option &&
++      !gtk_printer_option_has_choice (option, value))
++    new_value = g_strdup_printf ("Custom.%s", value);
++
++  if (new_value)
++    {
++      gtk_cups_request_encode_option (request, key, new_value);
++      g_free (new_value);
++    }
++  else
++    gtk_cups_request_encode_option (request, key, value);
+ }
+ 
+ static void
+@@ -511,8 +533,12 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend         *print_backend,
+ {
+   GtkPrinterCups *cups_printer;
+   CupsPrintStreamData *ps;
++  CupsOptionsData *options_data;
+   GtkCupsRequest *request;
+   GtkPrintSettings *settings;
++  GtkPrinterOptionSet *options;
++  GtkPrintCapabilities capabilities;
++  GtkPageSetup *page_setup;
+   const gchar *title;
+   char  printer_absolute_uri[HTTP_MAX_URI];
+ 
+@@ -521,6 +547,8 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend         *print_backend,
+ 
+   cups_printer = GTK_PRINTER_CUPS (gtk_print_job_get_printer (job));
+   settings = gtk_print_job_get_settings (job);
++  capabilities = cups_printer_get_capabilities (GTK_PRINTER (cups_printer));
++  page_setup = gtk_printer_get_default_page_size (GTK_PRINTER (cups_printer));
+ 
+   request = gtk_cups_request_new_with_username (NULL,
+                                                 GTK_CUPS_POST,
+@@ -558,8 +586,18 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend         *print_backend,
+                                      IPP_TAG_NAME, "job-name", 
+                                      NULL, title);
+ 
+-  gtk_print_settings_foreach (settings, add_cups_options, request);
+-  
++  options = cups_printer_get_options (GTK_PRINTER (cups_printer), settings, page_setup, capabilities);
++
++  options_data = g_new0 (CupsOptionsData, 1);
++  options_data->request = request;
++  options_data->options = options;
++
++  gtk_print_settings_foreach (settings, add_cups_options, options_data);
++
++  g_object_unref (page_setup);
++  g_object_unref (options);
++  g_free (options_data);
++
+   ps = g_new0 (CupsPrintStreamData, 1);
+   ps->callback = callback;
+   ps->user_data = user_data;
+--
+cgit v0.9.0.2

Deleted: extra-x86_64/gtk2.install
===================================================================
--- extra-x86_64/gtk2.install	2012-01-28 16:21:35 UTC (rev 147943)
+++ extra-x86_64/gtk2.install	2012-01-28 16:25:29 UTC (rev 147944)
@@ -1,16 +0,0 @@
-post_install() {
-  usr/bin/gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules
-}
-
-pre_upgrade() {
-  pre_remove
-}
-
-post_upgrade() {
-  post_install
-}
-
-pre_remove() {
-  rm -f etc/gtk-2.0/gtk.immodules &>/dev/null
-  rm -f etc/gtk-2.0/gdk-pixbuf.loaders &>/dev/null
-}

Copied: gtk2/repos/extra-x86_64/gtk2.install (from rev 147943, gtk2/trunk/gtk2.install)
===================================================================
--- extra-x86_64/gtk2.install	                        (rev 0)
+++ extra-x86_64/gtk2.install	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,16 @@
+post_install() {
+  usr/bin/gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules
+}
+
+pre_upgrade() {
+  pre_remove
+}
+
+post_upgrade() {
+  post_install
+}
+
+pre_remove() {
+  rm -f etc/gtk-2.0/gtk.immodules &>/dev/null
+  rm -f etc/gtk-2.0/gdk-pixbuf.loaders &>/dev/null
+}

Deleted: extra-x86_64/xid-collision-debug.patch
===================================================================
--- extra-x86_64/xid-collision-debug.patch	2012-01-28 16:21:35 UTC (rev 147943)
+++ extra-x86_64/xid-collision-debug.patch	2012-01-28 16:25:29 UTC (rev 147944)
@@ -1,15 +0,0 @@
---- gtk+-2.18.3/gdk/x11/gdkxid.c	2009-06-19 04:59:18.000000000 +0200
-+++ gtk+-2.18.3/gdk/x11/gdkxid.c.new	2009-07-22 11:30:12.000000000 +0200
-@@ -56,10 +56,10 @@
-   if (!display_x11->xid_ht)
-     display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
- 					    (GEqualFunc) gdk_xid_equal);
--
-+/*
-   if (g_hash_table_lookup (display_x11->xid_ht, xid))
-     g_warning ("XID collision, trouble ahead");
--
-+*/
-   g_hash_table_insert (display_x11->xid_ht, xid, data);
- }
- 

Copied: gtk2/repos/extra-x86_64/xid-collision-debug.patch (from rev 147943, gtk2/trunk/xid-collision-debug.patch)
===================================================================
--- extra-x86_64/xid-collision-debug.patch	                        (rev 0)
+++ extra-x86_64/xid-collision-debug.patch	2012-01-28 16:25:29 UTC (rev 147944)
@@ -0,0 +1,15 @@
+--- gtk+-2.18.3/gdk/x11/gdkxid.c	2009-06-19 04:59:18.000000000 +0200
++++ gtk+-2.18.3/gdk/x11/gdkxid.c.new	2009-07-22 11:30:12.000000000 +0200
+@@ -56,10 +56,10 @@
+   if (!display_x11->xid_ht)
+     display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
+ 					    (GEqualFunc) gdk_xid_equal);
+-
++/*
+   if (g_hash_table_lookup (display_x11->xid_ht, xid))
+     g_warning ("XID collision, trouble ahead");
+-
++*/
+   g_hash_table_insert (display_x11->xid_ht, xid, data);
+ }
+ 




More information about the arch-commits mailing list