diff options
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 7 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.h | 1 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 27b40aa3..0b5d9409 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -151,6 +151,7 @@ void LSession::setupSession(){ watcherChange( confdir+"/desktopsettings.conf" ); watcherChange( confdir+"/fluxbox-init" ); watcherChange( confdir+"/fluxbox-keys" ); + watcherChange( confdir+"/favorites.list" ); //Try to watch the localized desktop folder too if(QFile::exists(QDir::homePath()+"/"+tr("Desktop"))){ watcherChange( QDir::homePath()+"/"+tr("Desktop") ); } watcherChange( QDir::homePath()+"/Desktop" ); @@ -333,9 +334,13 @@ void LSession::watcherChange(QString changed){ desktopFiles = QDir(changed).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); } emit DesktopFilesChanged(); - } + }else if(changed.endsWith("favorites.list")){ emit FavoritesChanged(); } //Now ensure this file was not removed from the watcher if(!watcher->files().contains(changed) && !watcher->directories().contains(changed)){ + if(!QFile::exists(changed)){ + //Create the file really quick to ensure it can be watched + //TODO + } watcher->addPath(changed); } } diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h index d19cf70c..bd93289a 100644 --- a/src-qt5/core/lumina-desktop/LSession.h +++ b/src-qt5/core/lumina-desktop/LSession.h @@ -184,6 +184,7 @@ signals: void IconThemeChanged(); void DesktopConfigChanged(); void SessionConfigChanged(); + void FavoritesChanged(); void DesktopFilesChanged(); void WorkspaceChanged(); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index a34d09db..d05ba22f 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -24,6 +24,7 @@ StartMenu::StartMenu(QWidget *parent) : QWidget(parent), ui(new Ui::StartMenu){ searchTimer->setSingleShot(true); connect(searchTimer, SIGNAL(timeout()), this, SLOT(startSearch()) ); connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateApps()) ); + connect(LSession::handle(), SIGNAL(FavoritesChanged()), this, SLOT(UpdateFavs()) ); //Need to load the last used setting of the application list QString state = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/systemstart/showcategories", "partial").toString(); if(state=="partial"){ui->check_apps_showcats->setCheckState(Qt::PartiallyChecked); } @@ -128,7 +129,7 @@ void StartMenu::UpdateMenu(bool forceall){ if(forceall){ UpdateAll(); } //Quick update routine before the menu is made visible //qDebug() << "update favs"; - UpdateFavs(); + //UpdateFavs(); //qDebug() << "check page"; if(ui->stackedWidget->currentWidget() != ui->page_main){ ui->stackedWidget->setCurrentWidget(ui->page_main); //just show the main page |