[vlc-commits] qml: use contextButton

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


vlc | branch: master | Abel Tesfaye <Abeltesfaye45 at gmail.com> | Wed Aug  7 14:37:16 2019 +0300| [6408ea40845b16d12120c667c2dd0979d1c1f938] | committer: Jean-Baptiste Kempf

qml: use contextButton

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

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

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

diff --git a/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml b/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml
index 748dfb2100..9f544701ff 100644
--- a/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/NetworkDriveDisplay.qml
@@ -44,6 +44,12 @@ Utils.ListItem {
     line2: model.mrl
     imageText: model.type === MLNetworkModel.TYPE_SHARE ? model.protocol : ""
 
+    showContextButton: true
+    onContextMenuButtonClicked: {
+        contextMenu.model = model
+        contextMenu.popup(menuParent,contextMenu.width,0)
+    }
+
     onItemClicked : {
         delegateModel.updateSelection( modifier, view.currentIndex, index )
         view.currentIndex = index
diff --git a/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml b/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml
index 3a0cd71902..410583a2f3 100644
--- a/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/NetworkFileDisplay.qml
@@ -40,6 +40,12 @@ Utils.ListItem {
     line1: model.name || qsTr("Unknown share")
     line2: model.mrl
 
+    showContextButton: true
+    onContextMenuButtonClicked: {
+        contextMenu.model = model
+        contextMenu.popup(menuParent,contextMenu.width,0)
+    }
+
     onItemClicked : {
         delegateModel.updateSelection( modifier, view.currentIndex, index )
         view.currentIndex = index



More information about the vlc-commits mailing list