[gnome-music/wip/jfelder/songwidget-non-selectable] songwidget: Make it is not selectable by default




commit ecf99945539cd9232e42b2e06b2832ddb8b060d3
Author: Jean Felder <jfelder src gnome org>
Date:   Sat May 22 15:41:02 2021 +0200

    songwidget: Make it is not selectable by default
    
    In most of the cases, SongWidget do not need to be selectable. They
    only need to be selectable when used by PlaylistsView to interact with
    PlaylistContextMenu.

 data/ui/SongWidget.ui                 | 1 +
 gnomemusic/widgets/playlistswidget.py | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/data/ui/SongWidget.ui b/data/ui/SongWidget.ui
index 0ad4365ab..1bb14f17a 100644
--- a/data/ui/SongWidget.ui
+++ b/data/ui/SongWidget.ui
@@ -5,6 +5,7 @@
   <template class="SongWidget" parent="GtkListBoxRow">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
+    <property name="selectable">False</property>
     <signal name="drag_data_received" handler="_on_drag_data_received"/>
     <child>
       <object class="GtkBox" id="box1">
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index cb19efdd1..30bceafc9 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -105,6 +105,7 @@ class PlaylistsWidget(Gtk.Box):
             self, coresong: CoreSong, playlist: Playlist) -> Gtk.ListBoxRow:
         can_dnd = not playlist.props.is_smart
         song_widget = SongWidget(coresong, can_dnd, True)
+        song_widget.props.selectable = True
         song_widget.props.show_song_number = False
 
         if can_dnd is True:


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