libsaria: Set max_playlists to 10
This allows the UI to use the number keys as shortcuts... Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
2ae050fe47
commit
a91713dbfd
|
@ -8,7 +8,7 @@
|
|||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
static unsigned int next_playlist = 0;
|
||||
static unsigned int max_playlists = 10;
|
||||
static unsigned int num_static = 0;
|
||||
static void (*on_new_playlist)(libsaria::Playlist *) = NULL;
|
||||
|
||||
|
@ -95,6 +95,9 @@ namespace libsaria
|
|||
{
|
||||
Playlist *plist;
|
||||
|
||||
if ((playlist_stack.size() - num_static) == max_playlists)
|
||||
return;
|
||||
|
||||
switch (type) {
|
||||
case PLIST_SET:
|
||||
plist = new Set(PL_NONE);
|
||||
|
@ -112,7 +115,6 @@ namespace libsaria
|
|||
|
||||
stack::push(plist);
|
||||
rename_playlists();
|
||||
next_playlist++;
|
||||
}
|
||||
|
||||
void stack::init()
|
||||
|
|
Loading…
Reference in New Issue