cups/0001-scheduler-printers.c-C...

34 lines
1.2 KiB
Diff

From ca866d8a9de27e05f7fc04ad6a2a586089341c53 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 18 Oct 2022 14:12:13 +0200
Subject: [PATCH] scheduler/printers.c: Check for CMYK as well (fixes #421)
In `load_ppd()` we would set the `print-color-mode` to `monochrome` only if
the device supported color printing and the default PPD choice for
ColorModel was RGB - this broke settings for color printing for models,
which use `CMYK` for ColorModel.
With this patch we check for CMYK as well.
CUPS 3.0-
---
scheduler/printers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 3ca91fd45..757f265ce 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -4547,7 +4547,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
ppd_option_t *color_model = ppdFindOption(ppd, "ColorModel");
// ColorModel PPD option
- if (color_model && strcmp(color_model->defchoice, "RGB"))
+ if (color_model && strcmp(color_model->defchoice, "RGB") && strcmp(color_model->defchoice, "CMYK"))
p->num_options = cupsAddOption("print-color-mode", "monochrome", p->num_options, &p->options);
}
}
--
2.39.2