[totem/gnome-2-28] Make seeking with the mouse behave the same as the main player
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-2-28] Make seeking with the mouse behave the same as the main player
- Date: Mon, 12 Apr 2010 16:18:34 +0000 (UTC)
commit b100e88039a91373f18e98e42bad4da6a603182b
Author: Bastien Nocera <hadess hadess net>
Date: Fri Apr 9 15:00:44 2010 +0100
Make seeking with the mouse behave the same as the main player
Instead of shifting the scale a tiny bit.
browser-plugin/totem-plugin-viewer.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index b8f1dc1..725c425 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -1610,6 +1610,13 @@ property_notify_cb_volume (BaconVideoWidget *bvw,
static gboolean
on_seek_start (GtkWidget *widget, GdkEventButton *event, TotemEmbedded *emb)
{
+ /* HACK: we want the behaviour you get with the middle button, so we
+ * mangle the event. clicking with other buttons moves the slider in
+ * step increments, clicking with the middle button moves the slider to
+ * the location of the click.
+ */
+ event->button = 2;
+
emb->seeking = TRUE;
totem_time_label_set_seeking (TOTEM_TIME_LABEL (emb->fs->time_label),
TRUE);
@@ -1620,6 +1627,9 @@ on_seek_start (GtkWidget *widget, GdkEventButton *event, TotemEmbedded *emb)
static gboolean
cb_on_seek (GtkWidget *widget, GdkEventButton *event, TotemEmbedded *emb)
{
+ /* HACK: see on_seek_start */
+ event->button = 2;
+
bacon_video_widget_seek (emb->bvw,
gtk_range_get_value (GTK_RANGE (widget)) / 65535, NULL);
totem_time_label_set_seeking (TOTEM_TIME_LABEL (emb->fs->time_label),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]