Commit f9ed7cc9 authored by Bastien Nocera's avatar Bastien Nocera
Browse files

main: Add 'M' shortcut to toggle mute

'M' was already used for the (increasingly rare) "go to root menu of a
DVD", so mute is only toggled when not playing a DVD.

This is the same shortcut as YouTube uses:
https://support.google.com/youtube/answer/7631406?hl=en

Closes: #457
parent 68f692ec
......@@ -29,6 +29,8 @@ Ctrl+H:
Shortcut help
Undocumented shortcuts:
M (when playing a DVD):
Menu
Ctrl+Q:
Quit
Ctrl+W:
......
......@@ -62,6 +62,13 @@
<property name="title" translatable="yes" context="shortcut window">Decrease volume</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut" id="toggle-volume">
<property name="visible">1</property>
<property name="accelerator">M</property>
<property name="title" translatable="yes" context="shortcut window">Mute/unmute</property>
</object>
</child>
</object>
</child>
<child>
......
......@@ -3469,7 +3469,10 @@ totem_object_handle_key_press (TotemObject *totem, GdkEventKey *event)
break;
case GDK_KEY_M:
case GDK_KEY_m:
bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ROOT_MENU);
if (totem_playing_dvd (totem->mrl))
bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ROOT_MENU);
else
totem_object_volume_toggle_mute (totem);
break;
case GDK_KEY_AudioNext:
case GDK_KEY_Forward:
......
Supports Markdown
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