diff options
author | Bastien Nocera <hadess@hadess.net> | 2010-04-09 15:00:44 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2010-04-09 15:00:44 +0100 |
commit | c8a680a9d055ae485f62792a3b60dcc3ef37d1f5 (patch) | |
tree | 93156b4ac409d10a8b2fa4acf140901645f1c5bc /browser-plugin | |
parent | 9c487aff7017df24aa2f8b22e69b9c599725e4f3 (diff) |
Make seeking with the mouse behave the same as the main player
Instead of shifting the scale a tiny bit.
Diffstat (limited to 'browser-plugin')
-rw-r--r-- | 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 7459ea10..26019021 100644 --- a/browser-plugin/totem-plugin-viewer.c +++ b/browser-plugin/totem-plugin-viewer.c @@ -1653,6 +1653,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); @@ -1663,6 +1670,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), |