]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix ICC profile localization, and add APCustomColorMatchingName attribute
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 23 Mar 2007 21:56:48 +0000 (21:56 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 23 Mar 2007 21:56:48 +0000 (21:56 +0000)
localization.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6387 7a7537e8-13f0-0310-91df-b6672ffda945

cups/localize.c

index 3c5128a46994e403773935eb1f25a774f3c31a40..06a2fa639e0b71701281bd62fe34fe1d7cb34a02 100644 (file)
@@ -156,12 +156,25 @@ ppdLocalize(ppd_file_t *ppd)              /* I - PPD file */
   * Translate ICC profile names...
   */
 
+  if ((attr = ppdFindAttr(ppd, "APCustomColorMatchingName", NULL)) != NULL)
+  {
+    if ((text = ppd_text(ppd, "APCustomColorMachingName", attr->spec,
+                         ll_CC, ll)) != NULL)
+      strlcpy(attr->text, text, sizeof(attr->text));
+  }
+
   for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
        attr;
        attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
-    if ((text = ppd_text(ppd, "cupsICCProfile", attr->name, ll_CC, ll)) != NULL)
+  {
+    cupsArraySave(ppd->sorted_attrs);
+
+    if ((text = ppd_text(ppd, "cupsICCProfile", attr->spec, ll_CC, ll)) != NULL)
       strlcpy(attr->text, text, sizeof(attr->text));
 
+    cupsArrayRestore(ppd->sorted_attrs);
+  }
+
   return (0);
 }