[Digikam-devel] extragear/graphics/digikam/utilities/setup

Francisco J. Cruz fj.cruz at supercable.es
Wed Feb 15 22:36:59 GMT 2006


SVN commit 509959 by fjcruz:

Preference for Rendering Intent from app settings is working now.

CCMAIL:digikam-devel at kde.org thorsten.schnebeck at gmx.net

 M  +41 -16    setupicc.cpp  


--- trunk/extragear/graphics/digikam/utilities/setup/setupicc.cpp #509958:509959
@@ -237,9 +237,9 @@
 
     d->renderingIntentKC = new KComboBox(false, intents);
     d->renderingIntentKC->insertItem("Perceptual");
-    d->renderingIntentKC->insertItem("Absolute Colorimetric");
     d->renderingIntentKC->insertItem("Relative Colorimetric");
     d->renderingIntentKC->insertItem("Saturation");
+    d->renderingIntentKC->insertItem("Absolute Colorimetric");
     QWhatsThis::add( d->renderingIntentKC, i18n("<ul><li>Perceptual intent causes the full gamut of the image to be compressed or expanded to fill the gamut of the destination device, so that gray balance is preserved but colorimetric accuracy may not be preserved.\n"
     "In other words, if certain colors in an image fall outside of the range of colors that the output device can render, the picture intent will cause all the colors in the image to be adjusted so that the every color in the image falls within the range that can be rendered and so that the relationship between colors is preserved as much as possible.\n"
     "This intent is most suitable for display of photographs and images, and is the default intent.</li>"
@@ -587,42 +587,67 @@
         QFileInfo *fileInfo;
 //         d->mainDialog->enableButtonOK(true);
 
-        m_inICCFiles_description.clear();
-        d->inICCFiles_file.clear();
-        m_monitorICCFiles_description.clear();
-        d->monitorICCFiles_file.clear();
-        m_workICCFiles_description.clear();
-        d->workICCFiles_file.clear();
-        m_proofICCFiles_description.clear();
-        d->proofICCFiles_file.clear();
-
         while ((fileInfo = it.current()) != 0)
         {
             ++it;
             QString fileName = fileInfo->filePath();
             tmpProfile = cmsOpenProfileFromFile(QFile::encodeName(fileName), "r");
             QString profileDescription = QString((cmsTakeProductDesc(tmpProfile)));
-//             kdDebug() << "Device class: " << cmsGetDeviceClass(tmpProfile) << endl;
+            kdDebug() << "Device class: " << cmsGetDeviceClass(tmpProfile) << endl;
 
             switch ((int)cmsGetDeviceClass(tmpProfile))
             {
                 case icSigInputClass:
-                    m_inICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    
+                    if (QString(cmsTakeProductDesc(tmpProfile)).isEmpty())
+                    {
+                        m_inICCFiles_description.append(fileName);
+                    }
+                    else
+                    {
+                        m_inICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    }
                     d->inICCFiles_file.append(fileName);
                     break;
                 case icSigDisplayClass:
-                    m_monitorICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
-                    m_workICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    
+                    if (QString(cmsTakeProductDesc(tmpProfile)).isEmpty())
+                    {
+                        m_monitorICCFiles_description.append(fileName);
+                        m_workICCFiles_description.append(fileName);
+                    }
+                    else
+                    {
+                        m_monitorICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                        m_workICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    }
                     d->monitorICCFiles_file.append(fileName);
                     d->workICCFiles_file.append(fileName);
                     break;
                 case icSigOutputClass:
-                    m_proofICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    if (QString(cmsTakeProductDesc(tmpProfile)).isEmpty())
+                    {
+                        m_proofICCFiles_description.append(fileName);
+                    }
+                    else
+                    {
+                        m_proofICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    }
                     d->proofICCFiles_file.append(fileName);
                     break;
                 case icSigColorSpaceClass:
-                    m_workICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    if(QString(cmsTakeProductDesc(tmpProfile)).isEmpty())
+                    {
+                        m_workICCFiles_description.append(fileName);
+                        m_inICCFiles_description.append(fileName);
+                    }
+                    else
+                    {
+                        m_workICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                        m_inICCFiles_description.append(QString(cmsTakeProductDesc(tmpProfile)));
+                    }
                     d->workICCFiles_file.append(fileName);
+                    d->inICCFiles_file.append(fileName);
                     break;
             }
 



More information about the Digikam-devel mailing list