[gnome-music/wip/jfelder/38-fix-playlist-deletion-delete-key: 5/5] window: Fix playlist deletion with a key
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/38-fix-playlist-deletion-delete-key: 5/5] window: Fix playlist deletion with a key
- Date: Wed, 24 Feb 2021 19:46:05 +0000 (UTC)
commit 017be9e80bc22eabd5162812541d94335c1dd505
Author: Jean Felder <jfelder src gnome org>
Date: Wed Feb 24 20:27:12 2021 +0100
window: Fix playlist deletion with a key
Previously, PlaylistsView relied on a function called
"remove_playlist" to delete the current playlist. Now, a Gtk.Action
named "playlist_delete" is used.
gnomemusic/window.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 4e60b6a71..03da871cc 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -370,7 +370,8 @@ class Window(Gtk.ApplicationWindow):
if (keyval == Gdk.KEY_Delete
and child == self.views[View.PLAYLIST]
and not self.views[View.PLAYLIST].rename_active):
- self.views[View.PLAYLIST].remove_playlist()
+ self.activate_action("playlist_delete", None)
+
# Close selection mode or search bar after Esc is pressed
if keyval == Gdk.KEY_Escape:
if self.props.selection_mode:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]