totem r5777 - in trunk: . src



Author: hadess
Date: Fri Oct 24 00:58:57 2008
New Revision: 5777
URL: http://svn.gnome.org/viewvc/totem?rev=5777&view=rev

Log:
2008-10-24  Bastien Nocera  <hadess hadess net>

	* src/totem.c (seek_slider_pressed_cb), (seek_slider_released_cb):
	Add hack from Rhythmbox to force the behaviour of the left-click
	button to skip directly to the position we clicked, as if we were
	using the middle-button click (Closes: #129671)



Modified:
   trunk/ChangeLog
   trunk/src/totem.c

Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c	(original)
+++ trunk/src/totem.c	Fri Oct 24 00:58:57 2008
@@ -1851,6 +1851,13 @@
 gboolean
 seek_slider_pressed_cb (GtkWidget *widget, GdkEventButton *event, Totem *totem)
 {
+	/* 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;
+
 	totem->seek_lock = TRUE;
 	if (bacon_video_widget_can_direct_seek (totem->bvw) == FALSE) {
 		totem_statusbar_set_seeking (TOTEM_STATUSBAR (totem->statusbar), TRUE);
@@ -1887,6 +1894,9 @@
 	GtkAdjustment *adj;
 	gdouble val;
 
+	/* HACK: see seek_slider_pressed_cb */
+	event->button = 2;
+
 	/* set to FALSE here to avoid triggering a final seek when
 	 * syncing the adjustments while being in direct seek mode */
 	totem->seek_lock = FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]