[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-3/digikam/digikam
From: Renchi Raju <renchi () pooh ! tam ! uiuc ! edu>
Date: 2005-01-31 19:22:00
Message-ID: 20050131192200.3F1A91D1F1 () office ! kde ! org
[Download RAW message or body]
CVS commit by pahlibar:
hold the file dates separately from the kfileitems and on refresh, reread the
file dates and resort the items.
BUG: 98189
M +29 -0 albumiconview.cpp 1.107
M +4 -0 kipiinterface.cpp 1.19
--- kdeextragear-3/digikam/digikam/albumiconview.cpp #1.106:1.107
@@ -40,4 +40,5 @@
#include <qdatetime.h>
#include <qfileinfo.h>
+#include <qfile.h>
#include <qguardedptr.h>
#include <qdragobject.h>
@@ -82,4 +83,11 @@
#include <libkexif/kexifdata.h>
+extern "C"
+{
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+}
+
// Local includes.
@@ -1494,4 +1502,22 @@ void AlbumIconView::refreshItems(const K
return;
+ // we do two things here:
+ // 1. refresh the timestamp
+ // 2. refresh the thumbnails
+
+ for (KURL::List::const_iterator it = urlList.begin();
+ it != urlList.end(); ++it)
+ {
+ AlbumIconItem* iconItem = findItem((*it).url());
+ if (!iconItem)
+ continue;
+
+ struct stat st;
+ if (::stat(QFile::encodeName((*it).path()), &st) == 0)
+ {
+ iconItem->time_ = st.st_mtime;
+ }
+ }
+
if (d->thumbJob.isNull())
{
@@ -1516,4 +1542,7 @@ void AlbumIconView::refreshItems(const K
d->thumbJob->addItems(urlList);
}
+
+ // trigger a delayed update, in case we need to resort items
+ triggerUpdate();
}
--- kdeextragear-3/digikam/digikam/kipiinterface.cpp #1.18:1.19
@@ -175,4 +175,8 @@ void DigikamImageInfo::setTime(const QDa
<< endl;
}
+ else
+ {
+ AlbumManager::instance()->refreshItemHandler( _url );
+ }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic