2014-02-17 15:47:19 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
|
|
*/
|
2014-06-05 10:19:22 -04:00
|
|
|
#include <core/deck.h>
|
2014-06-04 13:59:15 -04:00
|
|
|
#include <gui/tabs.h>
|
2015-04-12 10:17:40 -04:00
|
|
|
#include <gui/queue/label.h>
|
2014-02-17 15:47:19 -05:00
|
|
|
|
2014-02-17 17:40:18 -05:00
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
class HistoryTab : public Tab {
|
2015-04-12 10:17:40 -04:00
|
|
|
private:
|
|
|
|
HistoryLabel *history_label;
|
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
public:
|
2015-04-12 10:08:10 -04:00
|
|
|
HistoryTab() : Tab(deck :: get_queue())
|
|
|
|
{
|
2015-04-19 09:24:25 -04:00
|
|
|
tab_builder->add_from_file(gui :: share_file("QueueLabel.ui"));
|
|
|
|
tab_builder->get_widget_derived("HistoryLabel", history_label);
|
2015-04-19 09:52:27 -04:00
|
|
|
tab_toolbar->init(tab_pq, history_label, tab_window, 0);
|
2015-04-12 10:08:10 -04:00
|
|
|
|
2015-04-19 12:13:32 -04:00
|
|
|
history_label->init(tab_pq);
|
|
|
|
tab_label = history_label;
|
2015-04-12 10:17:40 -04:00
|
|
|
|
2015-04-19 12:13:32 -04:00
|
|
|
tab_vbox.pack_start(*tab_window, true, true);
|
2015-04-12 10:17:40 -04:00
|
|
|
|
2015-04-19 09:14:57 -04:00
|
|
|
gui :: get_widget<Gtk::Notebook>("o_notebook")->insert_page(tab_vbox, *history_label, 0);
|
2015-04-12 10:08:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
~HistoryTab()
|
|
|
|
{
|
|
|
|
tab_unmap();
|
|
|
|
}
|
2014-02-21 22:06:42 -05:00
|
|
|
};
|
2014-02-17 15:47:19 -05:00
|
|
|
|
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
static HistoryTab *history_tab;
|
2014-02-17 15:47:19 -05:00
|
|
|
|
2014-02-20 19:49:33 -05:00
|
|
|
void init_history_tab()
|
2014-02-17 15:47:19 -05:00
|
|
|
{
|
2014-02-21 22:06:42 -05:00
|
|
|
history_tab = new HistoryTab;
|
2014-02-17 15:47:19 -05:00
|
|
|
}
|