mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +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,
|
||||
gst_player_get_uri (play->player),
|
||||
(GCompareFunc) strcmp);
|
||||
|
||||
g_return_if_fail (next != NULL);
|
||||
|
||||
next = g_list_next (next);
|
||||
if (next) {
|
||||
next = g_list_next (next);
|
||||
if (next) {
|
||||
if (!gtk_widget_is_sensitive(play->prev_button))
|
||||
gtk_widget_set_sensitive (play->prev_button, TRUE);
|
||||
gst_player_set_uri (play->player, next->data);
|
||||
gst_player_play (play->player);
|
||||
set_title (play, next->data);
|
||||
}
|
||||
else
|
||||
if (!gtk_widget_is_sensitive(play->prev_button))
|
||||
gtk_widget_set_sensitive (play->prev_button, TRUE);
|
||||
gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
|
||||
|
||||
gst_player_set_uri (play->player, next->data);
|
||||
gst_player_play (play->player);
|
||||
set_title (play, next->data);
|
||||
} else {
|
||||
gst_player_stop (play->player);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue