[gnome-music/wip/jfelder/songwidget-menu-v3: 14/18] songwidgetmenu: Add support for coresong




commit 6683bda4538cd6290506d98161575c71ad92dc89
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Aug 3 18:09:06 2021 +0200

    songwidgetmenu: Add support for coresong
    
    With this change it will be possible to display this menu in the
    SongWidgets from SearchView in the next commit.

 gnomemusic/widgets/songwidgetmenu.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/widgets/songwidgetmenu.py b/gnomemusic/widgets/songwidgetmenu.py
index e8b404623..fea83d1c8 100644
--- a/gnomemusic/widgets/songwidgetmenu.py
+++ b/gnomemusic/widgets/songwidgetmenu.py
@@ -34,6 +34,7 @@ from gnomemusic.widgets.playlistdialog import PlaylistDialog
 if typing.TYPE_CHECKING:
     from gnomemusic.application import Application
     from gnomemusic.corealbum import CoreAlbum
+    from gnomemusic.coresong import CoreSong
     from gnomemusic.widgets.songwidget import SongWidget
 
 
@@ -46,13 +47,13 @@ class SongWidgetMenu(Gtk.PopoverMenu):
 
     def __init__(
             self, application: Application, song_widget: SongWidget,
-            coreobject: Union[CoreAlbum, Playlist]) -> None:
+            coreobject: Union[CoreAlbum, CoreSong, Playlist]) -> None:
         """Menu to interact with the song of a SongWidget.
 
         :param Application application: The application object
         :param SongWidget song_widget: The songwidget associated with the menu
-        :param Union[CoreAlbum, Playlist]  coreboject: The coreobject
-            associated with the menu
+        :param Union[CoreAlbum, CoreSong, Playlist]  coreboject: The
+            coreobject associated with the menu
         """
         super().__init__()
 


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