From 9855075377ffc2d417855d574f7bce4d1b57d1ec Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Jan 2017 09:01:36 -0500 Subject: Add the ability to show "/media/*" shortcuts on the Lumina desktop. This will be very useful for systems that auto-create dirs in /media when devices are attached to the system, and mount-on-demand when browsing into that directory (*SPOILERS*). --- src-qt5/core/lumina-desktop/LDesktop.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src-qt5/core/lumina-desktop/LDesktop.cpp') diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index de7d086e..d4ebaa7f 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -221,6 +221,7 @@ void LDesktop::InitDesktop(){ connect(QApplication::instance(), SIGNAL(DesktopConfigChanged()), this, SLOT(SettingsChanged()) ); connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(UpdateDesktop()) ); + connect(QApplication::instance(), SIGNAL(MediaFilesChanged()), this, SLOT(UpdateDesktop()) ); connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(LocaleChanged()) ); connect(QApplication::instance(), SIGNAL(WorkspaceChanged()), this, SLOT(UpdateBackground()) ); //if(DEBUG){ qDebug() << "Create bgWindow"; } @@ -373,6 +374,13 @@ void LDesktop::UpdateDesktop(){ filelist << files[i].absoluteFilePath(); } } + //Also show anything available in the /media directory + QDir media("/media"); + QStringList mediadirs = media.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); + for(int i=0; iLoadItems(plugins, filelist); } -- cgit