deck: Pass a random-enabled flag when creating playqueues

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Anna Schumaker 2014-01-30 22:53:10 -05:00 committed by Anna Schumaker
parent 37a776ef24
commit 7dc57572aa
3 changed files with 5 additions and 3 deletions

View File

@ -13,7 +13,7 @@ namespace deck
void read();
void write();
Playqueue *create();
Playqueue *create(bool);
void remove(unsigned int);
Playqueue *get(unsigned int);
void move(unsigned int, unsigned int);

View File

@ -46,7 +46,7 @@ public:
};
/* tabs.cpp */
void queue_selected();
void queue_selected(bool);
void init_tabs();
void init_tabs2();
void cleanup_tabs();

View File

@ -103,11 +103,13 @@ void deck :: write()
deck_file.close();
}
Playqueue *deck :: create()
Playqueue *deck :: create(bool random)
{
Playqueue *pq;
playqueue_deck.push_back(Playqueue(PQ_ENABLED));
pq = &playqueue_deck.back();
if (random == true)
pq->set_flag(PQ_RANDOM);
get_callbacks()->on_pq_created(pq, playqueue_deck.size() - 1);
return pq;
}