[Digikam-devel] extragear/graphics/digikam/imageplugins

Francisco J. Cruz fj.cruz at supercable.es
Wed May 31 12:01:06 BST 2006


SVN commit 546902 by fjcruz:

A info message is showed if icc profiles path is not valid anymore. In adittion, "Default profiles" options are disabled.

Gilles, if it's right for you, can you remove from TODO list? or drop me a mail and i'll do it.

CCMAIL: caulier.gilles at kdemail.net , Digikam-devel at kde.org

 M  +15 -4     imageeffect_iccproof.cpp  


--- trunk/extragear/graphics/digikam/imageplugins/imageeffect_iccproof.cpp #546901:546902
@@ -37,6 +37,7 @@
 #include <qwhatsthis.h>
 #include <qtooltip.h>
 #include <qradiobutton.h>
+#include <qfile.h>
 
 // KDE includes.
 
@@ -789,10 +790,20 @@
         spacePath   = config->readPathEntry("WorkProfileFile");
         displayPath = config->readPathEntry("MonitorProfileFile");
         proofPath   = config->readPathEntry("ProofProfileFile");
-        m_displayProfileCB->setURL(config->readPathEntry("DefaultPath")); 
-        m_inProfilesCB->setURL(config->readPathEntry("DefaultPath")); 
-        m_proofProfileCB->setURL(config->readPathEntry("DefaultPath")); 
-        m_spaceProfileCB->setURL(config->readPathEntry("DefaultPath")); 
+        if (QFile::exists(config->readPathEntry("DefulatPath")))
+        {
+            m_displayProfileCB->setURL(config->readPathEntry("DefaultPath")); 
+            m_inProfilesCB->setURL(config->readPathEntry("DefaultPath")); 
+            m_proofProfileCB->setURL(config->readPathEntry("DefaultPath")); 
+            m_spaceProfileCB->setURL(config->readPathEntry("DefaultPath"));
+        }
+        else
+        {
+            QString message = i18n("ICC profiles path seems to be invalid.You'll not be able to use \"Default profile\"\
+                                    options.  \nPlease solve it in digiKam setup.");
+            slotToggledWidgets( false );
+            KMessageBox::information(this, message);
+        }
     }
 }
 



More information about the Digikam-devel mailing list