diff options
Diffstat (limited to 'modules/printbackends')
-rw-r--r-- | modules/printbackends/cups/gtkcupsutils.c | 19 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 3 |
2 files changed, 12 insertions, 10 deletions
diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c index e2e4b157a..db790c89d 100644 --- a/modules/printbackends/cups/gtkcupsutils.c +++ b/modules/printbackends/cups/gtkcupsutils.c @@ -364,10 +364,15 @@ _find_option_tag (const gchar *option) } } +/* + * Note that this function uses IPP_TAG_JOB, so it is + * only suitable for IPP Group 2 attributes. + * See RFC 2911. + */ void gtk_cups_request_encode_option (GtkCupsRequest *request, const gchar *option, - const gchar *value) + const gchar *value) { ipp_tag_t option_tag; @@ -391,7 +396,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, case IPP_TAG_INTEGER: case IPP_TAG_ENUM: ippAddInteger (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option_tag, option, strtol (value, NULL, 0)); @@ -407,7 +412,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, b = 1; ippAddBoolean(request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option, b); @@ -439,7 +444,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, upper = lower; ippAddRange (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option, lower, upper); @@ -467,7 +472,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, units = IPP_RES_PER_INCH; ippAddResolution (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option, units, xres, @@ -526,7 +531,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, { /* single value */ ippAddString (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option_tag, option, NULL, @@ -540,7 +545,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, g_ptr_array_add (strings, next); ippAddStrings (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option_tag, option, strings->len, diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 8351325fb..0002bd340 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -422,9 +422,6 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend, gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, cups_printer->printer_uri); - gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", - NULL, cupsUser()); - title = gtk_print_job_get_title (job); if (title) gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, |