[gnome-music/wip/mschraal/assorted-cleanups: 25/32] notificationspopup: Pass application to init
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/assorted-cleanups: 25/32] notificationspopup: Pass application to init
- Date: Mon, 30 Mar 2020 20:59:21 +0000 (UTC)
commit 053b975f35ac28066e9d85beefe3837891c62c67
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Mar 26 14:44:05 2020 +0100
notificationspopup: Pass application to init
gnomemusic/widgets/notificationspopup.py | 6 +++---
gnomemusic/widgets/playlistcontrols.py | 2 +-
gnomemusic/widgets/playlistswidget.py | 3 ++-
3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/widgets/notificationspopup.py b/gnomemusic/widgets/notificationspopup.py
index 83544e59..722029dc 100644
--- a/gnomemusic/widgets/notificationspopup.py
+++ b/gnomemusic/widgets/notificationspopup.py
@@ -193,12 +193,12 @@ class PlaylistNotification(Gtk.Grid):
SONG = 1
def __init__(
- self, notifications_popup, coremodel, type_, playlist,
+ self, notifications_popup, application, type_, playlist,
position=None, coresong=None):
"""Creates a playlist deletion notification popup (song or playlist)
:param GtkRevealer: notifications_popup: the popup object
- :param CoreModel: core model
+ :param Apllication: application object
:param type_: NotificationType (song or playlist)
:param Playlist playlist: playlist
:param int position: position of the object to delete
@@ -206,7 +206,7 @@ class PlaylistNotification(Gtk.Grid):
"""
super().__init__(column_spacing=18)
self._notifications_popup = notifications_popup
- self._coremodel = coremodel
+ self._coremodel = application.props.coremodel
self.type_ = type_
self._playlist = playlist
self._position = position
diff --git a/gnomemusic/widgets/playlistcontrols.py b/gnomemusic/widgets/playlistcontrols.py
index 07cbddb2..c406c18f 100644
--- a/gnomemusic/widgets/playlistcontrols.py
+++ b/gnomemusic/widgets/playlistcontrols.py
@@ -98,7 +98,7 @@ class PlaylistControls(Gtk.Grid):
self._window.set_player_visible(False)
PlaylistNotification(
- self._window.notifications_popup, self._coremodel,
+ self._window.notifications_popup, self._application,
PlaylistNotification.Type.PLAYLIST, self.props.playlist)
@Gtk.Template.Callback()
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index 164e9a73..cd71a1ae 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -50,6 +50,7 @@ class PlaylistsWidget(Gtk.Box):
"""
super().__init__()
+ self._application = application
self._window = application.props.window
self._coremodel = application.props.coremodel
self._player = application.props.player
@@ -176,7 +177,7 @@ class PlaylistsWidget(Gtk.Box):
current_playlist = self._playlists_view.props.current_playlist
notification = PlaylistNotification( # noqa: F841
- self._window.notifications_popup, self._coremodel,
+ self._window.notifications_popup, self._application,
PlaylistNotification.Type.SONG, current_playlist, position,
coresong)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]