]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler/printers.c: Check for CMYK as well (fixes #421) 500/head
authorZdenek Dohnal <zdohnal@redhat.com>
Tue, 18 Oct 2022 12:12:13 +0000 (14:12 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Tue, 18 Oct 2022 12:12:13 +0000 (14:12 +0200)
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

index 3ca91fd4551ac532119bcb092685cf3500550924..757f265cea0246175dcbd321b6b9ee8288c13c38 100644 (file)
@@ -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);
       }
     }