aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/widgets')
-rw-r--r--lumina-fm/widgets/DDListWidgets.h18
-rw-r--r--lumina-fm/widgets/DirWidget.cpp4
2 files changed, 19 insertions, 3 deletions
diff --git a/lumina-fm/widgets/DDListWidgets.h b/lumina-fm/widgets/DDListWidgets.h
index c211206b..d47c7ee4 100644
--- a/lumina-fm/widgets/DDListWidgets.h
+++ b/lumina-fm/widgets/DDListWidgets.h
@@ -20,6 +20,7 @@
#include <QDrag>
#include <QFileInfo>
#include <QDebug>
+#include <QMouseEvent>
//==============
// LIST WIDGET
@@ -84,11 +85,14 @@ protected:
ev->setDropAction(Qt::CopyAction);
}
ev->accept(); //allow this to be dropped here
- }
+ }else{
+ ev->ignore();
+ }
}
void dropEvent(QDropEvent *ev){
- if(this->whatsThis().isEmpty()){ return; } //not supported
+ if(this->whatsThis().isEmpty()){ ev->ignore(); return; } //not supported
+ //qDebug() << "Drop Event:";
ev->accept(); //handled here
QString dirpath = this->whatsThis();
//See if the item under the drop point is a directory or not
@@ -102,6 +106,11 @@ protected:
//qDebug() << "Drop Event:" << dirpath;
emit DataDropped( dirpath, QString(ev->mimeData()->data(MIME)).split("\n") );
}
+
+ void mouseReleaseEvent(QMouseEvent *ev){
+ if(ev->button() != Qt::RightButton && ev->button() != Qt::LeftButton){ ev->ignore(); }
+ else{ QListWidget::mouseReleaseEvent(ev); } //pass it along to the widget
+ }
};
//================
@@ -185,5 +194,10 @@ protected:
//qDebug() << "Drop Event:" << dirpath;
emit DataDropped( dirpath, QString(ev->mimeData()->data(MIME)).split("\n") );
}
+
+ void mouseReleaseEvent(QMouseEvent *ev){
+ if(ev->button() != Qt::RightButton && ev->button() != Qt::LeftButton){ ev->ignore(); }
+ else{ QTreeWidget::mouseReleaseEvent(ev); } //pass it along to the widget
+ }
};
#endif \ No newline at end of file
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index 651ceb75..dd41f299 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -856,7 +856,9 @@ void DirWidget::startSync(){
// PROTECTED
//====================
void DirWidget::mouseReleaseEvent(QMouseEvent *ev){
- if(ev->button()==Qt::BackButton){
+ static Qt::MouseButtons backmap = Qt::BackButton | Qt::ExtraButton5;
+ //qDebug() << "Mouse Click:" << ev->button();
+ if(backmap.testFlag(ev->button())){
ev->accept();
on_actionBack_triggered();
//}else if(ev->button()==Qt::ForwardButton()){
bgstack15