[vlc-commits] qml: show contextMenu on rightClick

Abel Tesfaye git at videolan.org
Wed Aug 21 15:08:53 CEST 2019


vlc | branch: master | Abel Tesfaye <Abeltesfaye45 at gmail.com> | Wed Aug  7 17:57:35 2019 +0300| [2f6bdd34b21eaa5f0ada2f51fb3cbe253b702523] | committer: Jean-Baptiste Kempf

qml: show contextMenu on rightClick

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f6bdd34b21eaa5f0ada2f51fb3cbe253b702523
---

 modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml | 4 ++++
 modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml b/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml
index 9f544701ff..b570c73049 100644
--- a/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml
@@ -51,6 +51,10 @@ Utils.ListItem {
     }
 
     onItemClicked : {
+        if (key == Qt.RightButton){
+            contextMenu.model = model
+            contextMenu.popup(this)
+        }
         delegateModel.updateSelection( modifier, view.currentIndex, index )
         view.currentIndex = index
         this.forceActiveFocus()
diff --git a/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml b/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml
index 410583a2f3..3726b79bba 100644
--- a/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml
@@ -47,6 +47,10 @@ Utils.ListItem {
     }
 
     onItemClicked : {
+        if (key == Qt.RightButton){
+            contextMenu.model = model
+            contextMenu.popup(this)
+        }
         delegateModel.updateSelection( modifier, view.currentIndex, index )
         view.currentIndex = index
         this.forceActiveFocus()



More information about the vlc-commits mailing list