/* * Copyright 2014 (c) Anna Schumaker. */ #include #include #include #include class HistoryTab : public Tab { private: HistoryLabel *history_label; QueueWindow *history_window; public: HistoryTab() : Tab(deck :: get_queue()) { tab_builder->add_from_file(gui :: share_file("QueueWindow.ui")); tab_builder->add_from_file(gui :: share_file("QueueLabel.ui")); tab_builder->get_widget_derived("HistoryLabel", history_label); tab_builder->get_widget_derived("QueueWindow", history_window); tab_toolbar->init(tab_pq, history_label, history_window, 0); history_window->init(tab_pq); tab_vbox.pack_start(*history_window, true, true); tab_model = history_window->q_model; tab_filter = history_window->q_filter; tab_size = history_label->history_size; tab_treeview = history_window->q_treeview; tab_finish_init(); gui :: get_widget("o_notebook")->insert_page(tab_vbox, *history_label, 0); } ~HistoryTab() { tab_unmap(); } }; static HistoryTab *history_tab; void init_history_tab() { history_tab = new HistoryTab; }