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

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

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

F.J.Cruz
SVN commit 547203 by fjcruz:

Icc profiles repository path is checked at digiKam start up now. Is it isn't a valid one, a message is showed and the user can choose between set the path correctly or not. In this last case, Color Management is disabled.

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

P.S: dued to my poor english, if anybody can write a better text for the message, feel free to do it.

CCMAIL: [hidden email] , [hidden email]

 M  +30 -0     digikamapp.cpp  
 M  +2 -0      digikamapp.h  


--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #547202:547203
@@ -30,6 +30,7 @@
 #include <qkeysequence.h>
 #include <qsignalmapper.h>
 #include <qtimer.h>
+#include <qdir.h>
 
 // KDE includes.
 
@@ -96,6 +97,7 @@
 
     mFullScreen = false;
     mView = 0;
+    mValidIccPath = true;
 
     mSplash = 0;
     if(m_config->readBoolEntry("Show Splash", true) &&
@@ -128,6 +130,15 @@
 
     applyMainWindowSettings(m_config);
 
+    m_config->setGroup("Color Management");
+    QDir tmpPath(m_config->readPathEntry("DefaultPath", QString::null));
+    if (!tmpPath.exists())
+    {
+        mValidIccPath = false;
+    }
+
+    kdDebug() << "digikampp: " << tmpPath.dirName() << endl;
+
     // Actual file scanning is done in main() - is this necessary here?
     mAlbumManager->setLibraryPath(mAlbumSettings->getAlbumLibraryPath());
 
@@ -187,6 +198,25 @@
         mSplash = 0;
     }
     KMainWindow::show();
+    if(!mValidIccPath)
+    {
+        QString message = i18n("<qt><p>ICC profiles path seems to be invalid.</p>"
+                               "<p>If you want to set it now, select \"Yes\", otherwise "
+                               "select \"No\". In this case, \"Color Management\" feature "
+                               "will be disabled until you solve this issue</p></qt>");
+        int answer = KMessageBox::warningYesNo(this, message);
+        if (answer == KMessageBox::Yes)
+        {
+            Setup setup(this, 0, Setup::IccProfiles);
+            if (setup.exec() != QDialog::Accepted)
+            return;
+        }
+        else
+        {
+            m_config->setGroup("Color Management");
+            m_config->writeEntry("EnableCM", false);
+        }
+    }
 }
 
 const QPtrList<KAction>& DigikamApp::menuImageActions()
--- trunk/extragear/graphics/digikam/digikam/digikamapp.h #547202:547203
@@ -114,6 +114,8 @@
 private:
 
     bool                   mFullScreen;
+
+    bool                   mValidIccPath;
     
     // KIPI plugins support
     QPtrList<KAction>      m_kipiFileActionsExport;
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel