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

Marcel Wiesweg marcel.wiesweg at gmx.de
Fri Apr 14 20:53:15 BST 2006


SVN commit 529912 by mwiesweg:

digikam stable branch:
Backport dcraw autodetection from trunk

CCMAIL: digikam-devel at kde.org


 M  +8 -3      digikam/albumiconview.cpp  
 M  +3 -0      digikam/digikamapp.cpp  
 M  +4 -0      digikam/main.cpp  
 M  +1 -1      libs/dcraw/Makefile.am  
 A             libs/dcraw/dcrawbinary.cpp   trunk/extragear/graphics/digikam/libs/dcraw/dcrawbinary.cpp#529604 [License: GPL]
 A             libs/dcraw/dcrawbinary.h   trunk/extragear/graphics/digikam/libs/dcraw/dcrawbinary.h#529604 [License: GPL]
 M  +4 -0      showfoto/main.cpp  
 M  +3 -1      utilities/imageeditor/imlibinterface.cpp  


--- branches/stable/extragear/graphics/digikam/digikam/albumiconview.cpp #529911:529912
@@ -107,6 +107,7 @@
 #include "thumbnailsize.h"
 #include "themeengine.h"
 #include "pixmapmanager.h"
+#include "dcrawbinary.h"
 
 #include "cameradragobject.h"
 #include "dragobjects.h"
@@ -879,10 +880,14 @@
     QString currentFileExtension =
         item->imageInfo()->name().section( '.', -1 );
     QString imagefilter = settings->getImageFileFilter().lower() +
-                          settings->getImageFileFilter().upper() + 
-                          settings->getRawFileFilter().lower() +
-                          settings->getRawFileFilter().upper();
+                          settings->getImageFileFilter().upper();
 
+    if (Digikam::DcrawBinary::instance()->isAvailable())
+    {
+        imagefilter += settings->getRawFileFilter().lower() +
+                       settings->getRawFileFilter().upper();
+    }
+
     // If the current item isn't an image file.
     if ( !imagefilter.contains(currentFileExtension) )
     {
--- branches/stable/extragear/graphics/digikam/digikam/digikamapp.cpp #529911:529912
@@ -82,6 +82,7 @@
 #include "splashscreen.h"
 #include "thumbnailsize.h"
 #include "scanlib.h"
+#include "dcrawbinary.h"
 
 DigikamApp::DigikamApp()
           : KMainWindow( 0, "Digikam" )
@@ -155,6 +156,8 @@
     delete mAlbumManager;
     delete AlbumLister::instance();
 
+    Digikam::DcrawBinary::cleanUp();
+
     m_instance = 0;
 }
 
--- branches/stable/extragear/graphics/digikam/digikam/main.cpp #529911:529912
@@ -53,6 +53,7 @@
 #include "albummanager.h"
 #include "digikamapp.h"
 #include "digikamfirstrun.h"
+#include "dcrawbinary.h"
 
 static KCmdLineOptions options[] =
 {
@@ -225,6 +226,9 @@
         return app.exec();
     }
 
+    if (!Digikam::DcrawBinary::instance()->checkSystem())
+        return 1;
+
     AlbumManager* man = new AlbumManager();
     man->setLibraryPath(albumPath);
 
--- branches/stable/extragear/graphics/digikam/libs/dcraw/Makefile.am #529911:529912
@@ -4,7 +4,7 @@
 
 noinst_LTLIBRARIES = libdcraw.la
 
-libdcraw_la_SOURCES = dcraw_parse.cpp
+libdcraw_la_SOURCES = dcraw_parse.cpp dcrawbinary.cpp
 
 libdcraw_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
--- branches/stable/extragear/graphics/digikam/showfoto/main.cpp #529911:529912
@@ -36,6 +36,7 @@
 // Local includes.
 
 #include "showfoto.h"
+#include "dcrawbinary.h"
 
 static KCmdLineOptions options[] =
 {
@@ -89,6 +90,9 @@
     KApplication app;
     KImageIO::registerFormats();
 
+    if (!Digikam::DcrawBinary::instance()->checkSystem())
+        return 1;
+
     KURL::List urlList;
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
     for(int i = 0; i < args->count(); i++)
--- branches/stable/extragear/graphics/digikam/utilities/imageeditor/imlibinterface.cpp #529911:529912
@@ -64,6 +64,7 @@
 #include "undomanager.h"
 #include "undoaction.h"
 #include "imlibinterface.h"
+#include "dcrawbinary.h"
 
 namespace Digikam
 {
@@ -300,7 +301,8 @@
             // -2 : 8bit ppm output
             // -w : Use camera white balance, if possible  
             // -a : Use automatic white balance
-            command  = "dcraw -c -2 -w -a -q 0 ";
+            command  = DcrawBinary::instance()->path();
+            command += " -c -2 -w -a -q 0 ";
             command += QFile::encodeName( KProcess::quote( filename ) );
             kdWarning() << "Running dcraw command : " << command << endl;
         



More information about the Digikam-devel mailing list