Commit bdeaed0f authored by Marinus Schraal's avatar Marinus Schraal

window: Change navigation shortcuts to <Alt>

In line with the general trend to use <Alt> for navigation shortcuts,
switch Music accordingly from <Ctrl> to <Alt>.
Reflect this in the shortcuts window as well.

Closes: #198
parent a7c0180c
......@@ -90,28 +90,28 @@
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Go to Albums</property>
<property name="accelerator">&lt;Ctrl&gt;1</property>
<property name="accelerator">&lt;Alt&gt;1</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Go to Artists</property>
<property name="accelerator">&lt;Ctrl&gt;2</property>
<property name="accelerator">&lt;Alt&gt;2</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Go to Songs</property>
<property name="accelerator">&lt;Ctrl&gt;3</property>
<property name="accelerator">&lt;Alt&gt;3</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Go to Playlists</property>
<property name="accelerator">&lt;Ctrl&gt;4</property>
<property name="accelerator">&lt;Alt&gt;4</property>
</object>
</child>
<child>
......
......@@ -313,15 +313,6 @@ class Window(Gtk.ApplicationWindow):
self.player.props.repeat_mode = RepeatMode.NONE
else:
self.player.props.repeat_mode = RepeatMode.SHUFFLE
# Headerbar switching
if keyval in [Gdk.KEY_1, Gdk.KEY_KP_1]:
self._toggle_view(View.ALBUM)
if keyval in [Gdk.KEY_2, Gdk.KEY_KP_2]:
self._toggle_view(View.ARTIST)
if keyval in [Gdk.KEY_3, Gdk.KEY_KP_3]:
self._toggle_view(View.SONG)
if keyval in [Gdk.KEY_4, Gdk.KEY_KP_4]:
self._toggle_view(View.PLAYLIST)
# Ctrl+Shift+<KEY>
elif modifiers == shift_ctrl_mask:
if keyval == Gdk.KEY_A:
......@@ -331,6 +322,15 @@ class Window(Gtk.ApplicationWindow):
# Go back from Album view on Alt + Left
if keyval == Gdk.KEY_Left:
self.headerbar._on_back_button_clicked()
# Headerbar switching
if keyval in [Gdk.KEY_1, Gdk.KEY_KP_1]:
self._toggle_view(View.ALBUM)
if keyval in [Gdk.KEY_2, Gdk.KEY_KP_2]:
self._toggle_view(View.ARTIST)
if keyval in [Gdk.KEY_3, Gdk.KEY_KP_3]:
self._toggle_view(View.SONG)
if keyval in [Gdk.KEY_4, Gdk.KEY_KP_4]:
self._toggle_view(View.PLAYLIST)
# No modifier
else:
if (keyval == Gdk.KEY_AudioPlay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment