[gnome-music/wip/jfelder/songwidget-menu-v3] searhview: Add support for SongWidgetMenu
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/songwidget-menu-v3] searhview: Add support for SongWidgetMenu
- Date: Tue, 3 Aug 2021 16:11:21 +0000 (UTC)
commit 881371a1359c456b65c02855807e3f0273544e14
Author: Jean Felder <jfelder src gnome org>
Date: Tue Aug 3 18:05:19 2021 +0200
searhview: Add support for SongWidgetMenu
This allows to add a menu for each SongWidget of a search result.
gnomemusic/views/searchview.py | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index 6dc50a325..56469ce58 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -37,6 +37,7 @@ from gnomemusic.widgets.headerbar import HeaderBar
from gnomemusic.widgets.artistalbumswidget import ArtistAlbumsWidget
from gnomemusic.widgets.artistsearchtile import ArtistSearchTile
from gnomemusic.widgets.songwidget import SongWidget
+from gnomemusic.widgets.songwidgetmenu import SongWidgetMenu
if typing.TYPE_CHECKING:
from gnomemusic.application import Application
from gnomemusic.coresong import CoreSong
@@ -157,6 +158,8 @@ class SearchView(Gtk.Stack):
def _create_song_widget(self, coresong: CoreSong) -> Gtk.ListBoxRow:
song_widget = SongWidget(coresong, False, True)
song_widget.props.show_song_number = False
+ song_widget.props.menu = SongWidgetMenu(
+ self._application, song_widget, coresong)
self.bind_property(
"selection-mode", song_widget, "selection-mode",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]