]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Allow PPD choices and PWG keywords to select media (Issue #238)
authorMichael R Sweet <msweet@msweet.org>
Fri, 5 Apr 2024 12:47:03 +0000 (08:47 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 5 Apr 2024 12:47:03 +0000 (08:47 -0400)
CHANGES.md
cups/ppd-cache.c

index edbd0bbf8d108af123130d2d158b036f400915a1..ea219084fbff373fbc24be9006751aed42b4c259 100644 (file)
@@ -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
index 711a29f99d78f6ac63cb00f99ff1bb73e9213abe..6732d14cf21c1744f6f5b71e661240bc61b45b52 100644 (file)
@@ -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);