[totem] backend: Don't allow seeking if not seekable



commit 799938c81f33b8a5cc81d3874719030b52813ad7
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Feb 11 13:40:05 2014 +0100

    backend: Don't allow seeking if not seekable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723981

 src/backend/bacon-video-widget.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index bd276bd..a94e481 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -900,10 +900,13 @@ bacon_video_widget_handle_scroll (GtkWidget        *widget,
   }
 
   if (widget == (gpointer) bvw ||
-      widget == g_object_get_data (G_OBJECT (bvw->priv->controls), "seek_scale"))
-    g_signal_emit (G_OBJECT (bvw), bvw_signals[SIGNAL_SEEK_REQUESTED], 0, forward);
-  else if (widget == g_object_get_data (G_OBJECT (bvw->priv->controls), "volume_button"))
-    g_signal_emit (G_OBJECT (bvw), bvw_signals[SIGNAL_VOLUME_CHANGE_REQUESTED], 0, forward);
+      widget == g_object_get_data (G_OBJECT (bvw->priv->controls), "seek_scale")) {
+    if (bvw->priv->seekable > 0)
+      g_signal_emit (G_OBJECT (bvw), bvw_signals[SIGNAL_SEEK_REQUESTED], 0, forward);
+  } else if (widget == g_object_get_data (G_OBJECT (bvw->priv->controls), "volume_button")) {
+    if (bacon_video_widget_set_volume (bvw))
+      g_signal_emit (G_OBJECT (bvw), bvw_signals[SIGNAL_VOLUME_CHANGE_REQUESTED], 0, forward);
+  }
 
   return GDK_EVENT_STOP;
 }


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