46 lines
873 B
C++
46 lines
873 B
C++
/*
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*/
|
|
extern "C" {
|
|
#include <core/audio.h>
|
|
#include <core/collection.h>
|
|
#include <core/playlist.h>
|
|
#include <gui/builder.h>
|
|
#include <gui/playlist.h>
|
|
#include <gui/queue.h>
|
|
}
|
|
#include <gui/tabs.h>
|
|
#include <gui/queue/label.h>
|
|
|
|
|
|
static class PlaylistTab : public Tab {
|
|
private:
|
|
PlaylistLabel *playlist_label;
|
|
|
|
public:
|
|
PlaylistTab() : Tab(playlist_get_queue())
|
|
{
|
|
tab_builder->add_from_file(gui :: share_file("QueueLabel.ui"));
|
|
tab_builder->get_widget_derived("PlaylistLabel", playlist_label);
|
|
|
|
playlist_label->init(tab_pq);
|
|
tab_label = playlist_label;
|
|
|
|
tab_vbox.pack_start(*tab_window, true, true);
|
|
|
|
Glib :: wrap(GTK_NOTEBOOK(gui_builder_widget("o_notebook")),
|
|
false)->insert_page(tab_vbox, *playlist_label, 0);
|
|
}
|
|
|
|
~PlaylistTab()
|
|
{
|
|
tab_unmap();
|
|
}
|
|
} *p_tab;
|
|
|
|
|
|
void plist :: init()
|
|
{
|
|
p_tab = new PlaylistTab;
|
|
}
|