diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-07 12:50:20 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-07 12:50:20 -0400 |
commit | 6b310daff4fbd1ba9080ea340b3e9cea72770f06 (patch) | |
tree | 76b67cf201d1796af4ae845961a4e1ce666e22d7 /lumina-desktop/LDesktopPluginSpace.h | |
parent | Commit the 3rd iteration of the desktop plugin container system. (diff) | |
download | lumina-6b310daff4fbd1ba9080ea340b3e9cea72770f06.tar.gz lumina-6b310daff4fbd1ba9080ea340b3e9cea72770f06.tar.bz2 lumina-6b310daff4fbd1ba9080ea340b3e9cea72770f06.zip |
Couple more updates for lumina-desktop:
1) Implement the file dropping on the desktop
2) Fix the panel painting routine to ensure the proper "fake" transparency is applied.
3) Add a missing include line in the panel "applauncher" plugin.
4) Fix the initial desktop icon size setting.
Diffstat (limited to 'lumina-desktop/LDesktopPluginSpace.h')
-rw-r--r-- | lumina-desktop/LDesktopPluginSpace.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lumina-desktop/LDesktopPluginSpace.h b/lumina-desktop/LDesktopPluginSpace.h index 353543d9..bf623b68 100644 --- a/lumina-desktop/LDesktopPluginSpace.h +++ b/lumina-desktop/LDesktopPluginSpace.h @@ -14,6 +14,8 @@ #include <QMimeData> #include <QSettings> #include <QDebug> +#include <QFile> +#include <QDir> #include "desktop-plugins/LDPlugin.h" @@ -217,7 +219,15 @@ protected: qDebug() << "Desktop Drop Event:" << urls; for(int i=0; i<urls.length(); i++){ //If this file is not in the desktop folder, move/copy it here - // -- TO-DO + if(urls[i].isLocalFile()){ + QFileInfo info(urls[i].toLocalFile()); + if(info.exists() && !QFile::exists(QDir::homePath()+"/Desktop/"+info.fileName())){ + //Make a link to the file here + QFile::link(info.absoluteFilePath(), QDir::homePath()+"/Desktop/"+info.fileName()); + }else{ + qWarning() << "Invalid desktop file drop (ignored):" << urls[i].toString(); + } + } } }else{ |