aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/userbutton
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins/userbutton')
-rw-r--r--lumina-desktop/panel-plugins/userbutton/UserWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp
index d1173ee1..bae14b5a 100644
--- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp
+++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp
@@ -89,6 +89,7 @@ UserWidget::UserWidget(QWidget* parent) : QTabWidget(parent), ui(new Ui::UserWid
lastUpdate = QDateTime(); //make sure it refreshes
connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateMenu()) );
+ connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(updateFavItems()) );
QTimer::singleShot(10,this, SLOT(UpdateMenu())); //make sure to load this once after initialization
}
@@ -176,8 +177,7 @@ void UserWidget::updateFavItems(bool newfilter){
if(lastHomeUpdate.isNull() || (QFileInfo(QDir::homePath()+"/Desktop").lastModified() > lastHomeUpdate) || newfavs!=favs ){
favs = newfavs;
- QDir homedir = QDir( QDir::homePath()+"/Desktop");
- homefiles = homedir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
+ homefiles = LSession::handle()->DesktopFiles();
lastHomeUpdate = QDateTime::currentDateTime();
}else if(!newfilter){ return; } //nothing new to change - stop now
QStringList favitems;
bgstack15