[gnome-music/wip/mschraal/playlistcontrols-actions-rework] playlistcontrols: Move playlist_rename 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_rename action creation
- Date: Sun, 5 Jan 2020 14:49:28 +0000 (UTC)
commit d5e49509ddcbc698d48a26d0747cc01282c71a2d
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Jan 5 14:35:16 2020 +0100
playlistcontrols: Move playlist_rename 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 726943be..d2f30472 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_rename_action = Gio.SimpleAction.new(
- 'playlist_rename', None)
- self._window.add_action(self._playlist_rename_action)
-
self._pl_ctrls = PlaylistControls(application)
self._grid.insert_row(0)
self._grid.attach(self._pl_ctrls, 1, 0, 1, 1)
diff --git a/gnomemusic/widgets/playlistcontrols.py b/gnomemusic/widgets/playlistcontrols.py
index 86c270a8..4c553fca 100644
--- a/gnomemusic/widgets/playlistcontrols.py
+++ b/gnomemusic/widgets/playlistcontrols.py
@@ -63,8 +63,9 @@ class PlaylistControls(Gtk.Grid):
self._play_action = Gio.SimpleAction.new("playlist_play", None)
self._window.add_action(self._play_action)
- self._rename_action = self._window.lookup_action("playlist_rename")
+ self._rename_action = Gio.SimpleAction.new("playlist_rename", None)
self._rename_action.connect("activate", self._on_rename_action)
+ self._window.add_action(self._rename_action)
def _on_rename_action(self, menuitem, data=None):
self._enable_rename_playlist(self.props.playlist)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]