gui: Wire up gui_queue functions to various tabs
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
e8681e4c92
commit
87e547d85d
|
@ -62,24 +62,28 @@ static void collection_added(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
if (collection_tab)
|
if (collection_tab)
|
||||||
collection_tab->on_track_added(pos);
|
collection_tab->on_track_added(pos);
|
||||||
|
gui_queue_added(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void collection_removed(struct queue *queue, unsigned int pos)
|
static void collection_removed(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
if (collection_tab)
|
if (collection_tab)
|
||||||
collection_tab->on_track_removed(pos);
|
collection_tab->on_track_removed(pos);
|
||||||
|
gui_queue_removed(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void collection_cleared(struct queue *queue, unsigned int n)
|
static void collection_cleared(struct queue *queue, unsigned int n)
|
||||||
{
|
{
|
||||||
if (collection_tab)
|
if (collection_tab)
|
||||||
collection_tab->on_tracks_cleared(n);
|
collection_tab->on_tracks_cleared(n);
|
||||||
|
gui_queue_cleared(queue, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void collection_updated(struct queue *queue, unsigned int pos)
|
static void collection_updated(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
if (collection_tab)
|
if (collection_tab)
|
||||||
collection_tab->on_track_updated(pos);
|
collection_tab->on_track_updated(pos);
|
||||||
|
gui_queue_updated(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct queue_ops collection_ops = {
|
struct queue_ops collection_ops = {
|
||||||
|
|
|
@ -47,21 +47,25 @@ static void history_added(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
if (history_tab)
|
if (history_tab)
|
||||||
history_tab->on_track_added(pos);
|
history_tab->on_track_added(pos);
|
||||||
|
gui_queue_added(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void history_removed(struct queue *queue, unsigned int pos)
|
static void history_removed(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
history_tab->on_track_removed(pos);
|
history_tab->on_track_removed(pos);
|
||||||
|
gui_queue_removed(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void history_cleared(struct queue *queue, unsigned int n)
|
static void history_cleared(struct queue *queue, unsigned int n)
|
||||||
{
|
{
|
||||||
history_tab->on_tracks_cleared(n);
|
history_tab->on_tracks_cleared(n);
|
||||||
|
gui_queue_cleared(queue, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void history_updated(struct queue *queue, unsigned int pos)
|
static void history_updated(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
history_tab->on_track_updated(pos);
|
history_tab->on_track_updated(pos);
|
||||||
|
gui_queue_updated(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct queue_ops history_ops = {
|
struct queue_ops history_ops = {
|
||||||
|
|
|
@ -92,21 +92,25 @@ static void playlist_added(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
if (p_tab)
|
if (p_tab)
|
||||||
p_tab->on_track_added(pos);
|
p_tab->on_track_added(pos);
|
||||||
|
gui_queue_added(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void playlist_removed(struct queue *queue, unsigned int pos)
|
static void playlist_removed(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
p_tab->on_track_removed(pos);
|
p_tab->on_track_removed(pos);
|
||||||
|
gui_queue_removed(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void playlist_cleared(struct queue *queue, unsigned int n)
|
static void playlist_cleared(struct queue *queue, unsigned int n)
|
||||||
{
|
{
|
||||||
p_tab->on_tracks_cleared(n);
|
p_tab->on_tracks_cleared(n);
|
||||||
|
gui_queue_cleared(queue, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void playlist_updated(struct queue *queue, unsigned int pos)
|
static void playlist_updated(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
p_tab->on_track_updated(pos);
|
p_tab->on_track_updated(pos);
|
||||||
|
gui_queue_updated(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct queue_ops playlist_ops = {
|
struct queue_ops playlist_ops = {
|
||||||
|
|
|
@ -37,22 +37,26 @@ static void tempq_added(struct queue *queue, unsigned int pos)
|
||||||
tab->on_track_added(pos);
|
tab->on_track_added(pos);
|
||||||
tempq_save(queue, Q_ENABLED);
|
tempq_save(queue, Q_ENABLED);
|
||||||
}
|
}
|
||||||
|
gui_queue_added(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tempq_removed(struct queue *queue, unsigned int pos)
|
static void tempq_removed(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
find_tab(queue)->on_track_removed(pos);
|
find_tab(queue)->on_track_removed(pos);
|
||||||
tempq_save(queue, Q_ENABLED);
|
tempq_save(queue, Q_ENABLED);
|
||||||
|
gui_queue_removed(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tempq_cleared(struct queue *queue, unsigned int n)
|
static void tempq_cleared(struct queue *queue, unsigned int n)
|
||||||
{
|
{
|
||||||
find_tab(queue)->on_tracks_cleared(n);
|
find_tab(queue)->on_tracks_cleared(n);
|
||||||
|
gui_queue_cleared(queue, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tempq_updated(struct queue *queue, unsigned int pos)
|
static void tempq_updated(struct queue *queue, unsigned int pos)
|
||||||
{
|
{
|
||||||
find_tab(queue)->on_track_updated(pos);
|
find_tab(queue)->on_track_updated(pos);
|
||||||
|
gui_queue_updated(queue, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct queue_ops tempq_ops = {
|
struct queue_ops tempq_ops = {
|
||||||
|
@ -126,7 +130,6 @@ void Tab :: on_track_removed(unsigned int row)
|
||||||
void Tab :: on_tracks_cleared(unsigned int n)
|
void Tab :: on_tracks_cleared(unsigned int n)
|
||||||
{
|
{
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
tab_window->q_model->on_cleared(n);
|
|
||||||
tab_label->set_size();
|
tab_label->set_size();
|
||||||
tab_runtime_changed();
|
tab_runtime_changed();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue