From 7cd41deef637de9d2be659f05000aab3493fc434 Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Mon, 28 Nov 2022 20:15:07 +0100 Subject: [PATCH] removed some obsolete shortcuts --- data/ShortcutsWindow.ui | 21 --------------------- src/mpdevil.py | 12 ++++-------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/data/ShortcutsWindow.ui b/data/ShortcutsWindow.ui index c73c379..17c7054 100644 --- a/data/ShortcutsWindow.ui +++ b/data/ShortcutsWindow.ui @@ -189,13 +189,6 @@ <Shift>Delete - - - True - Show information - <Control>i Menu - - @@ -209,20 +202,6 @@ <Control>plus - - - True - Play immediately - <Control>p - - - - - True - Show information - <Control>i Menu - - diff --git a/src/mpdevil.py b/src/mpdevil.py index 45ae216..df92462 100755 --- a/src/mpdevil.py +++ b/src/mpdevil.py @@ -3183,17 +3183,13 @@ class MainWindow(Gtk.ApplicationWindow): # actions simple_actions_data=( - "settings","connection-settings","stats","help","menu", + "settings","connection-settings","stats","help","menu","append", "toggle-lyrics","back-to-current-album","toggle-search","show-info" ) for name in simple_actions_data: action=Gio.SimpleAction.new(name, None) action.connect("activate", getattr(self, ("_on_"+name.replace("-","_")))) self.add_action(action) - for name in ("append","play"): - action=Gio.SimpleAction.new(name, None) - action.connect("activate", self._on_add_to_playlist, name) - self.add_action(action) self.add_action(self._settings.create_action("mini-player")) self.add_action(self._settings.create_action("genre-filter")) @@ -3386,10 +3382,10 @@ class MainWindow(Gtk.ApplicationWindow): if hasattr(widget, "show_info") and callable(widget.show_info): widget.show_info() - def _on_add_to_playlist(self, action, param, mode): + def _on_append(self, action, param): widget=self.get_focus() if hasattr(widget, "add_to_playlist") and callable(widget.add_to_playlist): - widget.add_to_playlist(mode) + widget.add_to_playlist("append") def _on_search_button_toggled(self, button): if button.get_active(): @@ -3504,7 +3500,7 @@ class mpdevil(Gtk.Application): action_accels=( ("app.quit", ["q"]),("win.mini-player", ["m"]),("win.help", ["F1"]),("win.menu", ["F10"]), ("win.show-help-overlay", ["question"]),("win.toggle-lyrics", ["l"]), - ("win.show-info", ["i","Menu"]),("win.append", ["plus"]),("win.play", ["p"]), + ("win.show-info", ["Menu"]),("win.append", ["plus"]), ("win.genre-filter", ["g"]),("win.back-to-current-album", ["Escape"]),("win.toggle-search", ["f"]), ("mpd.update", ["F5"]),("mpd.clear", ["Delete"]),("mpd.toggle-play", ["space"]),("mpd.stop", ["space"]), ("mpd.next", ["Down"]),("mpd.prev", ["Up"]),("mpd.repeat", ["r"]),("mpd.random", ["n"]),