aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/Browser.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-10-13 13:10:34 -0400
committerKen Moore <ken@pcbsd.org>2016-10-13 13:10:34 -0400
commit725ca9791ec516f1bb0c5a37ec17fbedd888d928 (patch)
tree6f8e9ca53b4546c1c16ce04ee25ad5a1d6bfca9b /src-qt5/desktop-utils/lumina-fm/Browser.cpp
parentAdd a "launch" option within the context menu for applauncher desktop plugins. (diff)
downloadlumina-725ca9791ec516f1bb0c5a37ec17fbedd888d928.tar.gz
lumina-725ca9791ec516f1bb0c5a37ec17fbedd888d928.tar.bz2
lumina-725ca9791ec516f1bb0c5a37ec17fbedd888d928.zip
Another large update to lumina-fm:
Have all file operations performed in the background, and show up within a new system tray icon *if* the operation lasts longer than 1 second (automatic cleanup for short ops).
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/Browser.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/Browser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp
index 7455e5ea..72920757 100644
--- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp
@@ -67,12 +67,14 @@ void Browser::loadItem(QString info){
// PRIVATE SLOTS
void Browser::fileChanged(QString file){
- if(file.startsWith(currentDir+"/")){ QtConcurrent::run(this, &Browser::loadItem, file ); }
- else if(file==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); }
+ if(file.startsWith(currentDir+"/") ){
+ if(QFile::exists(file) ){ QtConcurrent::run(this, &Browser::loadItem, file ); } //file modified but not removed
+ else{ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } //file removed - need to update entire dir
+ }else if(file==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); }
}
void Browser::dirChanged(QString dir){
- if(dir==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); }
+ if(dir==currentDir){ QTimer::singleShot(500, this, SLOT(loadDirectory()) ); }
else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir ); }
}
bgstack15