summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-08-23 19:02:53 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-08-23 19:02:53 +0300
commitd30c65f9f8e4df372794a6007cfd1bea9f16c776 (patch)
tree1d26baf4fa400c3e58871eb5ed12320d7e255338
parent5743b39d4e5a11e2fdc2402b14d3032ebbc15fc0 (diff)
playback/player: Block value-changed signal when playing an URI to prevent spurious seeks
-rw-r--r--playback/player/gtk/gtk-play.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/playback/player/gtk/gtk-play.c b/playback/player/gtk/gtk-play.c
index 6dac913..3ff03cd 100644
--- a/playback/player/gtk/gtk-play.c
+++ b/playback/player/gtk/gtk-play.c
@@ -409,7 +409,11 @@ static void
play_current_uri (GtkPlay * play, GList * uri, const gchar * ext_suburi)
{
/* reset the button/widget state to default */
+ g_signal_handlers_block_by_func (play->seekbar,
+ seekbar_value_changed_cb, play);
gtk_range_set_range (GTK_RANGE (play->seekbar), 0, 0);
+ g_signal_handlers_unblock_by_func (play->seekbar,
+ seekbar_value_changed_cb, play);
gtk_widget_set_sensitive (play->prev_button, g_list_previous (uri) != NULL);
gtk_widget_set_sensitive (play->next_button, g_list_next (uri) != NULL);
gtk_label_set_label (play->rate_label, NULL);