diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-14 14:01:12 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-14 14:01:12 -0400 |
commit | 838477d0b6bca5327082095711b59eb533affa52 (patch) | |
tree | e9c4adea922a060d6a1e3f04b4b4e9ca773c6596 /lumina-fm/widgets/DDListWidgets.h | |
parent | When dropping files into lumina-fm: Only treat it as a move when the initial/... (diff) | |
download | lumina-838477d0b6bca5327082095711b59eb533affa52.tar.gz lumina-838477d0b6bca5327082095711b59eb533affa52.tar.bz2 lumina-838477d0b6bca5327082095711b59eb533affa52.zip |
Clean up some more of lumina-fm:
1) Put the status label on a line below all the buttons (they get crushed together with multiple columns)
2) Fix the time-based event processing when loading a directory (1/2 second updates now)
3) Update the drag/drop indicator items based on the directory underneath.
4) Fix the F5 keyboard shortcut to refresh a directory.
Diffstat (limited to 'lumina-fm/widgets/DDListWidgets.h')
-rw-r--r-- | lumina-fm/widgets/DDListWidgets.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lumina-fm/widgets/DDListWidgets.h b/lumina-fm/widgets/DDListWidgets.h index c2601335..2c51e8cc 100644 --- a/lumina-fm/widgets/DDListWidgets.h +++ b/lumina-fm/widgets/DDListWidgets.h @@ -81,7 +81,11 @@ protected: void dragMoveEvent(QDragMoveEvent *ev){ if(ev->mimeData()->hasUrls() && !this->whatsThis().isEmpty() ){ - ev->acceptProposedAction(); //allow this to be dropped here + //Change the drop type depending on the data/dir + QString home = QDir::homePath(); + if( this->whatsThis().startsWith(home) ){ ev->setDropAction(Qt::MoveAction); } + else{ ev->setDropAction(Qt::CopyAction); } + ev->accept(); //allow this to be dropped here }else{ ev->ignore(); } @@ -184,7 +188,11 @@ protected: void dragMoveEvent(QDragMoveEvent *ev){ if(ev->mimeData()->hasUrls() && !this->whatsThis().isEmpty() ){ - ev->acceptProposedAction(); //allow this to be dropped here + //Change the drop type depending on the data/dir + QString home = QDir::homePath(); + if( this->whatsThis().startsWith(home) ){ ev->setDropAction(Qt::MoveAction); } + else{ ev->setDropAction(Qt::CopyAction); } + ev->accept(); //allow this to be dropped here }else{ ev->ignore(); } |