diff options
author | Ken Moore <ken@pcbsd.org> | 2015-06-14 17:53:11 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-06-14 17:53:11 -0400 |
commit | 33494b8f9177a9c1b3d936e974ad553fc07ae859 (patch) | |
tree | 93b404510a04f5dcb76dc0e35ccac144c6d5cb68 /lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp | |
parent | Add a QtQuick sample plugin and disable the new panel container for QtQuick p... (diff) | |
download | lumina-33494b8f9177a9c1b3d936e974ad553fc07ae859.tar.gz lumina-33494b8f9177a9c1b3d936e974ad553fc07ae859.tar.bz2 lumina-33494b8f9177a9c1b3d936e974ad553fc07ae859.zip |
Re-work quite a bit of the background procedures for desktop plugins and watchers:
1) Move the ~/Desktop directory watcher into the Session (no extra overhead, already have a watcher there), and have te session send out signals when the contents of the ~/Desktop dir change.
2) Setup the plugins that poll the desktop to use the new session implementation (reducing overhead overall)
3) Add the ability to use files/dirs in the "applauncher" plugin as well (not exposed to user yet)
4) Add a new desktop flag for auto-creating applauncher plugins for any files/dirs on the desktop (not added to lumina-config yet)
5) Get rid of all the config files for the desktop plugins and merge them all together into a single conf file that the session maintains the pointer to (so plugins can grab that pointer as necessary)
6) Make sure that desktop plugins go through a special [read/save]Setting() functions in the plugin implementation itself so that they don't accidentally trample other plugin settings (keeps it restricted to the particular group for that plugin)
Diffstat (limited to 'lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp b/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp index 163f7c0a..71eaa8c4 100644 --- a/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp +++ b/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp @@ -35,6 +35,7 @@ LDeskBarPlugin::LDeskBarPlugin(QWidget *parent, QString id, bool horizontal) : L connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(desktopChanged()) ); QTimer::singleShot(1,this, SLOT(desktopChanged()) ); //make sure to load it the first time QTimer::singleShot(0,this, SLOT(OrientationChange()) ); //adjust sizes/layout + connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(desktopChanged()) ); } LDeskBarPlugin::~LDeskBarPlugin(){ @@ -144,8 +145,7 @@ void LDeskBarPlugin::desktopChanged(){ QStringList newfavs = LUtils::listFavorites(); 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(); QStringList favitems = favs; //Remember for format for favorites: <name>::::[app/dir/<mimetype>]::::<full path> |