playback/player: GTK: Fix logic for setting the prev/next button insensitive at the end/beginning of the playlist

This commit is contained in:
Sebastian Dröge 2014-08-06 16:41:58 +02:00
parent a622cb0d2c
commit ead64d43fa

View file

@ -110,8 +110,7 @@ skip_prev_clicked_cb (GtkButton *button, GtkPlay *play)
gst_player_set_uri (play->player, prev->data);
gst_player_play (play->player);
set_title (play, prev->data);
} else {
gtk_widget_set_sensitive (play->prev_button, FALSE);
gtk_widget_set_sensitive (play->prev_button, g_list_previous (prev) != NULL);
}
}
}
@ -132,8 +131,7 @@ skip_next_clicked_cb (GtkButton *button, GtkPlay *play)
gst_player_set_uri (play->player, next->data);
gst_player_play (play->player);
set_title (play, next->data);
} else {
gtk_widget_set_sensitive (play->next_button, FALSE);
gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL);
}
}
}