extragear/graphics/digikam/utilities/setup

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

extragear/graphics/digikam/utilities/setup

F.J.Cruz
SVN commit 509959 by fjcruz:

Preference for Rendering Intent from app settings is working now.

CCMAIL:[hidden email] [hidden email]

 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;
             }
 
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel