aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/LDesktop.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-05-21 12:16:14 -0400
committerGitHub <noreply@github.com>2018-05-21 12:16:14 -0400
commit768b334408806fde94b4b283a32e69c23f2d8b2d (patch)
treeb2fdc65a7b17c5d2441b52f49886efcc3fa69fcc /src-qt5/core/lumina-desktop/LDesktop.cpp
parentMerge pull request #585 from rodlie/bsdtar (diff)
parentdesktop: support /run/media (user removable devices) (diff)
downloadlumina-768b334408806fde94b4b283a32e69c23f2d8b2d.tar.gz
lumina-768b334408806fde94b4b283a32e69c23f2d8b2d.tar.bz2
lumina-768b334408806fde94b4b283a32e69c23f2d8b2d.zip
Merge pull request #584 from rodlie/media
desktop: support /run/media (user removable devices)
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktop.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/LDesktop.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp
index a7ab1340..861a1aac 100644
--- a/src-qt5/core/lumina-desktop/LDesktop.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktop.cpp
@@ -389,15 +389,20 @@ void LDesktop::UpdateDesktop(){
filelist << files[i].absoluteFilePath();
}
}
- //Also show anything available in the /media directory
+ //Also show anything available in the /media directory, and /run/media/USERNAME directory
if(settings->value(DPREFIX+"generateMediaIcons",true).toBool()){
QDir media("/media");
QStringList mediadirs = media.entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
for(int i=0; i<mediadirs.length(); i++){
filelist << media.absoluteFilePath(mediadirs[i]);
}
+ QDir userMedia(QString("/run/media/%1").arg(QDir::homePath().split("/").takeLast()));
+ QStringList userMediadirs = userMedia.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
+ for(int i=0; i<userMediadirs.length(); i++){
+ filelist << userMedia.absoluteFilePath(userMediadirs[i]);
+ }
+ //qDebug() << "Found media Dirs:" << mediadirs << userMediadirs;
}
- //qDebug() << "Found media Dirs:" << mediadirs;
UpdateDesktopPluginArea();
bgDesktop->LoadItems(plugins, filelist);
}
bgstack15