[gnome-music/wip/jfelder/selection-coresong-playlist: 1/3] grltrackerplaylists: Do not bind selected property



commit d7022ffc441ec5e98cb388761d5facfe5db8c535
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Mar 26 14:57:59 2020 +0100

    grltrackerplaylists: Do not bind selected property
    
    This results in a wrong selection count because the same song is added
    two times to the selected_items list of CoreSelection.
    
    Besides, the songs of a playlist can not be selected. So, it is
    pointless to bind this property.
    
    Closes: #379

 gnomemusic/grilowrappers/grltrackerplaylists.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index 673fc90c..cb4cfe70 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -432,10 +432,12 @@ class Playlist(GObject.GObject):
     def _bind_to_main_song(self, coresong):
         main_coresong = self._songs_hash[coresong.props.media.get_id()]
 
+        # It is not necessary to bind all the CoreSong properties:
+        # selected property is linked to a view
         properties = [
             "album", "album_disc_number", "artist", "duration", "media",
             "grlid", "play_count", "state", "title", "track_number", "url",
-            "validation", "favorite", "selected"]
+            "validation", "favorite"]
 
         for prop in properties:
             main_coresong.bind_property(


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