diff options
author | Ken Moore <ken@ixsystems.com> | 2018-06-07 21:55:13 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-06-07 21:55:13 -0400 |
commit | 47d4b080f9e4dbb94b71ef748d8eb8e7c042e5b7 (patch) | |
tree | ce09cff3eee79a2284bc7a0ce0e7fe5324b41b0a /src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h | |
parent | Remove the xscreensaver return code check, apparently it is now erratic regar... (diff) | |
download | lumina-47d4b080f9e4dbb94b71ef748d8eb8e7c042e5b7.tar.gz lumina-47d4b080f9e4dbb94b71ef748d8eb8e7c042e5b7.tar.bz2 lumina-47d4b080f9e4dbb94b71ef748d8eb8e7c042e5b7.zip |
Rip out the initialization of drag and drop on applauncher desktop plugins.
Have it move the plugin on the desktop instead, but it can also be "dropped" into applications and get used as a drag-n-drop operation.
Diffstat (limited to 'src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h')
-rw-r--r-- | src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h index 6cff4bf7..553fe1c5 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h +++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h @@ -53,6 +53,7 @@ private slots: //void increaseIconSize(); //void decreaseIconSize(); //void deleteFile(); + void startDragNDrop(); void actionTriggered(QAction *act); void openWith(); @@ -90,18 +91,9 @@ protected: void mouseMoveEvent(QMouseEvent *ev){ if( (ev->buttons() & Qt::LeftButton) ){ if((ev->pos() - dragstartpos).manhattanLength() > (this->width()/4) ){ - //Start the drag event for this file - QDrag *drag = new QDrag(this); - QMimeData *md = new QMimeData; - md->setUrls( QList<QUrl>() << QUrl::fromLocalFile(button->whatsThis()) ); - drag->setMimeData(md); - //Now perform the drag and react appropriately - Qt::DropAction dropAction = drag->exec(Qt::CopyAction | Qt::MoveAction); - if(dropAction == Qt::MoveAction){ - // File Moved, remove it from here - //qDebug() << "File Moved:" << button->whatsThis(); - //DO NOT DELETE FILES - return code often is wrong (browser drops for instance) - } + emit StartMoving(this->ID()); + }else if(false){ // + startDragNDrop(); } }else{ LDPlugin::mouseMoveEvent(ev); |