# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- HEAD
+++ Modified In Working Tree
@@ -19,7 +19,7 @@
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
 
-#include <lcms.h>
+#include <lcms2.h>
 
 #include <gtk/gtk.h>
 
@@ -152,7 +152,7 @@
   selector_class->set_color  = colorsel_cmyk_set_color;
   selector_class->set_config = colorsel_cmyk_set_config;
 
-  cmsErrorAction (LCMS_ERROR_IGNORE);
+//  cmsErrorAction (LCMS_ERROR_IGNORE);
 }
 
 static void
@@ -391,9 +391,11 @@
 {
   GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
   GimpColorConfig   *config   = module->config;
-  DWORD              flags    = 0;
+  cmsUInt32Number     flags    = 0;
+  cmsUInt32Number     descSize =0;
   cmsHPROFILE        rgb_profile;
   cmsHPROFILE        cmyk_profile;
+  gchar             *descData;
   const gchar       *name;
   gchar             *text;
 
@@ -419,13 +421,34 @@
       ! (cmyk_profile = cmsOpenProfileFromFile (config->cmyk_profile, "r")))
     goto out;
 
-  name = cmsTakeProductDesc (cmyk_profile);
+  descSize = cmsGetProfileInfoASCII(cmyk_profile, cmsInfoDescription, "en", "US", NULL, 0);
+  if (descSize > 0)
+    {
+      descData = (gchar*) g_malloc(descSize + sizeof(gchar));
+      descSize = cmsGetProfileInfoASCII(cmyk_profile, cmsInfoDescription, "en", "US", descData, descSize);
+      if (descSize > 0)
+        {
+          name = descData;
+        }
+    }
+
+//  name = cmsTakeProductDesc (cmyk_profile);
   if (name && ! g_utf8_validate (name, -1, NULL))
     name = _("(invalid UTF-8 string)");
 
   if (! name)
     {
-      name = cmsTakeProductName (cmyk_profile);
+      descSize = cmsGetProfileInfoASCII(cmyk_profile, cmsInfoModel, "en", "US", NULL, 0);
+      if (descSize > 0)
+        {
+          descData = (gchar*) g_malloc(descSize + sizeof(gchar));
+          descSize = cmsGetProfileInfoASCII(cmyk_profile, cmsInfoModel, "en", "US", descData, descSize);
+          if (descSize > 0)
+            {
+              name = descData;
+            }
+        }
+//      name = cmsTakeProductName (cmyk_profile);
       if (name && ! g_utf8_validate (name, -1, NULL))
         name = _("(invalid UTF-8 string)");
     }
