[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: also consider loading state for indicating busyness in `PlaylistMediaList.qml`

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Jun 7 14:41:40 UTC 2025



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
8995af0c by Fatih Uzunoglu at 2025-06-07T14:17:40+00:00
qml: also consider loading state for indicating busyness in `PlaylistMediaList.qml`

- - - - -
b318ded0 by Fatih Uzunoglu at 2025-06-07T14:17:40+00:00
qml: also consider loading state for indicating busyness in `PlaylistMediaDisplay.qml`

- - - - -


2 changed files:

- modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
=====================================
@@ -129,8 +129,8 @@ FocusScope {
             resetFocus();
         }
 
-        onTransactionPendingChanged: {
-            if (transactionPending) {
+        function onBusynessChanged() {
+            if (transactionPending || loading) {
                 MainCtx.setCursor(root, Qt.BusyCursor)
                 visibilityTimer.start()
             } else {
@@ -139,6 +139,12 @@ FocusScope {
                 MainCtx.unsetCursor(root)
             }
         }
+
+        Component.onCompleted: {
+            model.transactionPendingChanged.connect(model.onBusynessChanged)
+            model.loadingChanged.connect(model.onBusynessChanged)
+            model.onBusynessChanged()
+        }
     }
 
     Widgets.ProgressIndicator {
@@ -151,7 +157,7 @@ FocusScope {
 
         z: 99
 
-        text: qsTr("Processing...")
+        text: root.model?.transactionPending ? qsTr("Processing...") : ""
 
         Timer {
             id: visibilityTimer


=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=====================================
@@ -106,8 +106,8 @@ MainViewLoader {
 
         coverPrefix: (isMusic) ? "playlist-music" : "playlist-video"
 
-        onTransactionPendingChanged: {
-            if (transactionPending) {
+        function onBusynessChanged() {
+            if (transactionPending || loading) {
                 MainCtx.setCursor(root, Qt.BusyCursor)
                 visibilityTimer.start()
             } else {
@@ -116,6 +116,12 @@ MainViewLoader {
                 MainCtx.unsetCursor(root)
             }
         }
+
+        Component.onCompleted: {
+            playlistModel.transactionPendingChanged.connect(playlistModel.onBusynessChanged)
+            playlistModel.loadingChanged.connect(playlistModel.onBusynessChanged)
+            playlistModel.onBusynessChanged()
+        }
     }
 
     function _actionAtIndex() {
@@ -203,7 +209,7 @@ MainViewLoader {
 
         z: 99
 
-        text: qsTr("Processing...")
+        text: root.model?.transactionPending ? qsTr("Processing...") : ""
 
         Timer {
             id: visibilityTimer



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5a8aa44824fd64d8be39221a9abb873432c2207d...b318ded07383a09d7a5d51cd6ddc90d7fae93c52

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5a8aa44824fd64d8be39221a9abb873432c2207d...b318ded07383a09d7a5d51cd6ddc90d7fae93c52
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list