mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 06:22:29 +00:00
playback/player: GTK: Fix prev/next button insensitivity logic in the EOS handler
This commit is contained in:
parent
ad694a24ea
commit
adf40eeefe
1 changed files with 12 additions and 9 deletions
|
@ -269,16 +269,19 @@ eos_cb (GstPlayer * unused, GtkPlay * play)
|
||||||
next = g_list_find_custom (play->uris,
|
next = g_list_find_custom (play->uris,
|
||||||
gst_player_get_uri (play->player),
|
gst_player_get_uri (play->player),
|
||||||
(GCompareFunc) strcmp);
|
(GCompareFunc) strcmp);
|
||||||
|
|
||||||
|
g_return_if_fail (next != NULL);
|
||||||
|
|
||||||
|
next = g_list_next (next);
|
||||||
if (next) {
|
if (next) {
|
||||||
next = g_list_next (next);
|
if (!gtk_widget_is_sensitive(play->prev_button))
|
||||||
if (next) {
|
gtk_widget_set_sensitive (play->prev_button, TRUE);
|
||||||
if (!gtk_widget_is_sensitive(play->prev_button))
|
gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
|
||||||
gtk_widget_set_sensitive (play->prev_button, TRUE);
|
|
||||||
gst_player_set_uri (play->player, next->data);
|
gst_player_set_uri (play->player, next->data);
|
||||||
gst_player_play (play->player);
|
gst_player_play (play->player);
|
||||||
set_title (play, next->data);
|
set_title (play, next->data);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
gst_player_stop (play->player);
|
gst_player_stop (play->player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue