[vlc-commits] qml: provide direct access to the indexation functionnality while browsing network

Pierre Lamot git at videolan.org
Mon Oct 14 11:59:23 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Sep 24 16:17:50 2019 +0200| [688a961ed537b05d76b9e02ed5245e7a5c73f68a] | committer: Jean-Baptiste Kempf

qml: provide direct access to the indexation functionnality while browsing network

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

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

 modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml b/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
index 0ef1f6ba9f..809da086fc 100644
--- a/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCNetworkDisplay.qml
@@ -29,6 +29,14 @@ import "qrc:///style/"
 Utils.NavigableFocusScope {
     id: root
 
+    property var extraLocalActions: ObjectModel {
+        Utils.TabButtonExt {
+            text:  providerModel.indexed ?  qsTr("Unindex Folder") : qsTr("Index Folder")
+            visible: !view.isOnProviderList && providerModel.canBeIndexed
+            onClicked: providerModel.indexed = !providerModel.indexed
+        }
+    }
+
     property alias tree: providerModel.tree
     Utils.MenuExt {
         id: contextMenu
@@ -67,7 +75,7 @@ Utils.NavigableFocusScope {
                     action: "enqueue"
                 }, {
                     active:  contextMenu.model && !!contextMenu.model.can_index,
-                    text: contextMenu.model && contextMenu.model.indexed ? qsTr("Unindex") : qsTr("Index"),
+                    text: contextMenu.model && contextMenu.model.indexed ? qsTr("Add to Media Library") : qsTr("Remove to Media Library"),
                     action: "index"
                 }
             ]



More information about the vlc-commits mailing list