[Xfce4-commits] <parole:master> Restored arrow key seeking.
Sean Davis
noreply at xfce.org
Mon Jul 23 01:26:24 CEST 2012
Updating branch refs/heads/master
to eab663695a3e2b6954e3d11873025e314c204f52 (commit)
from 2bb01d73d30cb3a8f0a8f8e31a9ecd4acfe5acd1 (commit)
commit eab663695a3e2b6954e3d11873025e314c204f52
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Jul 19 17:11:47 2012 -0400
Restored arrow key seeking.
src/parole-player.c | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/parole-player.c b/src/parole-player.c
index 688fc7b..27242f9 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -134,6 +134,10 @@ void parole_player_forward_cb (GtkButton *button,
void parole_player_back_cb (GtkButton *button,
ParolePlayer *player);
+
+void parole_player_seekf_cb (GtkWidget *widget, ParolePlayer *player);
+
+void parole_player_seekb_cb (GtkWidget *widget, ParolePlayer *player);
gboolean parole_player_scroll_event_cb (GtkWidget *widget,
GdkEventScroll *ev,
@@ -1152,6 +1156,28 @@ void parole_player_back_cb (GtkButton *button, ParolePlayer *player)
parole_player_play_prev (player);
}
+void parole_player_seekf_cb (GtkWidget *widget, ParolePlayer *player)
+{
+ gdouble seek;
+
+ seek = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst) )
+ +
+ parole_player_get_seek_value (player);
+
+ parole_gst_seek (PAROLE_GST (player->priv->gst), seek);
+}
+
+void parole_player_seekb_cb (GtkWidget *widget, ParolePlayer *player)
+{
+ gdouble seek;
+
+ seek = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst) )
+ -
+ parole_player_get_seek_value (player);
+
+ parole_gst_seek (PAROLE_GST (player->priv->gst), seek);
+}
+
gboolean parole_player_scroll_event_cb (GtkWidget *widget, GdkEventScroll *ev, ParolePlayer *player)
{
gboolean ret_val = FALSE;
@@ -1826,12 +1852,12 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
case GDK_Right:
/* Media seekable ?*/
if ( GTK_WIDGET_SENSITIVE (player->priv->range) )
- parole_player_forward_cb (NULL, player);
+ parole_player_seekf_cb (NULL, player);
ret_val = TRUE;
break;
case GDK_Left:
if ( GTK_WIDGET_SENSITIVE (player->priv->range) )
- parole_player_back_cb (NULL, player);
+ parole_player_seekb_cb (NULL, player);
ret_val = TRUE;
break;
case GDK_s:
More information about the Xfce4-commits
mailing list