gui: Remove tab_finish_init()

It is no longer needed.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-04-19 10:15:16 -04:00
parent 9ddae1275f
commit 2c45cf3972
6 changed files with 11 additions and 22 deletions

View File

@ -21,7 +21,6 @@ public:
tab_vbox.pack_start(*tab_window, true, true);
tab_size = collection_label->collection_size;
tab_finish_init();
gui :: get_widget<Gtk::Notebook>("o_notebook")->insert_page(tab_vbox, *collection_label, 0);
}

View File

@ -20,7 +20,6 @@ public:
tab_vbox.pack_start(*tab_window, true, true);
tab_size = history_label->history_size;
tab_finish_init();
gui :: get_widget<Gtk::Notebook>("o_notebook")->insert_page(tab_vbox, *history_label, 0);
}

View File

@ -91,8 +91,6 @@ public:
tab_vbox.pack_start(playlist_hbox, true, true);
tab_finish_init();
gui :: get_widget<Gtk::Notebook>("o_notebook")->insert_page(tab_vbox, *playlist_label, 0);
}

View File

@ -98,7 +98,6 @@ QueueTab :: QueueTab(Queue *pq, unsigned int num)
tab_size = q_label->temp_size;
tab_finish_init();
queue_mapping[&tab_vbox] = this;
gui :: get_widget<Gtk::Notebook>("o_notebook")->insert_page(tab_vbox, *q_label, num);

View File

@ -39,6 +39,15 @@ Tab :: Tab(Queue *pq)
tab_builder->get_widget_derived("QueueWindow", tab_window);
tab_window->init(tab_pq);
tab_window->q_treeview->signal_key_press_event().connect(sigc::mem_fun(*this,
&Tab :: on_key_pressed));
tab_window->q_treeview->signal_button_press_event().connect(sigc::mem_fun(*this,
&Tab :: on_button_pressed), false);
for (unsigned int i = 0; i < tab_window->q_treeview->get_n_columns(); i++)
tab_window->q_treeview->get_column(i)->signal_clicked().connect(
sigc::bind<unsigned int> (sigc::mem_fun(
*this, &Tab::on_column_clicked), i));
tab_vbox.set_margin_start(1);
tab_vbox.set_margin_end(1);
@ -46,27 +55,13 @@ Tab :: Tab(Queue *pq)
tab_vbox.pack_start(*tab_toolbar, false, true, 2);
tab_vbox.show();
}
Tab :: ~Tab() {}
void Tab :: tab_finish_init()
{
tab_window->q_treeview->signal_key_press_event().connect(sigc::mem_fun(*this,
&Tab :: on_key_pressed));
tab_window->q_treeview->signal_button_press_event().connect(sigc::mem_fun(*this,
&Tab :: on_button_pressed), false);
std::vector<Gtk::TreeViewColumn *> columns = tab_window->q_treeview->get_columns();
for (unsigned int i = 0; i < columns.size(); i++) {
columns[i]->signal_clicked().connect(sigc::bind<unsigned int> (
sigc::mem_fun(*this, &Tab::on_column_clicked), i));
}
tab_set_size();
tab_runtime_changed();
}
Tab :: ~Tab() {}
/**
*

View File

@ -50,7 +50,6 @@ public:
/**
* More helper functions
*/
void tab_finish_init();
int tab_page_num();
bool tab_is_cur();
void tab_runtime_changed();