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

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

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

F.J.Cruz
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: [hidden email] , [hidden email]

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