removed some obsolete shortcuts

This commit is contained in:
Martin Wagner 2022-11-28 20:15:07 +01:00
parent 0645816972
commit 7cd41deef6
2 changed files with 4 additions and 29 deletions

View File

@ -189,13 +189,6 @@
<property name="accelerator">&lt;Shift&gt;Delete</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes">Show information</property>
<property name="accelerator">&lt;Control&gt;i Menu</property>
</object>
</child>
</object>
</child>
<child>
@ -209,20 +202,6 @@
<property name="accelerator">&lt;Control&gt;plus</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes">Play immediately</property>
<property name="accelerator">&lt;Control&gt;p</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes">Show information</property>
<property name="accelerator">&lt;Control&gt;i Menu</property>
</object>
</child>
</object>
</child>
</object>

View File

@ -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", ["<Control>q"]),("win.mini-player", ["<Control>m"]),("win.help", ["F1"]),("win.menu", ["F10"]),
("win.show-help-overlay", ["<Control>question"]),("win.toggle-lyrics", ["<Control>l"]),
("win.show-info", ["<Control>i","Menu"]),("win.append", ["<Control>plus"]),("win.play", ["<Control>p"]),
("win.show-info", ["Menu"]),("win.append", ["<Control>plus"]),
("win.genre-filter", ["<Control>g"]),("win.back-to-current-album", ["Escape"]),("win.toggle-search", ["<Control>f"]),
("mpd.update", ["F5"]),("mpd.clear", ["<Shift>Delete"]),("mpd.toggle-play", ["space"]),("mpd.stop", ["<Shift>space"]),
("mpd.next", ["<Alt>Down"]),("mpd.prev", ["<Alt>Up"]),("mpd.repeat", ["<Control>r"]),("mpd.random", ["<Control>n"]),