[vlc-commits] qml: directly open the player view when opening a media from the video view

Pierre Lamot git at videolan.org
Thu Feb 20 13:56:33 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Feb 17 17:44:47 2020 +0100| [25bb0ff3563d942de83ba24b63e685c9b079a6de] | committer: Jean-Baptiste Kempf

qml: directly open the player view when opening a media from the video view

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

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

 modules/gui/qt/medialibrary/qml/VideoDisplay.qml  | 6 +++++-
 modules/gui/qt/medialibrary/qml/VideoGridItem.qml | 7 ++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
index 070494cee0..cb5cf7b0d9 100644
--- a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
@@ -82,7 +82,10 @@ Widgets.NavigableFocusScope {
         Widgets.MenuItemExt {
             id: playMenuItem
             text: "Play from start"
-            onTriggered: medialib.addAndPlay( contextMenu.model.id )
+            onTriggered: {
+                medialib.addAndPlay( contextMenu.model.id )
+                history.push(["player"])
+            }
         }
         Widgets.MenuItemExt {
             text: "Play all"
@@ -140,6 +143,7 @@ Widgets.NavigableFocusScope {
             for (var i = 0; i < videosDelegate.selectedGroup.count; i++)
                 list.push(videosDelegate.selectedGroup.get(i).model.id)
             medialib.addAndPlay( list )
+            history.push(["player"])
         }
     }
 
diff --git a/modules/gui/qt/medialibrary/qml/VideoGridItem.qml b/modules/gui/qt/medialibrary/qml/VideoGridItem.qml
index 50715ddef0..4591e88d03 100644
--- a/modules/gui/qt/medialibrary/qml/VideoGridItem.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoGridItem.qml
@@ -34,5 +34,10 @@ Widgets.GridItem {
     progress: model.progress > 0 ? model.progress : 0
     pictureWidth: VLCStyle.video_normal_width
     pictureHeight: VLCStyle.video_normal_height
-    onItemDoubleClicked: if ( model.id !== undefined ) { medialib.addAndPlay( model.id ) }
+    onItemDoubleClicked: {
+        if ( model.id !== undefined ) {
+            medialib.addAndPlay( model.id )
+            history.push(["player"])
+        }
+    }
 }



More information about the vlc-commits mailing list