[gnome-music/wip/jfelder/discbox-selection-mode-allowed: 2/2] artistalbumswidget: Make discboxes respect selection_mode_allowed



commit 8f6bd4a169faa8c07ccfe335019d3cb3042ce5fc
Author: Jean Felder <jfelder src gnome org>
Date:   Fri Jan 17 01:13:15 2020 +0100

    artistalbumswidget: Make discboxes respect selection_mode_allowed
    
    This prevents songwidgets from being wrongly selected with a Ctrl +
    left-click gesture in ArtistsView.

 gnomemusic/widgets/artistalbumwidget.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnomemusic/widgets/artistalbumwidget.py b/gnomemusic/widgets/artistalbumwidget.py
index 998524c1..9bbe121e 100644
--- a/gnomemusic/widgets/artistalbumwidget.py
+++ b/gnomemusic/widgets/artistalbumwidget.py
@@ -103,6 +103,8 @@ class ArtistAlbumWidget(Gtk.Box):
 
     def _create_disc_box(self, disc_nr, album_model):
         disc_box = DiscBox(album_model)
+        selection_allowed = self._disc_list_box.props.selection_mode_allowed
+        disc_box.props.selection_mode_allowed = selection_allowed
         disc_box.set_disc_number(disc_nr)
         disc_box.props.show_durations = True
         disc_box.props.show_favorites = True


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