Ticket #14547: gnomecups.patch

File gnomecups.patch, 1.2 KB (added by mandrake@…, 17 years ago)

patch that should fix printing w/ gnomecups

Line 
1diff -Nurd -x'*~' libgnomecups-0.2.3.orig/libgnomecups/gnome-cups-request.c
2libgnomecups-0.2.3/libgnomecups/gnome-cups-request.c
3--- libgnomecups-0.2.3.orig/libgnomecups/gnome-cups-request.c   2007-01-31
413:49:17.000000000 -0500
5+++ libgnomecups-0.2.3/libgnomecups/gnome-cups-request.c        2008-01-28
623:04:53.000000000 -0500
7@@ -393,15 +393,22 @@
8        return ret;
9 }
10 
11+// ippNewRequest not available in cups on 10.4.11 (but maybe in 10.4.0uSDK?)
12+// revive libgnomecups-0.2.2 incantation for some of gnome_cups_request_new()
13 ipp_t *
14 gnome_cups_request_new (int operation_id)
15 {
16        cups_lang_t *language;
17        ipp_t *request;
18       
19-       request = ippNewRequest (operation_id);
20+       request = ippNew ();
21+       request->request.op.operation_id = operation_id;
22+       request->request.op.request_id = 1;
23       
24        language = cupsLangDefault ();
25+       ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
26+                    "attributes-charset",
27+                    NULL, "utf-8");
28        ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
29                      "attributes-natural-language",
30                      NULL, language->language);