[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-1/gwenview/src
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2005-04-06 13:19:43
Message-ID: 20050406131943.3407563E () office ! kde ! org
[Download RAW message or body]
CVS commit by lunakl:
Curently KDirWatch doesn't have watching of files in a directory
implemented, so KDirLister will not inform when a file changes.
When using a KIPI plugin Update files if necessary manually
based on signals from KIPI.
M +17 -0 gvfileviewstack.cpp 1.84
M +2 -0 gvfileviewstack.h 1.42
M +6 -0 gvkipiinterface.cpp 1.10
M +1 -0 gvkipiinterface.h 1.6
--- kdeextragear-1/gwenview/src/gvfileviewstack.cpp #1.83:1.84
@@ -806,4 +806,21 @@ void GVFileViewStack::dirListerRefreshIt
+void GVFileViewStack::refreshItems(const KURL::List& urls) {
+ LOG("");
+ KFileItemList list;
+ for( KURL::List::ConstIterator it = urls.begin();
+ it != urls.end();
+ ++it ) {
+ KURL dir = *it;
+ dir.setFileName( QString::null );
+ if( dir != mDirURL ) continue;
+ // TODO this could be quite slow for many images?
+ KFileItem* item = findItemByFileName( (*it).filename());
+ if( item ) list.append( item );
+ }
+ dirListerRefreshItems( list );
+}
+
+
void GVFileViewStack::dirListerClear() {
currentFileView()->clear();
--- kdeextragear-1/gwenview/src/gvfileviewstack.h #1.41:1.42
@@ -132,4 +132,6 @@ public:
void retryURL();
+ void refreshItems( const KURL::List& urls ); // used by a workaround in GVKIPIInterface
+
public slots:
void setDirURL(const KURL&);
--- kdeextragear-1/gwenview/src/gvkipiinterface.cpp #1.9:1.10
@@ -161,4 +161,10 @@ bool GVKIPIInterface::addImage(const KUR
}
+// TODO currently KDirWatch doesn't have watching of files in a directory
+// implemented, so KDirLister will not inform when a file changes
+void GVKIPIInterface::refreshImages( const KURL::List& urls ) {
+ d->mFileView->refreshItems( urls );
+}
+
void GVKIPIInterface::slotSelectionChanged() {
--- kdeextragear-1/gwenview/src/gvkipiinterface.h #1.5:1.6
@@ -44,4 +44,5 @@ public:
int features() const;
bool addImage(const KURL&, QString& err);
+ virtual void refreshImages( const KURL::List& urls );
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic