Commit 6a19320e authored by Ludovic Fauvet's avatar Ludovic Fauvet

gtk: toggle play/pause with the space bar in fullscreen

parent 218b2580
...@@ -97,6 +97,10 @@ public: ...@@ -97,6 +97,10 @@ public:
int b_stream; int b_stream;
char * psz_target; char * psz_target;
void playlist_toggle_play_pause()
{
playlist_isplaying() ? playlist_pause() : playlist_play();
}
void playlist_play() void playlist_play()
{ {
get_player().play(); get_player().play();
......
...@@ -364,6 +364,9 @@ static gboolean fullscreen_win_keypress_handler(GtkWidget *widget, GdkEventKey * ...@@ -364,6 +364,9 @@ static gboolean fullscreen_win_keypress_handler(GtkWidget *widget, GdkEventKey *
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data; VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
switch (event->keyval) switch (event->keyval)
{ {
case GDK_KEY_space:
plugin->playlist_toggle_play_pause();
return True;
case GDK_KEY_Escape: case GDK_KEY_Escape:
plugin->set_fullscreen(false); plugin->set_fullscreen(false);
return True; return True;
......
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