[Pkg-kde-commits] rev 1887 - in kde-extras/digikam/branches/0.7.4/debian: . patches

Achim Bohnet ach-guest at costa.debian.org
Sat Oct 1 23:11:00 UTC 2005


Author: ach-guest
Date: 2005-10-01 23:10:59 +0000 (Sat, 01 Oct 2005)
New Revision: 1887

Added:
   kde-extras/digikam/branches/0.7.4/debian/patches/01_refresh-thumbnail.diff
Modified:
   kde-extras/digikam/branches/0.7.4/debian/changelog
Log:
Add Renchis refresh thumbnail fix for 0.7.4.


Modified: kde-extras/digikam/branches/0.7.4/debian/changelog
===================================================================
--- kde-extras/digikam/branches/0.7.4/debian/changelog	2005-10-01 23:02:50 UTC (rev 1886)
+++ kde-extras/digikam/branches/0.7.4/debian/changelog	2005-10-01 23:10:59 UTC (rev 1887)
@@ -2,6 +2,12 @@
 
   * NOT RELEASED YET
 
+  [ Achim Bohnet ]
+  * patches/01_refresh-thumbnail.diff: Fix thumbnails not updated
+    after rotation: kipi-pluguns 0.1-rc1 preserves timestamp when
+    rotating a image.  Therefore thumbmail code no longer detected
+    the change.  Renchi was so kind to backport the 0.8 fix. Thx!
+
  -- Mark Purcell <msp at debian.org>  Sat, 17 Sep 2005 22:31:03 +0100
 
 digikam (0.7.4-5) unstable; urgency=low

Added: kde-extras/digikam/branches/0.7.4/debian/patches/01_refresh-thumbnail.diff
===================================================================
--- kde-extras/digikam/branches/0.7.4/debian/patches/01_refresh-thumbnail.diff	2005-10-01 23:02:50 UTC (rev 1886)
+++ kde-extras/digikam/branches/0.7.4/debian/patches/01_refresh-thumbnail.diff	2005-10-01 23:10:59 UTC (rev 1887)
@@ -0,0 +1,49 @@
+--- digikam/digikam/albumiconview.cpp.orig	2005-08-20 20:20:42.456678320 -0700
++++ digikam/digikam/albumiconview.cpp	2005-10-01 15:12:38.998267848 -0700
+@@ -48,6 +48,7 @@
+ #include <qdict.h>
+ #include <qdatastream.h>
+ #include <qtimer.h>
++#include <qdir.h>
+ 
+ // KDE includes.
+ 
+@@ -68,6 +69,7 @@
+ #include <kstandarddirs.h>
+ #include <kdebug.h>
+ #include <kiconeffect.h>
++#include <kmdcodec.h>
+ 
+ #include <kdeversion.h>
+ #if KDE_IS_VERSION(3,2,0)
+@@ -1548,6 +1550,8 @@
+     // we do two things here:
+     // 1. refresh the timestamp
+     // 2. refresh the thumbnails
++
++    QString thumbCacheDir = QDir::homeDirPath() + "/.thumbnails/";
+     
+     for (KURL::List::const_iterator it = urlList.begin();
+          it != urlList.end(); ++it)
+@@ -1561,6 +1565,21 @@
+         {
+             iconItem->time_ = st.st_mtime;
+         }
++
++
++        // remove the items from the thumbnail cache directory as well.
++        // this is needed as jpeglossless plugin, for eg, preserves the
++        // timestamp and the thumbnailer relies on timestamp to decide
++        // whether to generate new thumbnails or not
++        QString uri = "file://" + QDir::cleanDirPath((*it).path());
++        KMD5 md5(QFile::encodeName(uri));
++        uri = md5.hexDigest();
++        
++        QString smallThumbPath = thumbCacheDir + "normal/" + uri + ".png";
++        QString bigThumbPath   = thumbCacheDir + "large/"  + uri + ".png";
++        
++        ::unlink(QFile::encodeName(smallThumbPath));
++        ::unlink(QFile::encodeName(bigThumbPath));
+     }
+     
+     if (d->thumbJob.isNull())




More information about the pkg-kde-commits mailing list