From: Michael R Sweet Date: Fri, 5 Apr 2024 12:47:03 +0000 (-0400) Subject: Allow PPD choices and PWG keywords to select media (Issue #238) X-Git-Tag: v2.4.8~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d03e33c562144c8f22b5560dfae2cdd66df774b6;p=thirdparty%2Fcups.git Allow PPD choices and PWG keywords to select media (Issue #238) --- diff --git a/CHANGES.md b/CHANGES.md index edbd0bbf8d..ea219084fb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Changes in CUPS v2.4.8 (TBA) - Updated IPP Everywhere printer creation error reporting (Issue #347) - Raised `cups_enum_dests()` timeout for listing available IPP printers (Issue #751) +- Fixed mapping of PPD InputSlot, MediaType, and OutputBin values (Issue #238) - Fixed the web interface not showing an error for a non-existent printer (Issue #423) - Fixed printing of jobs with job name longer than 255 chars on older printers diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 711a29f99d..6732d14cf2 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -2365,7 +2365,7 @@ ppd_inputslot_for_keyword( return (NULL); for (i = 0; i < pc->num_sources; i ++) - if (!_cups_strcasecmp(keyword, pc->sources[i].pwg)) + if (!_cups_strcasecmp(keyword, pc->sources[i].pwg) || !_cups_strcasecmp(keyword, pc->sources[i].ppd)) return (pc->sources[i].ppd); return (NULL); @@ -2479,7 +2479,7 @@ _ppdCacheGetMediaType( int i; /* Looping var */ for (i = 0; i < pc->num_types; i ++) - if (!_cups_strcasecmp(keyword, pc->types[i].pwg)) + if (!_cups_strcasecmp(keyword, pc->types[i].pwg) || !_cups_strcasecmp(keyword, pc->types[i].ppd)) return (pc->types[i].ppd); } @@ -2513,7 +2513,7 @@ _ppdCacheGetOutputBin( for (i = 0; i < pc->num_bins; i ++) - if (!_cups_strcasecmp(output_bin, pc->bins[i].pwg)) + if (!_cups_strcasecmp(output_bin, pc->bins[i].pwg) || !_cups_strcasecmp(output_bin, pc->bins[i].ppd)) return (pc->bins[i].ppd); return (NULL);