[gnome-music/wip/mschraal/playlistcontrols-actions-rework] playlistcontrols: Move playlist_delete action creation
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/playlistcontrols-actions-rework] playlistcontrols: Move playlist_delete action creation
- Date: Sun, 5 Jan 2020 14:49:23 +0000 (UTC)
commit 6545e2116e5d557212b21d02f7357c7a878dde27
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Jan 5 14:33:11 2020 +0100
playlistcontrols: Move playlist_delete action creation
gnomemusic/views/playlistsview.py | 4 ----
gnomemusic/widgets/playlistcontrols.py | 3 ++-
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/views/playlistsview.py b/gnomemusic/views/playlistsview.py
index 648748f7..726943be 100644
--- a/gnomemusic/views/playlistsview.py
+++ b/gnomemusic/views/playlistsview.py
@@ -78,10 +78,6 @@ class PlaylistsView(BaseView):
'activate', self._stage_song_for_deletion)
self._window.add_action(self._remove_song_action)
- self._playlist_delete_action = Gio.SimpleAction.new(
- 'playlist_delete', None)
- self._window.add_action(self._playlist_delete_action)
-
self._playlist_rename_action = Gio.SimpleAction.new(
'playlist_rename', None)
self._window.add_action(self._playlist_rename_action)
diff --git a/gnomemusic/widgets/playlistcontrols.py b/gnomemusic/widgets/playlistcontrols.py
index 98bc71dd..86c270a8 100644
--- a/gnomemusic/widgets/playlistcontrols.py
+++ b/gnomemusic/widgets/playlistcontrols.py
@@ -56,8 +56,9 @@ class PlaylistControls(Gtk.Grid):
self._coremodel = application.props.coremodel
self._window = application.props.window
- self._delete_action = self._window.lookup_action("playlist_delete")
+ self._delete_action = Gio.SimpleAction.new("playlist_delete", None)
self._delete_action.connect("activate", self._on_delete_action)
+ self._window.add_action(self._delete_action)
self._play_action = Gio.SimpleAction.new("playlist_play", None)
self._window.add_action(self._play_action)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]