[gnome-music/wip/mschraal/validation-status-fix-round-2: 65/66] coremodel: Pass the validation status back



commit 3da7854f58501a58b06acaa8c65bc4aed0867275
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Jul 18 13:19:30 2019 +0200

    coremodel: Pass the validation status back
    
    The validation status should be passed back from the player model to the main
    model for proper display in the widgets.

 gnomemusic/coremodel.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index a8ae3147..70257a3b 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -241,7 +241,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     coresong.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
         with model.freeze_notify():
 
@@ -268,7 +269,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     model_song.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
                 self.emit("playlist-loaded")
             elif playlist_type == PlayerPlaylist.Type.ARTIST:
@@ -294,7 +296,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     model_song.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
                 self.emit("playlist-loaded")
             elif playlist_type == PlayerPlaylist.Type.SONGS:
@@ -344,7 +347,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     model_song.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
                 self.emit("playlist-loaded")
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]