diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-02-15 19:25:01 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-02-15 19:25:01 -0300 |
commit | ecec4d4d3ca64d7929f1f63857e82268798e066b (patch) | |
tree | dfc5421b1f5460a449502c66d612e1132ec5d49f /extra/gtk2 | |
parent | eddd84528e605047a994ee8d652ba99686a412fc (diff) | |
parent | 1ffabe284d9f5a4ac055941d9817af71be1e5b54 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/binutils-avr/PKGBUILD
community/freecol/PKGBUILD
community/gcc-avr/PKGBUILD
community/lightspark/PKGBUILD
community/lorcon-old-svn/PKGBUILD
community/mdf2iso/PKGBUILD
community/pylorcon/PKGBUILD
community/qbittorrent/PKGBUILD
community/remmina-plugins/PKGBUILD
community/systemd/PKGBUILD
community/texmaker/PKGBUILD
extra/pyqt/PKGBUILD
extra/uim/PKGBUILD
extra/wesnoth/PKGBUILD
libre/kdenetwork-libre/PKGBUILD
multilib-testing/lib32-glibc/PKGBUILD
multilib-testing/lib32-glibc/glibc-2.15-strcasecmp-disable-avx.patch
multilib-testing/lib32-libxcb/PKGBUILD
multilib/libtool-multilib/PKGBUILD
multilib/libtool-multilib/libtool.install
testing/glibc/PKGBUILD
testing/shadow/PKGBUILD
testing/xf86-video-savage/PKGBUILD
Diffstat (limited to 'extra/gtk2')
-rw-r--r-- | extra/gtk2/cups-custom-print.patch | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/extra/gtk2/cups-custom-print.patch b/extra/gtk2/cups-custom-print.patch deleted file mode 100644 index ffc89aa32..000000000 --- a/extra/gtk2/cups-custom-print.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 8170436e61ea68c713d75ad374d22c3261be9203 Mon Sep 17 00:00:00 2001 -From: Benjamin Berg <benjamin@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 |